How do I configure the rules engine in Cflow?
You can define rules in each process stage of the workflow where you can specify various actions (Move data to process stage, Set field values, Trigger new process, send notifications via SMS, send notifications via email).
- In the Control Center, select the workflow and click on the edit icon.
- Select the Workflow Stages menu -> click on the stage where you want to configure the process stage settings -> click on Rules.
- Click on the Add New Rule button or ‘+‘ icon to create a new rule.
Specify the Rule Name for your reference. Now you can perform multiple actions on a single condition.
You can specify the rule conditions based on the field values. If you need to specify a table field in the conditions, select the table from the dropdown ‘Is this table condition‘. You may add multiple conditions by clicking the Add New button. When multiple conditions are specified, ensure you use the right operator (and, or). You can also use the open and close brackets to group your conditions. These conditions will be evaluated when a new request is submitted.
If the specified conditions are satisfied you can perform one of the following actions:
- Move – Select the action type ‘Move’ and select the appropriate process stage if you want the request to move to a new stage. If the specified conditions are satisfied, the request will move to the selected process stage. It is necessary to specify the move condition to move the request to further stages. Click on Save to save this configuration.
For example, let’s say that if the Developer has approved a request, then the request has to move from Developer to Manager Review stage. In such a case, you can specify the conditions as shown in the picture below.
- Set – Select the action type ‘Set ‘ if you want to set values to fields in the current workflow or in a different workflow. Click here to know more about how to set field values.
- Trigger – Select the action type ‘Trigger’ if you want to trigger a new request in the current workflow or different workflow. Click here to know more about triggering a new request in a sub-process.
- Email Settings – The Email Conditions would typically be the same as the Conditions specified in the Rules for a Move Action. This would send the email when a request moves from one stage to another. Click here to know more about Email Settings.
- SMS Settings – Typically notifications are sent through email, if you would like to send notifications via SMS, you can select the action type SMS Settings. Click here to know more about SMS Settings.