How to Go back to a particular workflow step when the state of a record is moved back to the previous step
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2019 03:19 PM
I have an application that has a workflow behind it. The Process flow has 6 states. The states are Analyze, Schedule, Code, QA,UAT,Stabilize. There are Related lists for Code,QA,UAT tasks. All the child tasks are on same table. When the coding child task is completed the parent moves to QA state. and When QA Child task is completed parent moves to UAT . And similarly when UAT child task is completed the parent moves to Stabilize. All this is driven through workflow. Now the requirement is that when the Parent is in Stabilization and if either QA or UAT child task is moved back to active the Parent also should adjust similarly and go back to that particular state . And again the workflow should work along as they complete again the tasks .
Any idea how would this be achieved, I have written a business rule for the first task ( moving back to the state) . But i am not sure how to move the workflow also back to that particular step
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2019 05:35 PM
Hi,
You'd use a rollback activity as seen in the documentation here: https://docs.servicenow.com/bundle/london-servicenow-platform/page/administer/workflow-activities/re...
But you'd have to build in the steps to roll it back. So after each task is complete, it may need to pass through an if activity and if yes, do rollback and the rollback would need to check against the ending task state to see if it needs to go back just one step, or many, and if no, move forward. You should be able to have the same if activity off to the side, and then each time the task is complete you draw a line to this if activity and rinse and repeat after each one.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!