how to keep waiting the business rule for some time.

hima6
Mega Expert

Hi,

i have an update business rule which has to trigger after 3 minutes of ticket creation. how can i achieve this ?

Regards,

Hima Pallela.

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Gurpreet07
Mega Sage

Hi Hima,



Either use async business rule for this purpose or use script action.


To use script action create a new event and then configure a script action for that event.Then fire that event from business rule. Now in script action script you could use gs.sleep()         -please refer the 1st link provided by Pradeep.


Agree with Gurpreet. The best way would be to factor your code to be asynchronous and use callbacks.


Also please note that gs.sleep() will not work for scoped applications.


yetesh_ch
ServiceNow Employee
ServiceNow Employee

Yes, gs.sleep(180000) will work.