Generate a timeout or a delay in business rule [ Not using gs.sleep() ]

kulshreshtha
Giga Contributor

I want to pause or give delay in a business rule until a table gets a new insert.. How can i achieve this

4 REPLIES 4

Chuck Tomasi
Tera Patron

Hi Naman,



It sounds like this may be a better use case for a workflow. Can you provide the details around the requirement? What is the overall objective you are trying to accomplish?


inside business script I am waiting for aws_sns_event table to be updated so that i can call one more workflow. Only if SNS table is updated i want to call that workflow. So I want to wait for certain time to see if table is inserted with new record


Hi Naman,



Thanks for the information. There is no built in timeout mechanism in business rules. Their primary objective is to react to database triggers (insert, update, create, delete) and perform an action based on those triggers.



My first inclination is to use a timer activity on a workflow. If the time expires and the record has not yet been created, then you can do what you need to do.


Katiria Nunez
Kilo Contributor

You can try adding setTimeout(1000) to your code.  The number in the parentheses is in seconds.