Change stage not behaving correctly
When you use change stage, system must route the control to the selected stage.
System is routing control to that desired stage but if it still executing process below:
Stage 1 Stage 2
If process 1 in stage 2 has change stage flow action, it is routing the work item to stage 1 and starting execution of processes one by one untill it finds the next assignment, but after finding the assignment control is returning and sexecuting the Process 2 of stage 2.
Steps to Reproduce
- Create 2 stages with 2 processes each.
- Create an assignment in stage 2 - Process 1 and add the flow action pyChangeStage.
- Execute the flow action so that the process moves to stage 1. The system should not execute Process 2, but it still does.
The root cause of this problem is a defect in user's application code. User must change the design configuration.
This issue is resolved through the following local-change:
1. Use launch on re-entry setting on the stage 1 to restart the Stage1>Process1.
2. Select the checkbox illustrated in the below screenshot. You are seeing the assignment of Stage2>Process2 because the Stage2>Process1 assignment processing is complete so there is no issue.
After setting the launch on re-entry on stage 1 this issue is resolved.
Use a smart shape for changing stage instead of a local action since smart shapes have the option to 'close all the assignments in the current stage'. After checking this check box you could able to see only the assignment of routed stage.