Symptom
When trying to update a workflow for concurrent employment customer is receiving the following error:
"Error : Error occurred when creating workflow with empty workflow step"
Environment
Employee Central - Workflow
Employee Central - Contingent Worder
Reproducing the Issue
In this scenario the workflow only has 1 approver step. The approvers for this step are in dynamic group is X.
- Configure a workflow (X) to approve Contingent Worker Transfer (as example)
- Set Dynamic group (X) to approver with "Edit With Route Change"
- User goes to workflow to approve the transfer of Contingent Employee. (at this point user can see all approvers and cc roles)
- User select update and change details in a section or field eg. change Work Schedule
- Press submit.
- Upon Approval, user cannot see any approvers or CC roles.
If the user confirms the workflow they receive the message: "Error occurred when creating workflow with empty workflow step"
However the error does not occur if the user approves the workflow without updating.
Cause
Because the workflow X was configured with option to "Edit with route Change" It is the workflow for the area that was just updated that triggers when user SUBMITS.
To check this, if you hover over the approval dialog box, you will find that the workflow set for approval is not worflow X.
Instead is the workflow for section that was being updated, i.e. Work Schedule for our example
This is because, each section or portlet in Contingent Worker page or indeed any other page may have individual wokflows configured, thus when updating such section in a workflow does trigger the approval process for that section. Where the user does not have the requisite permission to approve such update, the error will be thrown.
Resolution
If you configure workflow X with "Edit with Route Change", a route change will trigger to approve workflow Y after UPDATE of section Y within workflow X, and if user does not have the requisite permission to approve such update, the error will be thrown.
To avoid this, If you don't want to trigger any workflow on update. Please select the option to "Edit without route changes".
NOTE:
In the above example the user updated only one section. However update of mutiple sections will behave in the same way, the only difference could be that a different workflow can be triggered because there could be a possibility that some other business rule condition may match and trigger a different workflow.It all depends on how the business rules are configured to trigger the workflow.
Keywords
"Edit with Route Change", "Edit without route changes", Contingent Worker, "Error occurred when creating workflow with empty workflow step", Workflow, , KBA , LOD-SF-EC-WFL , Workflows - Configuration, Tools, Objects & Rules , Problem