
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2015 06:01 PM
I have a main sub flow that branches into multiple sub flow (e.g., emergency, standard, normal, etc). Each of those subflows will branch into a 3rd level of subflows that have approval boxes, with timers and reminder emails. What I'm wanting to do, is have a rollback situation where in the 3rd level, if an approver rejects the CR, it rolls back to the very beginning of the subflow so that my CR is in a status of "Not Requested."
But, I'm not able to connect a Rollback To activity from 3rd level subflow to 1st level. So, what I did instead, was create a Set Variable in the 3rd level to put the Approval to "Not Requested." Then, the flow should bubble back to parent subflows and just end because the flow only progresses along if the Approval stays in a status of "Requested." But, ServiceNow seems to be changing my CR Approval field to rejected even though I'm purposefully setting it to "Not Requested" with a Set Variable box. Is this a bug or a wrong approach on my part?
Thanks in advance for help.
Todd
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2015 09:47 AM
I'll answer my own question here. I was able to accomplish this by adding a switch statement just before the approval box in the 3rd level sub flow. When approver rejects, I update cr.approval to "Not Yet Request", invoke a "Rollback To" activity that goes back to switch box just before approval. This switch box has an option for "Not Yet Requested" that basically ends the sub flow.
The second level also ends based on this cr.approval status and finally the parent checks this value too. If it's equal to cr.Not Yet Requested, it put itself in a Wait For Condition mode until the CR again becomes "Requested." Then the workflow starts again from the top. Seems to work as I need it.
Todd

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2015 09:47 AM
I'll answer my own question here. I was able to accomplish this by adding a switch statement just before the approval box in the 3rd level sub flow. When approver rejects, I update cr.approval to "Not Yet Request", invoke a "Rollback To" activity that goes back to switch box just before approval. This switch box has an option for "Not Yet Requested" that basically ends the sub flow.
The second level also ends based on this cr.approval status and finally the parent checks this value too. If it's equal to cr.Not Yet Requested, it put itself in a Wait For Condition mode until the CR again becomes "Requested." Then the workflow starts again from the top. Seems to work as I need it.
Todd