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 08:24 AM
Thanks again.
Thats fine, I've already got If condition working with more than 2 outputs by utilising the script section.
So would I do a branch after the rollback and send one to the task on one to the wait? or would I need the branch before any roll back and have 2 rollbacks be scenario?
Thanks
Sam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2018 08:29 AM
Branch from the rollback would be the way to go. All running activities are stopped after the rollback activity fires. I have not seen a rollback with multiple outputs, though, so the result may not be what you expect, though. Needs testing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 03:07 AM
Hi,
Thanks for all you sugestions so far, I've given this ago, but still have a few little nags. This is the top part of my workflow:
So I have the wait condition that runs from the beginning (across the top of the workflow, and I have the rest of my workflow going down from the bottom.
I have a field on the sc_req_item table called 'u_rollback_workflow' which is a choice lists including none, with the options of PMO, CIM Assessment, PO Assessment & IA Costs. The wait condition waits for the value to not be '--none--). The If condition then checks the value to decide the route. It then is rolling back to the required task, and also resetting 'u_rollback_workflow' to '--none--'.
The only trouble I am having is if the user is at the 3rd task (Sizing - bottom left of screenshot) and the select the PMO option it rolls back to the PMO ask (task 1) and re-opens this, but task 2 remains closed and the sizing task remains open.
I was expecting the sizing task to be placed on pending, the 2nd task to be changed to pending and the 1st task to be reopened. Having thought about this, it will be because the route to get to the rollback was not from the task executing it, but instead from the wait condition Screenshot after rollback:
Any idea on the best way to achieve what I am after? would I be best to have a script to set any tasks back to pending? or is there any way to get the workflow to go back through the tasks?
In essence it is doing what I need from a process, just not very neat at the moment.
Thanks
Sam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 06:06 AM
Hi Sam,
It's a bit difficult to see what's happening from the screens, but it looks to me like you are branching from the "PMO Branch" activity to two parallel "Rollback to" activities. That won't work; you should only be passing through a single Rollback to activity. I would say, from your "IF" activity (after the wait for fires), you should go to the "clear rollback workflow field" activity, then to the Rollback to. From there, you should connect directly to the activity you want to target for rollback as well as the Wait for condition activity. you don't necessarily need a branch activity to do that, you can just pull multiple outputs from the "Rollback to" one.
Failing that, you may have to use a script to cancel or restart the current workflow and use an IF activity up front to target the activity from which you want to restart.
Another option you may want to consider, given the complexity, is a custom app for this process. Maybe take it out of the catalog if you need higher-level business logic.
Thanks,
Nick