<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question can I use the SetTimeout() function within a business rule, or something equivalent? in SPM forum</title>
    <link>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993768#M10416</link>
    <description>&lt;P&gt;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. &lt;BR /&gt;&lt;BR /&gt;Thanks for the help.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Dec 2011 20:44:54 GMT</pubDate>
    <dc:creator>Jason Stephens</dc:creator>
    <dc:date>2011-12-05T20:44:54Z</dc:date>
    <item>
      <title>can I use the SetTimeout() function within a business rule, or something equivalent?</title>
      <link>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993768#M10416</link>
      <description>&lt;P&gt;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. &lt;BR /&gt;&lt;BR /&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2011 20:44:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993768#M10416</guid>
      <dc:creator>Jason Stephens</dc:creator>
      <dc:date>2011-12-05T20:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: can I use the SetTimeout() function within a business rule, or something equivalent?</title>
      <link>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993769#M10417</link>
      <description>&lt;P&gt;setTimeout is client side javascript. You should be able to use 'gs.sleep()' though.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Dec 2011 20:47:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993769#M10417</guid>
      <dc:creator>Mark Stanger</dc:creator>
      <dc:date>2011-12-05T20:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: can I use the SetTimeout() function within a business rule, or something equivalent?</title>
      <link>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993770#M10418</link>
      <description>&lt;P&gt;Parameter is in milliseconds. So gs.sleep(5000); will give you a 5-second pause.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Dec 2011 21:12:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993770#M10418</guid>
      <dc:creator>CapaJ</dc:creator>
      <dc:date>2011-12-05T21:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: can I use the SetTimeout() function within a business rule, or something equivalent?</title>
      <link>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993771#M10419</link>
      <description>&lt;P&gt;I'm just curious - do you know why it is that you need to pause?&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Dec 2011 17:03:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993771#M10419</guid>
      <dc:creator />
      <dc:date>2011-12-13T17:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: can I use the SetTimeout() function within a business rule, or something equivalent?</title>
      <link>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993772#M10420</link>
      <description>&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Jason&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Dec 2011 17:36:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993772#M10420</guid>
      <dc:creator>Jason Stephens</dc:creator>
      <dc:date>2011-12-13T17:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: can I use the SetTimeout() function within a business rule, or something equivalent?</title>
      <link>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993773#M10421</link>
      <description>&lt;P&gt;&lt;A title="Mark Stanger" href="https://www.servicenow.com/community?id=community_user_profile&amp;amp;user=eb409229db581fc09c9ffb651f9619d4" __default_attr="2094" __jive_macro_name="user" class="jive_macro_user jive_macro" data-objecttype="3" data-orig-content="Mark Stanger" style="color: #2989c5; font-size: 13.3333330154419px;"&gt;Mark Stanger&lt;/A&gt;, I also had a need for this in a custom application that we are building out.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I had a question about it though, that may seems like a crazy question, but I have to make sure.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;doing&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1425954049541738" jivemacro_uid="_1425954049541738"&gt;
&lt;P&gt;gs.sleep(5000);&lt;/P&gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;only pauses the execution for the executing code, and NOT other code that is being executed, correct?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Mar 2015 02:20:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993773#M10421</guid>
      <dc:creator>kungfuu72</dc:creator>
      <dc:date>2015-03-10T02:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: can I use the SetTimeout() function within a business rule, or something equivalent?</title>
      <link>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993774#M10422</link>
      <description>&lt;P&gt;That depends on whether the other code is executing synchronously or not. &amp;nbsp; Any code after the 'gs.sleep' command will wait for the full sleep to happen first unless it's in an async business rule I believe. &amp;nbsp; Outside of that, it would be the 'order' field on a business rule for example that would control the synchronous ordering.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Mar 2015 13:10:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993774#M10422</guid>
      <dc:creator>Mark Stanger</dc:creator>
      <dc:date>2015-03-10T13:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: can I use the SetTimeout() function within a business rule, or something equivalent?</title>
      <link>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993775#M10423</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Maybe out of context, but we want to pause the notification script execution for some time. Do you think using gs.sleep() is a good idea in there?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Please let me know.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Dec 2017 13:48:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/spm-forum/can-i-use-the-settimeout-function-within-a-business-rule-or/m-p/993775#M10423</guid>
      <dc:creator>Sagar Patro</dc:creator>
      <dc:date>2017-12-28T13:48:02Z</dc:date>
    </item>
  </channel>
</rss>

