<?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 Re: how to start or restart a workflow context without passing stages by default in servicenow? in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017681#M674607</link>
    <description>&lt;P&gt;Have you got the solution for this??, if yes could you please provide us as we&amp;nbsp; the similar requirement where we need to restart only one workflow out of 2 workflows&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2020 04:02:49 GMT</pubDate>
    <dc:creator>rajagowthamredd</dc:creator>
    <dc:date>2020-02-21T04:02:49Z</dc:date>
    <item>
      <title>how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017674#M674600</link>
      <description>&lt;P&gt;We have a requirement where I want to restart the workflow that is already finished. We have used the script mentioned below &amp;nbsp; to restart the cancelled workflow but after restarting, the workflow is passing the stages by default.&lt;/P&gt;&lt;P&gt;var wkfw = new Workflow();&lt;/P&gt;&lt;P&gt;//var cancelflow = wkfw.getWorkflowVersionFromName('Workflow name');&lt;/P&gt;&lt;P&gt;var wfgr = new GlideRecord("wf_workflow");&lt;/P&gt;&lt;P&gt;wfgr.addQuery("name","'Workflow name");&lt;/P&gt;&lt;P&gt;wfgr.query();&lt;/P&gt;&lt;P&gt;if(wfgr.next()){&lt;/P&gt;&lt;P&gt; var wfid = wfgr.sys_id;&lt;/P&gt;&lt;P&gt; var x = new WorkflowApprovalUtils().reset(current, "res");&lt;/P&gt;&lt;P&gt; var context = new Workflow().startFlow(wfid, current, current.operation());&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To restart the workflow, we have referred to the link below &lt;A title="Restart a workflow context without affecting other workflows running on the record" __default_attr="156218" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="Restart a workflow context without affecting other workflows running on the record" data-renderedposition="304.4499816894531_370.67999267578125_526_16" href="https://www.servicenow.com/community?id=community_question&amp;amp;sys_id=b0888321db5cdbc01dcaf3231f961938"&gt;Restart a workflow context without affecting other workflows running on the record&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left; color: #666666; text-indent: 0px;"&gt;Can anyone please guide on the same?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 06:40:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017674#M674600</guid>
      <dc:creator>anjalikulkarni</dc:creator>
      <dc:date>2016-07-07T06:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017675#M674601</link>
      <description>&lt;P&gt;Two things:&lt;/P&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Is the workflow looking for conditions (e.g. populated fields, fields with certain settings, etc) that may also need to be reset (e.g. change current.state back to 1, for example)?&lt;/LI&gt;&lt;LI&gt;Have you tried restartWorkflow() instead of startFlow()? startFlow() starts a specific flow (instantiating another context on the current record). restartWorkflow() resets the one that's already there.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your solution may actually be a combination of these two.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Reference: &lt;A href="http://wiki.servicenow.com/index.php?title=Workflow_Script#gsc.tab=0" title="http://wiki.servicenow.com/index.php?title=Workflow_Script#gsc.tab=0"&gt;Workflow Script - ServiceNow Wiki&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jul 2016 08:29:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017675#M674601</guid>
      <dc:creator>Chuck Tomasi</dc:creator>
      <dc:date>2016-07-07T08:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017676#M674602</link>
      <description>&lt;P&gt;Hello Chuck,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks for reply!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;we have initially tried &lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;restartWorkflow() but this method restarting all workflows associated (currently we have two workflows on same) since the argument need to be passed to this &lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;restartWorkflow() is &lt;EM&gt;&lt;STRONG&gt;current.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;In our case, we should restart only one workflow (one context) instead of all. &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;Can you please guide us if we have any way to restart specific workflow context (instead of all)? we tried solution given from the link &lt;A title="Restart a workflow context without affecting other workflows running on the record" __default_attr="156218" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="Restart a workflow context without affecting other workflows running on the record" data-renderedposition="199_8_1025_37" href="https://www.servicenow.com/community?id=community_question&amp;amp;sys_id=b0888321db5cdbc01dcaf3231f961938"&gt;Restart a workflow context without affecting other workflows running on the record&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;but its not helpful.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;Any help would be much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;Pavan.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jul 2016 09:02:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017676#M674602</guid>
      <dc:creator>pavan_yakkala</dc:creator>
      <dc:date>2016-07-07T09:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017677#M674603</link>
      <description>&lt;P&gt;Unfortunately I don't see a way to selectively start one workflow when multiples are attached to a given record. Sorry.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jul 2016 09:11:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017677#M674603</guid>
      <dc:creator>Chuck Tomasi</dc:creator>
      <dc:date>2016-07-07T09:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017678#M674604</link>
      <description>&lt;P&gt;Hello Chuck,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Below is the way to restart a specific workflow :&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;new Workflow().startFlow(wflw.getWorkflowFromName('name of the workflow'), current, 'update');&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Khushboo&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jul 2016 09:33:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017678#M674604</guid>
      <dc:creator>Khushboo Kanouj</dc:creator>
      <dc:date>2016-07-07T09:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017679#M674605</link>
      <description>&lt;P&gt;I love this community!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jul 2016 09:44:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017679#M674605</guid>
      <dc:creator>Chuck Tomasi</dc:creator>
      <dc:date>2016-07-07T09:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017680#M674606</link>
      <description>&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Segoe UI',sans-serif; font-size: 10pt;"&gt;Hi Khushboo,&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Segoe UI',sans-serif; font-size: 10pt;"&gt;Workflow is starting with new context, &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Segoe UI',sans-serif; font-size: 10pt;"&gt;but bydefault it is passing all states/approvals. H&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Segoe UI',sans-serif; font-size: 10pt;"&gt;ow to restart/reset all approval activities before restarting of the workflow context?&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Segoe UI',sans-serif; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Segoe UI',sans-serif; font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Segoe UI',sans-serif; font-size: 10pt;"&gt;Anjali&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jul 2016 10:19:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017680#M674606</guid>
      <dc:creator>anjalikulkarni</dc:creator>
      <dc:date>2016-07-07T10:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017681#M674607</link>
      <description>&lt;P&gt;Have you got the solution for this??, if yes could you please provide us as we&amp;nbsp; the similar requirement where we need to restart only one workflow out of 2 workflows&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 04:02:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017681#M674607</guid>
      <dc:creator>rajagowthamredd</dc:creator>
      <dc:date>2020-02-21T04:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017682#M674608</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer below link might help you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=b0888321db5cdbc01dcaf3231f961938" rel="nofollow"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=b0888321db5cdbc01dcaf3231f961938&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 05:40:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017682#M674608</guid>
      <dc:creator>Himanshu Dubey</dc:creator>
      <dc:date>2020-02-21T05:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to start or restart a workflow context without passing stages by default in servicenow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017683#M674609</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried the below one?&lt;/P&gt;
&lt;DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;new Workflow().startFlow(wflw.getWorkflowFromName('name of the workflow'), current, 'update');&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;If it works, please let me know&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks,&lt;/DIV&gt;
&lt;DIV&gt;K&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Feb 2020 09:04:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-start-or-restart-a-workflow-context-without-passing/m-p/2017683#M674609</guid>
      <dc:creator>Ksnow</dc:creator>
      <dc:date>2020-02-26T09:04:00Z</dc:date>
    </item>
  </channel>
</rss>

