Sub-playbooks
Use sub-playbooks to define repeatable activities to use within other playbooks. You can access all sub-playbooks from the playbook library.
You can have multiple levels by nesting a sub-playbook within a sub-playbook. However, make sure to not repeat a sub-playbook in the path because it can cause a loop.
Adding a sub-playbook to a playbook
To add a sub-playbook to a playbook, follow these steps:
- In the Playbook canvas window, click the Sub-playbooks icon () in the playbook library.
- Expand the object list to see the sub-playbooks.
The library displays only those sub-playbooks with an object type that is compatible with the playbook's object type. Draft sub-playbooks that are not yet assigned an object type are grouped in the No Object Type list.
- To view information about the sub-playbook, select it from the list.
- To add a sub-playbook to the playbook, drag it to the canvas, or click the plus (+) icon.
- On the canvas, select the sub-playbook to open the configuration window.
- Under Outputs, type a name in the Output name
field.
You can use to this name to make the sub-playbook output available to other playbooks and sub-playbooks.
- Under Inputs, determine the method for delivering inputs to the
sub-playbook.
- To manually define the inputs, click the Fields tab and type a value in
each input field.
To select the input field directly from the playbook schema, click the Choose from schema icon ( ), and browse through the list to find the object that you want to use. Click the + icon to add the path to the input field.
The object or property type must match the input field type. If it does not, a validation message appears under the input field.
- To use a script to programmatically define the inputs, click the Script
tab.
If a script is present, click Edit script to update it.
To add objects directly from the playbook schema, click the View playbook schema icon ( ), and browse through the list to find the object that you want to use. Click the + icon to add the path to the script builder.
For information about building scripts, see Input scripts.
- To manually define the inputs, click the Fields tab and type a value in
each input field.
- To edit the sub-playbook, right-click on it on the canvas, and select
Edit.
Any changes that you make to the sub-playbook apply to all instances of the sub-playbook. For more information about the sub-playbook configuration settings, see Creating a sub-playbook.
- To duplicate or remove the sub-playbook from the canvas, right-click and select the appropriate action.
- When finished, click Save in the playbook to save your changes.