<?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: Test  workflow  to run without need to create request item in ServiceNow AI Platform forum</title>
    <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022208#M4586</link>
    <description>&lt;P&gt;You can use Workflow methods to associate workflow with existing RITM for testing. here is the sample code.&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var wf = new Workflow();
var context = wf.startFlow(&amp;lt;sys_id_of_workflow&amp;gt;, GlideRecord Object, 'record operation'); //record operation could 'insert' | 'update' etc.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here you can read through the documentation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.servicenow.com/dev.do#!/reference/api/orlando/server_legacy/c_WorkflowAPI" target="_blank" rel="noopener noreferrer nofollow"&gt;Workflow API&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Please mark this ACCEPTED &amp;amp; HELPFUL if it helps.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Sharjeel&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jun 2020 23:38:18 GMT</pubDate>
    <dc:creator>MrMuhammad</dc:creator>
    <dc:date>2020-06-12T23:38:18Z</dc:date>
    <item>
      <title>Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022204#M4582</link>
      <description>&lt;P&gt;I need to test the workflow.&amp;nbsp; I have hardcoded data in runscript to start. Is it possible to test workflow without having to create a catalog item and assign workflow and then create RITM? Appreciate it. If not any shortcuts to test workflow to minimize steps as much as possible.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 23:16:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022204#M4582</guid>
      <dc:creator>Giri6</dc:creator>
      <dc:date>2020-06-12T23:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022205#M4583</link>
      <description>Well we don't have such functionality to run a workflow without attaching to any record. However for the quick testing you can attach it to any catalog item and order the item from portal.</description>
      <pubDate>Fri, 12 Jun 2020 23:20:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022205#M4583</guid>
      <dc:creator>AlokD6499012040</dc:creator>
      <dc:date>2020-06-12T23:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022206#M4584</link>
      <description>Also, If you have only the run script activity in workflow and since you mentioned that you have hardcored the run script. Alternatively you can test the script im background scripts which would be more convenient way to test the script.... Please note that the current will not be working im background scripts since current picks up the current record object and its not present in background scripts execution.</description>
      <pubDate>Fri, 12 Jun 2020 23:24:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022206#M4584</guid>
      <dc:creator>AlokD6499012040</dc:creator>
      <dc:date>2020-06-12T23:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022207#M4585</link>
      <description>&lt;P&gt;Giri,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you looked into Automated Test Framework yet? if not I would recommend taking a look.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Steve&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 23:32:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022207#M4585</guid>
      <dc:creator>SW7</dc:creator>
      <dc:date>2020-06-12T23:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022208#M4586</link>
      <description>&lt;P&gt;You can use Workflow methods to associate workflow with existing RITM for testing. here is the sample code.&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var wf = new Workflow();
var context = wf.startFlow(&amp;lt;sys_id_of_workflow&amp;gt;, GlideRecord Object, 'record operation'); //record operation could 'insert' | 'update' etc.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here you can read through the documentation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.servicenow.com/dev.do#!/reference/api/orlando/server_legacy/c_WorkflowAPI" target="_blank" rel="noopener noreferrer nofollow"&gt;Workflow API&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Please mark this ACCEPTED &amp;amp; HELPFUL if it helps.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Sharjeel&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 23:38:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022208#M4586</guid>
      <dc:creator>MrMuhammad</dc:creator>
      <dc:date>2020-06-12T23:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022209#M4587</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; Cam I use this in fix script?. Do I need to create new&amp;nbsp; GlideRecord for example sc_req_item everytime I run?&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2020 19:26:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022209#M4587</guid>
      <dc:creator>Giri6</dc:creator>
      <dc:date>2020-06-13T19:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022210#M4588</link>
      <description>&lt;P&gt;Hi Giri,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yeah. You can use it in any server side script i.e Fix script, background script, Business rule or Scheduled job etc. yes you need to create GlideRecord object for sc_req_item and pass it in the startFlow function as a second parameter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark this accepted and helpful if your question has been answered.&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;Thanks!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2020 19:38:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022210#M4588</guid>
      <dc:creator>MrMuhammad</dc:creator>
      <dc:date>2020-06-13T19:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022211#M4589</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;If you want to test scripts, that use a current record, you can "simulate" in Scripts Background, by just naming your GlideRecord variable as "current" an put the query to open it in front of the code.&lt;/P&gt;
&lt;P&gt;Let me know if that answered your question and mark my answer as correct and helpful&lt;/P&gt;
&lt;P&gt;BR Dirk&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2020 21:10:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022211#M4589</guid>
      <dc:creator>DirkRedeker</dc:creator>
      <dc:date>2020-06-13T21:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022212#M4590</link>
      <description>&lt;P&gt;Hey Giri,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be great if you mark my response as accepted and helpful if your question has been answered so that it can be added to answered list and others can be benefited by this. Happy Learning!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Sharjeel&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jun 2020 00:38:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022212#M4590</guid>
      <dc:creator>MrMuhammad</dc:creator>
      <dc:date>2020-06-14T00:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022213#M4591</link>
      <description>&lt;P&gt;Hey Giri,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be great if you mark my response as accepted and helpful if your question has been answered so that it can be added to answered list and others can be benefited by this. Happy Learning!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Sharjeel&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 02:51:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022213#M4591</guid>
      <dc:creator>MrMuhammad</dc:creator>
      <dc:date>2020-06-17T02:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022214#M4592</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Did you manage to solve your question?&lt;/P&gt;
&lt;P&gt;If my answer solved your question, please mark my answer as correct/helpful.&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Have fun&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Dirk&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 11:19:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/1022214#M4592</guid>
      <dc:creator>DirkRedeker</dc:creator>
      <dc:date>2020-06-22T11:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Test  workflow  to run without need to create request item</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/2539587#M189163</link>
      <description>&lt;P&gt;Hi Giri,&lt;BR /&gt;I am also looking for test suite to test my workflow , could you please share which suite you are using to test workflow in service now&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 22:59:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/test-workflow-to-run-without-need-to-create-request-item/m-p/2539587#M189163</guid>
      <dc:creator>jigil</dc:creator>
      <dc:date>2023-04-19T22:59:14Z</dc:date>
    </item>
  </channel>
</rss>

