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:

  1. In the Playbook canvas window, click the Sub-playbooks icon () in the playbook library.
  2. 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.

  3. To view information about the sub-playbook, select it from the list.
  4. To add a sub-playbook to the playbook, drag it to the canvas, or click the plus (+) icon.
  5. On the canvas, select the sub-playbook to open the configuration window.
  6. 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.

  7. 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.

  8. 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.

  9. To duplicate or remove the sub-playbook from the canvas, right-click and select the appropriate action.
  10. When finished, click Save in the playbook to save your changes.