[ wait for condition] or[ wait for duration] Is there a scripting API like Flowlogic?

bonsai
Mega Sage

I use "gs.sleep()".

But it seems that it is not recommended.

 

Flows Best Practices Variables and Scripting - Wor... - ServiceNow Community

 

I'm told to use [wait for condition] or [wait for duration], but the flow specification doesn't allow me to achieve my requirement.

Are there any APIs available in scripts that can replace [wait for condition] or [wait for duration]?

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@bonsai 

you can use Do Until flow logic which will keep on running till your condition becomes true

once the condition becomes true it will break and continue to the next step in flow

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Is this an action or flow logic to be used within a flow?

I asked the wrong question.
I want to implement it as a script that can be used in business rules, etc.

@bonsai 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader