Splunk SOAR

Get Status of completed Child Playbook

geoffsheppard
New Member

Hi,

I am just curious if anyone knows how to check on the completion status of a child playbook.

For example:
Playbook A calls Playbook B.
Playbook B completes and returns back to Playbook A.
Playbook A now wants to check on the completion status (success/failure & any possible message)

Perhaps something to do with the playbook_run_id from the phantom.playbook() call?

Labels (1)
Tags (1)
0 Karma

phantom_mhike
SplunkTrust
SplunkTrust

Assuming that the child playbook is running syncronously you can use playbook.completed.

in the docs --> docs/automation/api_playbook#completed

phantom.completed(action_names=None, playbook_names=None, trace=False)

This API checks to see if all of the actions and child playbooks (synchronously launched) in the the given list of action_names and playbook names have finished executing or not. Succeeded or Failed implies 'Done'. Returns True if and only if all the actions and playbooks are done or else returns False. This API is used primarily in the join function where certain blocks are being executed in parallel but the next block has to be called only when all the joining blocks have completed executing.

action_names [required] This is a list of names given to an action via phantom.act() API in the parameter 'name'.

playbook_names [required] This is a list of names given to a playbook execution via phantom.playbook() API in the parameter 'name'.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...