Posted: 10 Feb 2016 8:48 EST Last activity: 11 Apr 2017 12:30 EDT
Jump to previous step inside a stage
I have a process with 3 stages and the last stage has 3 steps in it. The process moves to Stage 3, starts step 1, navigates to step 2 from step 1 naturally. But, I have to go back to step 1 from step 2 inside Stage 3 on a condition. Can this be achieved?
Thanks in advance
***Updated by moderator: Lochan to add Categories***
I understand where you are going Phani. If that param is switched off, it will not clear the assignments and keep that step alive and then, we need to manage not to create that assignment again when it enters in step 2/ skip step 2 entirely when we come out of step 1. Either way, it will not do anything in step 2 second time. what do you think will be the behaviour of the system at that point, does that still keep the step 2 alive?
3) After step 2, I tried to call pxChangeStage and gave STAGE3 as param. This has failed as pega has a validation when process tries to jump to same stage which it is currently in (No idea why this was put in the first place !! ). So, had to copy to rule to my application and removed the validation. Called the new activity ChangeStage with param CleanUpProcess set to false.
4) This re-started the stage leaving the step 2 assignment and the step alive which gives the ability to click on the step link to open the assignment
5) After step 1 when it enters step 2 again, like you mentioned it is trying to create another pxFlow page with _1 as suffix. Now I have placed a logic to skip assignment as there is an existing assignment. So, it skips assignment and ends the process.
Step 2 assignment still exists but the step is not alive (I mean no link for it in the stage navigation panel). The reason is, when it enters step again it is creating new flow page, takes the page subscript and copies it onto the step list in the stage page. So, the link tries to look for pxFlow page with this subscript and if it finds the assignment key on it, it will show the link. As we don't have that pxFlow page anymore, the link is not showing up.
So, I had to tweak that control a bit to show the link of previous existing assignment.