Skip to main content

Cyware Orchestrate

Pass Parameters from Master Playbook to Sub-Playbook

A Playbook in which you define another Playbook as an action node (Playbook action node) is called a master Playbook. A Playbook that is added as an action node to a master Playbook is called a nested or sub-Playbook.

When you pass an input to a Playbook action node of a master Playbook, then the same input is passed to the start node of the sub-Playbook. The input from the master to a sub-Playbook is passed as an event data. You can use this input from the start node to any other node of sub Playbook using dynamic path expression.

Example: If you pass an URL such as www.cyware.com as an input to a Playbook action node of a master Playbook, then www.cyware.com is passed to the start node of a sub-Playbook. If a node in a sub-Playbook performs an action such as Scan URL, then you can reuse this data and pass www.cyware.com as an input for Action: Scan URL.

Before you Start

Ensure that you permission to View Playbooks and Create/Update Playbooks.

For more information about the required permissions to utilize the Playbooks feature, contact your Administrator.

Steps

Configure a Sub-Playbook

You need to configure a sub-Playbook to receive the data from a master Playbook.

To configure a sub-Playbook:

  1. Click the Main Menu, select Playbooks > Manage Playbooks.

  2. Click the New Playbook icon on the top right corner.

  3. In the Playbook canvas, drag and drop a node to build a Playbook.

  4. In Setup Input Data, enter an input to the Playbook, and click Save.

    If the added node is a custom node, then also configure the Write Your Custom Code Here.

Configure a Master Playbook

You need to configure a master Playbook to send data to a sub-Playbook.

To configure a master Playbook:

  1. Click the Main Menu, select Playbooks > Manage Playbooks.

  2. Click the New Playbook icon on the top right corner.

  3. In the Playbook canvas, drag and drop a Playbook action node to build a Playbook.

  4. In Choose a Playbook here, enter the sub Playbook created in Configure a sub-Playbook.

  5. In Setup Input Data, click +Parameter and define a key-value as an input for the Playbook node. The input that you have defined using key-value pair is passed to the start node of the sub Playbook as an event data.

    Example: If an action node of a sub-Playbook perform an Action: Scan URL, then you can define URL as an value in key-value pair and note down the key defined in the key-value pair.

    a (Key) = https://www.example.com (Value)

Use Event Data from Start Node to another Node

The input that you have defined using key-value pair in the master Playbook is passed to the start node of the sub-Playbook as an event data. You can use dynamic path to fetch this event data and use as an input to another node of a sub-Playbook.

Example: You can use ${event::data::a} to fetch the event data from the start node of a Playbook to another node of a Sub Playbook. "a" is the key defined in example of Configure a Master Playbook.

To use event data from start node to another node of a sub Playbook:

  1. Navigate to My Playbooks and open the sub-Playbook configured in Configure a Sub-Playbook.

  2. In Setup Input Data, enter the dynamic path and click Save.