<?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 Playbook Having Issues executing in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Playbook-Having-Issues-executing/m-p/415702#M5002</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;For some reason none of my playbooks finish executing. They simply stay in a loop&lt;/P&gt;

&lt;P&gt;Even if it is a simple test like: &lt;/P&gt;

&lt;P&gt;Start--&amp;gt; Check if 1==1 --&amp;gt; End&lt;/P&gt;

&lt;P&gt;This stays in loop (In GUI the playbook shows spinning icon next to it forever. No debug logs are generated)forever when run against any incidences/events. Any idea why?&lt;/P&gt;

&lt;P&gt;This was created via GUI tool. Here's corresponding auto generated python code &lt;/P&gt;

&lt;P&gt;"""&lt;BR /&gt;
"""&lt;/P&gt;

&lt;P&gt;import phantom.rules as phantom&lt;BR /&gt;
import json&lt;BR /&gt;
from datetime import datetime, timedelta&lt;/P&gt;

&lt;P&gt;def on_start(container):&lt;BR /&gt;
    phantom.debug('on_start() called')&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# call 'filter_1' block
filter_1(container=container)

return
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;def filter_1(action=None, success=None, container=None, results=None, handle=None, filtered_artifacts=None, filtered_results=None):&lt;BR /&gt;
    phantom.debug('filter_1() called')&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# collect filtered artifact ids for 'if' condition 1
matched_artifacts_1, matched_results_1 = phantom.condition(
    container=container,
    conditions=[
        ["1", "==", "1"],
    ],
    name="filter_1:condition_1")

# call connected blocks if filtered artifacts or results
if matched_artifacts_1 or matched_results_1:
    pass

return
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;def on_finish(container, summary):&lt;BR /&gt;
    phantom.debug('on_finish() called')&lt;BR /&gt;
    # This function is called after all actions are completed.&lt;BR /&gt;
    # summary of all the action and/or all detals of actions &lt;BR /&gt;
    # can be collected here.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# summary_json = phantom.get_summary()
# if 'result' in summary_json:
    # for action_result in summary_json['result']:
        # if 'action_run_id' in action_result:
            # action_results = phantom.get_action_results(action_run_id=action_result['action_run_id'], result_data=False, flatten=False)
            # phantom.debug(action_results)

return
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:51:58 GMT</pubDate>
    <dc:creator>rupalekar</dc:creator>
    <dc:date>2020-09-30T00:51:58Z</dc:date>
    <item>
      <title>Playbook Having Issues executing</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Playbook-Having-Issues-executing/m-p/415702#M5002</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;For some reason none of my playbooks finish executing. They simply stay in a loop&lt;/P&gt;

&lt;P&gt;Even if it is a simple test like: &lt;/P&gt;

&lt;P&gt;Start--&amp;gt; Check if 1==1 --&amp;gt; End&lt;/P&gt;

&lt;P&gt;This stays in loop (In GUI the playbook shows spinning icon next to it forever. No debug logs are generated)forever when run against any incidences/events. Any idea why?&lt;/P&gt;

&lt;P&gt;This was created via GUI tool. Here's corresponding auto generated python code &lt;/P&gt;

&lt;P&gt;"""&lt;BR /&gt;
"""&lt;/P&gt;

&lt;P&gt;import phantom.rules as phantom&lt;BR /&gt;
import json&lt;BR /&gt;
from datetime import datetime, timedelta&lt;/P&gt;

&lt;P&gt;def on_start(container):&lt;BR /&gt;
    phantom.debug('on_start() called')&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# call 'filter_1' block
filter_1(container=container)

return
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;def filter_1(action=None, success=None, container=None, results=None, handle=None, filtered_artifacts=None, filtered_results=None):&lt;BR /&gt;
    phantom.debug('filter_1() called')&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# collect filtered artifact ids for 'if' condition 1
matched_artifacts_1, matched_results_1 = phantom.condition(
    container=container,
    conditions=[
        ["1", "==", "1"],
    ],
    name="filter_1:condition_1")

# call connected blocks if filtered artifacts or results
if matched_artifacts_1 or matched_results_1:
    pass

return
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;def on_finish(container, summary):&lt;BR /&gt;
    phantom.debug('on_finish() called')&lt;BR /&gt;
    # This function is called after all actions are completed.&lt;BR /&gt;
    # summary of all the action and/or all detals of actions &lt;BR /&gt;
    # can be collected here.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# summary_json = phantom.get_summary()
# if 'result' in summary_json:
    # for action_result in summary_json['result']:
        # if 'action_run_id' in action_result:
            # action_results = phantom.get_action_results(action_run_id=action_result['action_run_id'], result_data=False, flatten=False)
            # phantom.debug(action_results)

return
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:51:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Playbook-Having-Issues-executing/m-p/415702#M5002</guid>
      <dc:creator>rupalekar</dc:creator>
      <dc:date>2020-09-30T00:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Playbook Having Issues executing</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Playbook-Having-Issues-executing/m-p/415703#M5003</link>
      <description>&lt;P&gt;Any Guesses?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 18:21:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Playbook-Having-Issues-executing/m-p/415703#M5003</guid>
      <dc:creator>rupalekar</dc:creator>
      <dc:date>2019-06-10T18:21:08Z</dc:date>
    </item>
  </channel>
</rss>

