A rule represents an activity that is carried out when an action is executed. There are rules for a variety of activities. Amongst others, there are rules for setting field values, making REST calls, and showing a notification.
An action may contain multiple rules, and the rules are carried out in the order in which they are defined. For instance, an action for finilizing a document could contain two rules: One for saving the document and another for sending the document to another system. When this action is executed, the document is first saved and then send to the other system.
Rules can throw errors. For example, the Set Field Value rule throws an error if the new field value is invalid. When this happens, no subsequent rules will be carried out on the document that was being processed. This implies that when an error occurs, user and REST actions will be terminated. By contrast, bulk and scheduled actions apply no subsequent rules on the document and start to process the next document.
Adding a rule
Only administrators can add rules to a workflow action. To add a rule to an action, complete these steps:
- Open a document definition.
- Go to the Workflow section.
- Double click on an action to open the dialog.
- In the Rules field, click on the Insert button and select a rule.
- Set the properties for the rule. The properties that you need to set differ per rule.
- Click on Save to update the rule.
- Close the dialog for the action.
- Click on Save to save the document definiton.