can I use the SetTimeout() function within a business rule, or something equivalent?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 12:44 PM
Does the SetTimeout() function work in a business rule as it does in a client script? I know there are things that will/will not work between the two. Basically I need to add a delay within a business rule before I manipulate a field.
Thanks for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 01:12 PM
Parameter is in milliseconds. So gs.sleep(5000); will give you a 5-second pause.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2011 09:03 AM
I'm just curious - do you know why it is that you need to pause?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2011 09:36 AM
We have a business rule that, when it finishes/updates, triggers an outbound update to Omnibus. In that business rule, we are appending an "-x" to the correlation ID field in the incident to signify closed to Omnibus. Basically the "-X" causes the correlation ID to NOT match any inbound ID's from Omnibus, so we know to create a new incident.
We need the pause before the field update to allow the outbound message to be sent to Omnibus before the "-X" is added. If the "-X" is added before the update, then Omnibus is confused because the correlation ID doesn't match any that it has out there.
This is a very roundabout way to id, but due to the implementation of Omnibus in our environment, this is the way we are trying to do it.
I'm open to suggestions - I actually have another post asking if anyone can help me remove the "-X" in the outbound message before it send to Omnibus. I don't know enough about this piece of code to make that happen, so the only other way I could fiuyre to do it was to delay the field update until the message got sent.
Jason