Issue
- Intermittently the workflow does not run even though the conditions are met
- Workflows on record insert are not triggered
STEPS TO REPRODUCE:
- Create a workflow on [incident] table
- With the following conditions:
- short description "start with" "abcdef"
- assignment group "is" "Software"
- Enable OOB assignment rule "Database or Software"
- create an incident record, where the short description is "abcdef" and set the category to "software"
- notice that the newly created incident, the short description is "abcdef" and assignment group is "software"
UNEXPECTED BEHAVIOR:
intermittently the workflow we created does not launch
EXPECTED BEHAVIOR:
the workflow should launch all the time
Cause
- both the workflow engine and the assignment engine are Before engines.
- and based on the documentation "are not executed in any specific order"
- So this means that the workflow engine might evaluate the task record before the assignment rule assigns the group to the task
- and this is why the workflow is not firing
Resolution
- you can do is defer the workflow after the DB operation.
- You can do that by checking off the "Run after bus. rules run" field on the workflow's properties (see image below).