workflow reset/rollback
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2018 05:12 AM
Hi All,
I am in the middle of creating a complex workflow. As part of this there are several defined points where the workflow may need to loop back to an earlier stage. For these I am using the rollback function.
However as part of the process there could be occasions where at random points of the workflow it may need to go back to an earlier stage. These however are not easily defined - is there anyway to cater for this?
The only thing I have found is to create a UI action to reset the entire workflow back to the beginning. Are there any other solutions to this or will this be the closest I can get?
Thanks
Sam
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2018 07:16 AM
Hi samogden,
Usually, if you need automatically go back to previous state, workflow should include 'Rollback to' activities.
For more information please refer the link below:
Rollback To workflow activity

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2018 07:28 AM
You can have a branch of your workflow with a "wait for condition" or "wait for workflow event" (some sort of wait) that sits alongside the main workflow and is always watching. This can handle an event at any point in your workflow (the "random points" use case). The output of this activity can point to a "Rollback to" activity and then you can proceed back to the point in the workflow you want.
BUT, you still need a trigger to fire this activity. There must be a definite way to identify when the workflow should roll back.
The "not easily defined" condition is going to be a challenge. I would maybe recommend a variable visible only to fulfillers that could be used to identify a need to roll back. That way it can still be specific to the item (i.e. you do not need a UI action).
Alternatively, you could maybe use the state of a catalog task at closure. If a catalog gets closed with a state of "Closed Incomplete," for example, then you would transition to your "Rollback to" activity from there.
Keep in mind that workflows are designed for structure. You need to plan that structure into the process outside the system and reduce as much complexity and uncertainty as possible for a successful workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2018 08:08 AM
Hi nyancer3,
Thanks for the above suggestion, I think this could work for me.
My idea is to have a new field with the option of the tasks that the workflow creates e.g.:
-Task 1
-Task 2
- Task 3
etc
Then the wait condition for this field to change from blank to one of the options.
Following this an if condition with an option for each task. Then a rollback to the relevant task from the answer form the if statement, something like the following diagram:
Is this what you were suggesting and would this be ok?
This would work for a single loop, is there anyway that if the wait for trigger is executed, and it loops back to a certain task that the wait condition can be reset so if it needed to loop a second time (not always back to the same task as the first loop) this would be possible?
Thanks
Sam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2018 08:14 AM
That looks like it would work. Just keep in mind that the IF condition results in a Yes or No (only two outputs possible). You might be able to branch back to the "wait for condition" from your rollback activities (you can have multiple outputs from a single activity), but you may want to test that.
Interested to see how that goes for you.