Service Manager
Working with Read-Only and Required Business Rules
•Overriding Read-Only Business Rules
•Overriding the Required Business Rule
•Working with Read-Only Business Rules
Overriding Read-Only Business Rules
•Overriding the Read-Only Business Rule from a Quick Action
•Overriding the Read-Only Business Rule from a Role Definition
Overriding the Read-Only Business Rule from a Quick Action
1.From the Configuration Console, click Build > Business Objects to open the Business Objects workspace.
2.Open a business object.
3.Click Action Menu > Edit Actions to open the Quick Actions Center.
4.Click the Create New Actions tab on the left.
5.Choose Update Object.
6.In the Field Name field, choose ReadOnly from the drop-down list. In the Field Value field, enter true.
Update Object Quick Action - ReadOnly Field
7.Enter information into the other fields as needed.
8.Click Save.
Users can choose this quick action to apply to the read-only field on a specific business object record if the read-only field is set up for that business object.
Overriding the Read-Only Business Rule from a Role Definition
1.From the Configuration Console, click Configure > Users and Permissions > Roles and Permissions to open the Roles and Permissions workspace.
2.From the Role Name column, choose the role for which to modify the read-only rule. The Role Details page appears.
3.Choose the Object Permissions tab.
4.Find the business object to override for this role, then click Edit under the Lifecycle column.
5.Under When Business Object is in Final State, check Allow Editing.
6.Click Save.
Overriding the Required Business Rule
•About Required Business Rules
•Setting a Field in a Business Rule to Required
•Setting a Form in a Business Rule to Required
•Overriding the Required Business Rule for a Form
•About Completely Overriding a Required Business Rule
•Required Business Rules Matrix
About Required Business Rules
You can specify that a business rule be required for a field. In this case, the application does not accept blank values in that field and you must enter something before the business rule can be saved. The fields in business objects that are created as a result of this required business rule are also subject to these rules.
Setting a Field in a Business Rule to Required
To specify that a field in a business rule be required, do one of the following:
1.From the Configuration Console, click Build > Business Objects to open the Business Objects workspace.
2.Open a business object.
3.Click the Business Rules tab.
4.Scroll to the Required Rules section.
5.Click the edit icon for a business rule.
6.Do one of the following:
•Select This field is always required.
•Select This field is conditionally required based on an expression and set a condition for when this business rule is required. If the condition evaluates to true, the field is required.
Required Field in a Business Rule
7.Click Save.
Setting a Form in a Business Rule to Required
You can also specify that a business rule be required for all of the forms associated with a business object, including any that are created based on business rules or workflows.
1.From the Configuration Console, click Build > Business Objects to open the Business Objects workspace.
2.Open a business object.
3.Click the Business Rules tab.
4.For the Show rules for form field, select Default.
Required Business Rule
Overriding the Required Business Rule for a Form
You can override a business rule from being required for all forms. To make a business rule not required for a particular form, do the following:
1.From the Configuration Console, click Build > Business Objects to open the Business Objects workspace.
2.Open a business object.
3.Click the Business Rules tab.
4.For the Show rules for form field, select the form for which to override the rule. The application only displays the business rules that affect this form.
5.Check Do not show any object-wide rules, show only form-specific ones.
6.Click the Required Rules header to expand it.
7.Open the business rule to modify.
8.Select This field is conditionally required based on an expression and enter an expression.
9.Click Save.
By overriding a required business rule for a form, you are using the Boolean OR operator.
About Completely Overriding a Required Business Rule
By default, if you override a business rule on a form, it is combined with the business object level rule. The resulting rule is of the form FormRule OR ObjectRule.
Check Complete Override to ignore any previous business rules and only use this business rule.
The following are examples:
The Problem business object has the following required rule for the owner field: $(if Status == "Logged" || Status == "Cancelled" then false else true).
To make the owner field not required when the status field is set to Investigation and the form is the problem form, first override the default rule on the problem form: $(if Status == "Investigation" then false else true).
If left that way, the resulting expression for a form is: $(if Status == "Logged" || Status == "Cancelled" then false else true) OR $(if Status == "Investigation" then false else true).
Note, that if the status field is set to Investigation, the resulting value is still true (that is, the business rule is required) due to the first (business object-level) clause.
There is no way to make the owner field not required for "Identified" problem without having to change the business object-level rule.
If you check Complete Override on a form business rule, the result is $(Status == "Investigation" then false else true).
And it evaluates to false (that is, the business rule is not required) for business objects that have the status field set to Investigation.
You must duplicate the business object-level rule part within an overridden business rule to extend the behavior correctly. To add the status field set to Investigation to the list of not-required and leave all other statuses as they are, check Complete Override and use this expression: $(if Status == "Logged" || Status == "Cancelled" || Status == "Investigation" then false else true).
Required Business Rules Matrix
Business Object Rule | Business Object Rule Disabled? | Form Rule | Form Rule Disabled? | Complete Override? | Resulting Business Rule |
---|---|---|---|---|---|
R | -- | F | -- | -- | R or F |
R | -- | F | -- | true | F |
R | -- | F | true | -- | R |
R | -- | F | true | true | R |
R | true | F | -- | -- | F |
R | true | F | -- | -- | F |
R | true | F | true | -- or true | -- |
where
•R = business object-level rule
•F = form-level rule
•-- = false or not specified
•-- or true = the resulting value is the same for either true or false
Working with Read-Only Business Rules
•About Read-Only Business Rules
•Specifying a Read-Only Rule for a Field in a Business Object
•Specifying a Read-Only Rule for a Business Object
•Business Objects Containing Final State Rules
About Read-Only Business Rules
There are two types of read-only rules that can be specified for a business object. One is for fields within the business object and the other is for the business object. The following information provides an examples of how to add a read-only rule for both fields and business objects.
Specifying a Read-Only Rule for a Field in a Business Object
1.From the Configuration Console, click Build > Business Object to open the Business Object workspace.
2.Open a business object.
3.Click the Business Rules tab on the toolbar. The Business Rules page appears.
4.Under Read-only Rules, click Add Read-only Rule. The Add Read-only Rule window appears.
Add Read-Only Rule Window
5.From the Field Name drop-down list, select a field (for example, Status_Valid).
6.Check This field is conditionally read only based on expression.
7.In the Expression Editor, enter $(if(((Status == "Closed") then true else false))).
Add Read-only Rule Window with Expression
8.Click Save.
Specifying a Read-Only Rule for a Business Object
You can create a read-only rule for a business object so that users are not allowed to modify the record after the status of the business object has been marked as being in a final state. You can select the states that define a business object as final.
You can also specify more than one state, such as closed and canceled, as a final state.
Do the following to edit a business object:
1.From the Configuration Console, click Build > Business Object to open the Business Object workspace.
2.Open a business object.
3.Click the Business Rules tab on the toolbar to open the Business Rules page.
4.Under Read-only Rules, click Add Object Read-only Rule to open the Add Final State Rule window.
5.At the Add Final State Rule window, add or edit the following:
Field | Description |
---|---|
Name | Add an easily identifiable name for the rule such as Final State Rule for Change |
Description | Add a description for the business rule. |
Expression Editor |
Add the expression required to set the final state. See the examples below for setting a single state or multiple states as final states.
To make closed a final state, enter $(status == "Closed"). To make closed, canceled, and denied final states, enter $(Status == "Closed" || Status == "Canceled" || Status == "Denied"). |
Except Fields |
Lists fields that can be edited even after the business object is in the final state. Enter exceptions here by selecting a field from the drop-down list and clicking the add icon . You can edit these fields for any business objects that contain final state designations. |
Disable Rule | Disables the rule. |
6.Click Save when you are done.
Business Objects Containing Final State Rules
The following business objects have read-only rules specified, with at least one status defined as a final state. Once the status for the business object record is changed to that state, the record and any child records, such as tasks and approvals, that were assigned to a user, can no longer be edited.
Business Object | Final States |
---|---|
Approval |
Canceled, Approved, Denied |
Call Log |
Closed |
Change |
Closed, Canceled, Denied |
CI Service |
Retired |
Knowledge |
Expired |
Incident | Closed |
Problem | Canceled, Closed |
Project | Closed |
Release | Canceled, Closed |
Service Request |
Canceled, Closed |
Was this article useful?
Copyright © 2020, Ivanti. All rights reserved.