How do Workflow Rules work
This article gives an overview of the Workflow Rules Manager and how it works.
Please go to the article: ‘How to set up Workflow Rules’ for a step-by step guide in setting up a rule.
This article covers
- What are Workflow Rules
- Where are Workflow Rules Managed?
- Initial Set—up and Permissions
- How Rules work
- Workflow Rules Log: Messages
- FAQs
Watch our Lunch & Learn webinar to find out more about Workflow Rules:
Workflow Rules are a tool for system administrators to define advanced rules that allow you to automate aspects of your processes that are not covered by the default org-united based assignment and approval processes.
With the current version of the Workflow Rules Manager you can define rules that assign the submitter and set the approver for an incident record either at creation or edit of the record, based on a set of criteria.
This allows you to direct incident records to different people in the Assure workflow, for those cases where the different people need to be involved in managing an incident, not just those set as part of the default assignment and approval processes.
Typical use cases:
- Different approvers should be used depending on incident severity, for examples for a high-severity vs low-severity incident.
- Different approvers should be used depending in incident type, for example for an environmental incident
Workflow Rules should be used to complement the standard approval and assignment process.
Check out this article on how to configure approval setting per module.
WHERE ARE WORKFLOW RULES MANAGED?
Workflow Rules can be accessed through System settings by system administrators, where they’ll find two new options:
- Workflow Rules Management: Here you create new rules or edit existing rules.
- Workflow Rules Log: Here you can monitor the outcome of a rule after it has been executed.
These options are only available to system administrators after the supervisor privileges have been updated (see below).
INITIAL SET UP & PERMISSIONS
To access Workflow Rules Management when it is released, the supervisor privilege will need to be updated to allow the new permission. Once it's enabled, users with that supervisor privilege will be able to access the Workflow Rules Management page.
To use Workflow Rules, you must have the workflow enabled both in the system settings, and for the module. After enabling the settings, you will immediately be able to create workflow rules. However, the system takes 120 minutes to recognise an update to this configuration, so if you enable the approvals process, please wait 120 minutes before expecting a rule to be executed. This delay only applies at initial set-up.
- Enable workflow in System Settings:
Go to Settings > System Settings
Ensure that ‘Is Approval Used’ is checked.
- Enable workflow in module settings:
Go to Setting > Module Setup
Edit Incident Record settings and ensure that in Approvals ‘Is Approved Used?’ is checked.
- Update Supervisor Privilege
The ability to create rules is a permission in Supervisor Privilege.
Check out this article about Supervisor Privileges
To update Supervisor Privileges go to Settings > Organisational Configuration > Supervisor Privilege
For any user group that you want to manage Workflow Rules and access the Workflow Rules log, set Manage Workflow Rules to ‘Allow’.
You can view the Workflow Rules Log page if you have the permission to ‘Manage Workflow Rules’ (as above) or the permission to view the System Logs. This means that if you are building rules, you can see them executing the outcome, or if you have permission to view the wider system logs you can see the full audit history if rules have been executed.
HOW RULES WORK
Before you start building workflow rules you need to define your assignment and approval process to ensure rules are built at the right organisational level.
The default approval and assignment process based on organisational units should be used for your main process flow, rules can then be added for the exceptions to that process.
Example:
John is the manager of Site A. He is set up to be assigned incidents logged at his site as he must investigate them. He investigates most of the incidents which occur on his site.
John does not investigate property damage incidents, these must be investigated by George the Buildings Manager, so a rule can be set up to assign any incident categorised as property damage to George.
If an incident is high severity, this must be investigated by Steph the Health and Safety Manager, so a rule can be set up to assign high severity incidents to Steph.
HOW ARE WORKFLOW RULES APPLIED?
- By default rules are applied in sequential order which means date order of creation of the rules.
The rules will run in date order, oldest to newest, so the most recent rules will take priority.
Example:
- Rule 1: A rule has been set up to assign any property damage incident to George the Building Manager.
- Rule 2: Another rule is set up to assign any high severity incident to Steph the Health and Safety Manager.
- Rule 1 was set up before Rule 2.
- If a property incident is logged as high severity, this will be assigned to Steph, the Health and Safety Manager as Rule 2 is the most recent rule.
It is possible to reorder rules which will change the sequence in which they run. Rules will run from top to bottom. This will be useful if you need to add new rules or change the sequence of existing rules.
- Rules are not reversed
Once a rule has run it does not reverse, so you may need to set up different rules to cater for different options.
Example:
- John is the manager of Site A. He is set up to be assigned incidents logged at his site as he must investigate them. He investigates most of the incidents which occur on his site.
- However, if an incident is high severity, this must be investigated by Steph the Health and Safety Manager, so a rule can be set up to assign high severity incidents to Steph.
- If the incident is later reclassified as medium severity, a rule needs to be in place to assign this incident to John, or alternatively Steph can reassign the record manually to John.
- Workflow Rules take priority over default workflow approval settings
The workflow rule will have priority over other default approval settings:
After a record has been created the default assignment and approval settings will be immediately applied to the record.
Depending on your settings this may be
- Auto Assign a record based on default approval settings
- Manual assignment of a record in Assure or on AssureGO+ (see below for details)
- No assignment
Workflow Rules will be applied immediately after record creation and if a rule with matching criteria is in place the submitter and/or approver will be updated.
As soon as a workflow rule assigns a record to a user, that user will receive the standard assignment email. The Approver will not receive an email until the record has been submitted to them.
- Allow manual override of workflow rules
As default, if a record is manual assigned or re-assigned, the system will check if a workflow rule is triggered. The workflow rule will take precedence.
You can you give your users the option to override workflow rules when manually assigning or re-assigning records. This only applies to users that have permission to re-assign.
Allowing to override a workflow can be set up in Settings > Module Set up > Incident Record.
- Allow override of rule outcome assignee: ticking this box will give your users the option to override any workflow rules.
- Allow override of rule outcome approver: This allows users to change an approver before submitting the recording, that may differ from the workflow rule.
1. Allow override of workflow rule for assignee
When a user re-assigns a record, and the option to override it enabled as in the image above, they will have the option to stop to override the workflow rules.
When assigning a record the following option will appear: ‘Override workflow rule for assignee field’
- If the user selects the box ‘Override workflow rule for assignee field’ no workflow rules will be applied, and the record will remain with the user who has been manually selected.
- If the user doesn’t select the box, the system will check for any workflow rule and apply those, reassigning the record to the user allocated in the workflow rule.
2. Allow Override of workflow rule for approver
If the option to ‘allow override the workflow rule for outcome approver’ is enabled, the user will be able to select a different approver from the list instead of the approver being pre-selected based on the rule and fixed. You will see on the screenshot that the user selector is available:
WORKFLOW RULES LOG: MESSAGES
In the workflow rules log you can see the outcome of a rules after it has been executed.
If a rule has been executed any of these messages may be displayed
- Outcome executed for rule {RULE NAME}. Designated approver set for record {MODULE} - {RECORD REF}.
- Outcome execution for rule {RULE NAME} was successful. Assignee and Approver changed for record {MODULE} - {RECORD REF}.
- Outcome executed for rule {RULE NAME}. Assignee stayed the same but due date was changed for record {MODULE} - {RECORD REF}.
- Outcome executed for rule {RULE NAME}. Assignee set for record {MODULE} - {RECORD REF}.
If a rule cannot be executed any of these error messages may be displayed
- Outcome execution for rule {RULE NAME} was unsuccessful. Module or approval system is not enabled for {MODULE}.
Check that the approval process is enabled in the incident record module
- Outcome execution for rule {RULE NAME} was unsuccessful. Configured user does not have permissions to become the approver for record {MODULE} - {RECORD REF}. à Check the permission for the user selected as the approver in the rule. The permission to approve records may have been removed from that user. Either update the user permissions or select a new user as the approver in the rule.
- Outcome execution for rule {RULE NAME} was unsuccessful. Designated approver is the same in record {MODULE} - {RECORD REF} as configured in rule. à No action needed. Correct approver was already applied.
- Outcome execution for rule {RULE NAME} was unsuccessful. Configured user does not have permissions to be assigned to record {MODULE} - {RECORD REF}. à Check the permission for the user selected as the assignee in the rule. The permission to be assigned records may have been removed from that user. Either update the user permissions or select a new user as the assignee in the rule.
- Outcome execution for rule {RULE NAME} was unsuccessful. Assignee is the same in record {MODULE} - {RECORD REF} as configured in rule.
No action needed. Correct assignee was already applied.
- Rule {RULE NAME} should have executed an outcome. The approvals process was turned off when this record was created. Record {MODULE} - {RECORD REF} will need to be manually assigned to allow outcomes to be executed.
The approval process was not turned on when the record was created, a rule should have set the assignee or approver but is not able to. In order to allow the workflow rules to execute outcomes against this record you need to manually assign the record, so it enters the workflow. Rules will then be able to execute against the record.
- Outcome execution for rule {RULE NAME} was unsuccessful. Record {MODULE} - {RECORD REF} is already {Approved}.
An approved record was edited and met the criteria of a rule based on edit. The rule will not allocate an assignee or approver as the record is already set to approved.
- Outcome execution for rule {RULE NAME} was unsuccessful. Internal processing issue. This error message can have various reasons. Please check that all the approval processes are enabled and that the rule is set-up as expected. If the error persists, please contact Evotix support including the error message.
FAQ
Q: What happens if someone’s permissions change and they are the assignee in the rule?
A: If a record meets the criteria of a rule, the rule will try to execute the outcome. If the user’s permission has changed, and they no longer have permission to view the record, the rule will log in the Rules Log that it should have executed an outcome but was unable to for the above reason.
Q: I do not have access to the Incident Record data, can I still build rules?
A: Yes, you do not need access to the module data to build rules. Building rules does not expose module data, it exposes the fields to allow you to create the filter criteria.
Q: I cannot see the person I expect on the assignee or approver list
A: Check the user permission, do they have ‘assign’ or ‘approve’ in their role, and do they have access to the right org units (including children)
Q: I enabled the approval process, and the workflow rules manager is not executing outcomes where records meet the criteria
A: The rules engine needs 120 minutes to pick up new configuration. Please wait 120 minutes and then the rules engine will execute outcomes on new records.