Rollback to previous Activity

KristyS
Kilo Guru

!

All,

I am attempting to rollback a workflow activity to the previous activity, the rollback works as expected and reopened the task however its not rolling through the script again.     The results are the same regardless if I move from task 3 to task 1 or use the rollback activity.

find_real_file.png

Here is what I'm attempting to accomplish,

If return No,

find_real_file.png

Rollback to task 1,

If the workflow.scratch.rta_results == No, update the work notes field.

find_real_file.png

I have logged the activities and determined that in task 3 the workflow.scratch.rta_results is set to No.   During the rollback activity, the script is ignored and the request reopened.

How do I accomplish this?

Any help on this is much appreciated. @

1 ACCEPTED SOLUTION

KristyS
Kilo Guru

I got this figured out!  



I used this blog to determine how to handle the rollback activity.



https://community.servicenow.com/message/1211937?et=watches.email.thread#1211937


View solution in original post

6 REPLIES 6

Chuck Tomasi
Tera Patron

Have you tried using the Roll Back To activity instead of directly going back to the activity?



Rollback To Activity


Chuck,


I have attempted to use the rollback activity and the results are the same. The previous task reopens but the script is bypassed.



Kristy Stevens


IT Department


Is that workflow scratchpad variable getting set to what you expect?        


Chuck,


The scratchpad is being logged in tsk 1 and tsk 2.



The initial pass in tsk 1 its being logged as undefined since the var is empty. In tsk 2, the scratchpad is being logged as no.



When tsk 1 is reopened, the scratchpad is not being logged which tells me the script is not running on the rollback activity.



Do you have a suggestion of another way to accomplish the same concept?



During the rollback I wanted to update task 1 that the task was rejected so that these task do not get into a loop.



Kristy Stevens