This content has been marked as final. Show 4 replies
In the entry event for the step, you can check if the metadata field is set to a specific value and if it is, use the wfSet function to jump to another step.
For example, the following step entry script sends documents in the Secure security group to the next step in the workflow:
<$if dSecurityGroup like "Secure"$>
I have tried that and it seems to just still go into that step
(The entry script of the step I'm trying to skip)
<$if xYesNoMetadata like "No"$>
<$wfSet("wfJumpTargetStep", wfCurrentStep(1))$> [[%In the test tab this shows up "wfJumpTargetStep=Next_Step@My_Workflow"%]]
[[%stuff to do if the Metadata field was "Yes"%]]
I also stuck the line "<$wfSet("test", "Hi there")$>" to see if it popped up in the test tab to see if it was going in that block of code, and it's going in no problem.
Oddly enough the step with "<$wfSet("wfJumpTargetStep", wfExit(0,0))$>" works fine like it is suppose to. It was a copy paste of the script I'm having issues with :/.
Edited by: JTyson on Nov 15, 2012 5:43 AM
I have tried that and it seems to just still go into that stepTechnically speaking, it must go into the step (i.e. the step will be listed in the Workflow History), because you reach the Entry event, don't you? It should not, however, notify the approvers, nor step into further events (Update).
If you want to step over the step, you need to move your logic to the Exit event of the previous step. The 'pro' of this approach would be that you don't need to bother with rejections (what if you reject your item within the next step you jumped onto?), the 'con' is that for the first step no previous step exists (or to be precise, a previous step that you may modify).