The Rules tab of the example_rules.xlsx file contains a matrix of workflow rules that will be imported. The rules matrix maps the rules assigned to each operation to the actions for that rule. You can modify existing rules or add more rules, but you cannot add new action types (the list of action types is fixed).
Each rule contains:
- a unique workflow + state + operation combination that triggers the rule (only one combination will trigger a specific rule)
- one or more sequential actions
- optional conditions
When the user selects an operation for a document in a particular workflow state, the user is first prompted with a Yes / No confirmation dialog to continue with the selected operation. Assuming the user clicks Yes to continue, the rule that is configured for that particular workflow + state + operation combination is triggered, and the actions in that rule are run on the selected documents. If there are any conditions specified in the rule, the actions in the rule will not be performed and the user will receive an error explaning what conditions need to be met.
|Workflow (Header A6)||Defines the name of the workflow associated with this rule.|
|State (Header B6)||Defines the name of the state associated with this rule.|
|Operation Type (Header C6)||Defines the name of the operation associated with this rule. Maps to an Operation enabled for the defined Workflow in the Operation Type sheet|
|Prompt (Header D6)||The message text that appears on the confirmation dialog a user receives when the operation is selected.|
|ID (Header E6)||The unique identifier for the rule or the action. Column E7 and downward defines the unique identifier for each rule in the sheet. Row 6 starting at column F defines the unique identifier for each action. Row 6 starting at column AK defines the unique identifier for each condition.|
|Type (Row Header E5)||Row F5 onwards defines each individual action or condition.|
|Param1, Param2 (Row Headers E3 & E4)||Rows F4 and F3 define Parameters 1 and 2 for each Action or Conditon.|
|Super User (row Header E2)||Row F2 onwards defines whether a Super User is enabled for an action. Where this is set to true, the Super User is used instead of the current user. Not used for Conditions.|
|Actions (Header F1)||Each Action is defined from column F onwards. The last column after the Actions Column is Conditions.|
|Conditions (Header Depends on number of actions)||When each Action ID has been defined in Row 6, the Condition IDs start.|
Defining the Action Order
The Actions section of the matrix defines which actions are included in the rule, and the order in which these actions are run. Specifically, a number is placed under each action, according to the order in the sequence that the action is to be run.
The Conditions section of the matrix defines which optional conditions are included in the rule, and the order in which these condition checks are run. Just like actions, a number is placed under each condition, according to the order in the sequence that the condition check is to be run.
In the delivered example rules, rule 1 has six actions to run, and also four conditions to check if specific attributes are empty (if any are empty, the operation will fail).
- Workflow: Rules Engine Workflow
- State: Draft
- Operation: Approve
– Action 1: Set Attribute TRIG_SUBMITTED to 1
– Action 2: Clear Attribute RejectedBy
– Action 3: Clear Attribute DateRejected
– Action 4: Clear Attribute Remarks
– Action 5: Set Attribute PercentComplete to 50
– Action 6: Change State to Pending Approval
– Condition 1: Make sure Title attribute is not empty
– Condition 2: Make sure Scale attribute is not empty
– Condition 3: Make sure DesignedBy attribute is not empty
– Condition 4: Make sure CheckedBy attribute is not empty