Adding a rule

A rule defines a singular piece of functionality, such as making a field mandatory. A rule can perform calculations, validate fields based on data or lists, set required fields, and more. Rules can also specify conditions that determine when the rule should execute or who can execute rules run in the order they appear in the rule set. The order can be changed using the Move Up and Move Down buttons. If there is an error executing a rule, rule processing will stop. It is important to order the rules such that validation rules come first in the list, and then any rules that will perform actions. For example, to validate data and send an HTML email, place rules to validate data first and then the rule to send an HTML email. If the rules were reversed, the HTML email will be sent with invalid data or an invalid workflow state if the rules are part of a transition.

All rule sets in a phase, except the "On Enter" and "On Exit" rule sets, run before a record proceeds from one phase to another. The "On Exit" rule sets run before a transition occurs. "On Enter" rule sets run when a record moves to that phase.

The "On Exit" rules are the best place for notifications when a record leaves a phase especially when multiple transitions are used or when integration notifications are triggered.  Transitions are used to add validations that are required before leaving to the current phase. For example, in a change phase, the start date and end date are entered before proceeding to the Approval phase and no input is required if you are abandoning the change. In this case, if the "On Exit" rules are run before the transition rules, you will be sending out notifications but the actual transition would not have happened. Therefore, the order of execution of rule is Transition > On Exit > On Enter.

For example, rules may run in the following situations:

  • When a record enters or exits a specific phase of the workflow
  • When a record is created, updated, or deleted in a certain phase of the workflow because a workflow action is invoked
  • When a workflow transition occurs
  • When a workflow action is invoked

The following rule types are available in out-of-box Service Manager deployments.

Rule type Description
Assignment Automatically distribute records (such as tasks or records) to the groups and individuals who are most able to process them
Call a process Call a Service Manager process record
Case Exchange Trigger certain activities for the Case Exchange integration
Clear Fields Clear the specified field and related fields
JavaScript Validation Use JavaScript to perform actions and validations
Launch a Script Launch a Service Manager script
Launch a URL Call a URL to launch a web page
Mandatory Fields Set fields as mandatory
Mandatory Variables Set variables as mandatory
Popup Message Box Create and configure popup message boxes that appear to end users
Run Action Run actions on records that have a specified relationship to the record that triggers the rule
Run JavaScript Use JavaScript to perform actions and validations
Run Scheduled Action Run actions on the current record after a specified length of time has passed
Run a Wizard Run a Service Manager wizard
Send HTML Email Send an HTML Email to users or a group
Send Notifications Send Service Manager notifications
Set Field Set a field value using JavaScript
Set Field from Number Set field based on a number record
Start or Stop Clock Start and stop a Service Manager clock
Validate against List Validate a field against a list (global or defined)
Validate against Table Validate a field against a field in another table
Validate Date Validate a date against a date range
Validate Text/Number Validate a field against a range of text or a number in another field of same table

Note

  • You can edit user-defined rules only. You cannot modify the out-of-box rules because they are labeled as Micro Focus Proprietary.
  • Many rules have a default description that contains tokens. The tockens are replaced with values when you define the rule. For example, the default description of the Set Mandatory Fields rule is <fields> are Mandatory. When you define the rule, the <fields> token is replaced by the fields that you select in the rule. You can edit the default description.
  • If you do not specify a condition, rules are always triggered to perform the action specified in the rule.

Related topics

Process Designer

Create a rule set