Please help me create workflow loop

Joshua Comeau
Kilo Sage

The way I have it currently working is 

 

"do X".  They close task X, which generates "validate X".  If we close that out as incomplete,

 

I'd like to go back to "do X", which when they close it, generates another "validate X"

 

and loop/repeat

 

WF:

JoshuaComeau_0-1678382545780.png

the if activity has a script of the following

JoshuaComeau_1-1678382571050.png

based on the current wf and script 

 

so, when I run a query on short description or the state it will only just re-open the tasks do not generate a new one do you know which workflow activity or script, I should use for it to create tasks? or re-play the workflow but not re-use/re-open the tasks.

1 REPLY 1

Allen Andreas
Administrator
Administrator

Hi,

This is a duplicate post: https://www.servicenow.com/community/cmdb-forum/how-to-write-a-script-or-wf-cores-to-perform-a-loop/... 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!