<?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>topic Re: Create individual incidents for each value in a list in parallel in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/create-individual-incidents-for-each-value-in-a-list-in-parallel/m-p/512253#M1115</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/226640"&gt;@Josep&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What exactly isn't working with creating the incidents? Do you mean the script waits for the first incident to finish its' playbook before creating the second one, and so on?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of a short script, which would create all incidents without waiting for each one of them to finish:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;inputs = demisto.executeCommand("getList", {"listName":&amp;lt;list_name&amp;gt;})[0]["Contents"]
inputList = list(inputs.split(","))

for item in inputList:
    demisto.executeCommand("createNewIncident", {"name":item})&lt;/LI-CODE&gt;
&lt;P&gt;(replace {"name":item} with whatever you need the parameters of the new incidents to be)&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2022 10:46:03 GMT</pubDate>
    <dc:creator>nkazinets</dc:creator>
    <dc:date>2022-08-18T10:46:03Z</dc:date>
    <item>
      <title>Create individual incidents for each value in a list in parallel</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/create-individual-incidents-for-each-value-in-a-list-in-parallel/m-p/512249#M1114</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;A list of URLs splitted by "," is used in automation. The automation should create a new incident for each value, however it shouldn't be created in a sequential way. All incidents should be created at the same time (don't need to finish the first incident to get the next one).&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 10:18:37 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/create-individual-incidents-for-each-value-in-a-list-in-parallel/m-p/512249#M1114</guid>
      <dc:creator>Josep</dc:creator>
      <dc:date>2022-08-18T10:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create individual incidents for each value in a list in parallel</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/create-individual-incidents-for-each-value-in-a-list-in-parallel/m-p/512253#M1115</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/226640"&gt;@Josep&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What exactly isn't working with creating the incidents? Do you mean the script waits for the first incident to finish its' playbook before creating the second one, and so on?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of a short script, which would create all incidents without waiting for each one of them to finish:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;inputs = demisto.executeCommand("getList", {"listName":&amp;lt;list_name&amp;gt;})[0]["Contents"]
inputList = list(inputs.split(","))

for item in inputList:
    demisto.executeCommand("createNewIncident", {"name":item})&lt;/LI-CODE&gt;
&lt;P&gt;(replace {"name":item} with whatever you need the parameters of the new incidents to be)&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 10:46:03 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/create-individual-incidents-for-each-value-in-a-list-in-parallel/m-p/512253#M1115</guid>
      <dc:creator>nkazinets</dc:creator>
      <dc:date>2022-08-18T10:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create individual incidents for each value in a list in parallel</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/create-individual-incidents-for-each-value-in-a-list-in-parallel/m-p/512254#M1116</link>
      <description>&lt;P&gt;Just solved, &lt;SPAN&gt;createNewIncident &lt;/SPAN&gt;can be used in a loop and inputs can be set for each iteration. Incidents don't need to be solved to create the next one.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 10:50:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/create-individual-incidents-for-each-value-in-a-list-in-parallel/m-p/512254#M1116</guid>
      <dc:creator>Josep</dc:creator>
      <dc:date>2022-08-18T10:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create individual incidents for each value in a list in parallel</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/create-individual-incidents-for-each-value-in-a-list-in-parallel/m-p/512255#M1117</link>
      <description>&lt;P&gt;Thanks for the reply, other inputs can be set too.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 10:52:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/create-individual-incidents-for-each-value-in-a-list-in-parallel/m-p/512255#M1117</guid>
      <dc:creator>Josep</dc:creator>
      <dc:date>2022-08-18T10:52:35Z</dc:date>
    </item>
  </channel>
</rss>

