<?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 Restart workflow from background script in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/restart-workflow-from-background-script/m-p/2251353#M902457</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to restart a workflow running on a custom table to restart from background script. Workflow restart function call accepts current object of type GlideRecord but the challenge is how to call the current object in background script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could someone share any pointers on this.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jan 2019 18:34:26 GMT</pubDate>
    <dc:creator>G Balaji</dc:creator>
    <dc:date>2019-01-28T18:34:26Z</dc:date>
    <item>
      <title>Restart workflow from background script</title>
      <link>https://www.servicenow.com/community/developer-forum/restart-workflow-from-background-script/m-p/2251353#M902457</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to restart a workflow running on a custom table to restart from background script. Workflow restart function call accepts current object of type GlideRecord but the challenge is how to call the current object in background script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could someone share any pointers on this.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 18:34:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/restart-workflow-from-background-script/m-p/2251353#M902457</guid>
      <dc:creator>G Balaji</dc:creator>
      <dc:date>2019-01-28T18:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Restart workflow from background script</title>
      <link>https://www.servicenow.com/community/developer-forum/restart-workflow-from-background-script/m-p/2251354#M902458</link>
      <description>&lt;P&gt;Here is an example script&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var gr = new GlideRecord("change_request");
gr.addQuery("sys_id", "fbeb1a480fd76b40e1f30dbce1050e42");
gr.query();
if (gr.next()) {
new Workflow().restartWorkflow(gr);

}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Jan 2019 18:38:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/restart-workflow-from-background-script/m-p/2251354#M902458</guid>
      <dc:creator>dvp</dc:creator>
      <dc:date>2019-01-28T18:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Restart workflow from background script</title>
      <link>https://www.servicenow.com/community/developer-forum/restart-workflow-from-background-script/m-p/2251355#M902459</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Below is an example :&lt;/P&gt;
&lt;P&gt;var gr = new GlideRecord('whatever_table');&lt;/P&gt;
&lt;P&gt;if(gr.get('whatever_sys_id')){&lt;/P&gt;
&lt;P&gt;write your wf restart code here and instead of current pass gr.&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 18:39:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/restart-workflow-from-background-script/m-p/2251355#M902459</guid>
      <dc:creator>rahulpandey</dc:creator>
      <dc:date>2019-01-28T18:39:57Z</dc:date>
    </item>
  </channel>
</rss>

