Group by Playbook Instance

last updated: june 18, 2025

When configured with "groupBy": "Playbook Instance", the Merge task consolidates all arriving upstream execution lineages into a single merged result. Each completed upstream lineage reaching the Merge task contributes one execution-lineage object.

Unlike grouping by "Path" and grouping by "Task Instance", a Merge task that groups by "Playbook Instance" will only have one execution instance with a Raw Data tab containing the merge result array.

Merge Condition Format

To enable grouping by playbook instance, configure the Merge task's condition as:

JSON
{
  "groupBy": "Playbook Instance"
}

Core Concepts

The examples below demonstrate how variations in task structure, path specification, and output availability influence merge.

Example 1 - Merging Parallel Lineages

objective – Learn that groupBy: "Playbook Instance" aggregates all upstream lineages converging at the Merge task into a single result array.


  1. Build the following playbook:

    image-20250612-172829.png
  2. Use the default merge condition:

    JSON
    {
      "groupBy": "Playbook Instance"
    }
    
  3. Test run the playbook. Frame 1 (31)-20250602-235821.png

  4. Click on the lab1.d3securityonline.net_d3_main_release_p1_VSOC_LifeServer.aspx_div=dashboard&Open=Other&t2=b501f51ee693975967b6e413cadcf38765f4e65c332e53ff7eb7ab3fe011aaa9 2-20250612-172927.png icon within the Merge task.

    Frame 78-20250612-173542.png
  5. Observe the execution results for the Merge task in the Raw Data tab.

    Frame 77-20250612-173303.png

    Merge result

    JSON
    [
      {
        "DataSource": { ... },
        "A1": { ... },
        "A2": { ... }
      },
      {
        "DataSource": { ... },
        "B1": { ... },
        "B2": { ... }
      },
      {
        "DataSource": { ... },
        "C1": { ... },
        "C2": { ... }
      }
    ]
    

TAKEAWAYS

  • Each parallel execution lineage that converges at the Merge task contributes a separate object to the result array in the Merge task's Raw Data tab.

  • Among multiple executions of the Merge task, only one contains this consolidated result.

Example 2 - Merging Parallel Lineages Involving Unwind Tasks

objective – Understand how both non-repeating task flows and Unwind-driven executions contribute individual execution-lineage objects to the result of a Merge task.


  1. Build the following playbook:

    lab1.d3securityonline.net_d3_main_release_p1_VSOC_LifeServer.aspx_div=dashboard&Open=Other&t2=b501f51ee693975967b6e413cadcf38765f4e65c332e53ff7eb7ab3fe011aaa9 (10) 1-20250612-235543.png
  2. Input the following JSON data for the Unwind B task:

    JSON
    [
      {
        "demoKey1": "value1"
      },
      {
        "demoKey2": "value2"
      }
    ]
    
    Frame 80-20250612-191453.png
  3. Input the following JSON data for the Unwind C task:

    JSON
    [
      { "demoKey3": "value3" },
      { "demoKey4": "value4" },
      { "demoKey5": "value5" },
      { "demoKey6": "value6" },
      { "demoKey7": "value7" },
      { "demoKey8": "value8" },
      { "demoKey9": "value9" },
      { "demoKey10": "value10" },
      { "demoKey11": "value11" },
      { "demoKey12": "value12" }
    ]
    
    Frame 81-20250612-191612.png
  4. Use the default merge condition:

    JSON
    {
        "groupBy": "Playbook Instance"
    }
    
    Frame 79-20250612-190346.png
  5. Test run the playbook. Frame 1 (31)-20250602-235821.png

  6. Click on the lab1.d3securityonline.net_d3_main_release_p1_VSOC_LifeServer.aspx_div=dashboard&Open=Other&t2=b501f51ee693975967b6e413cadcf38765f4e65c332e53ff7eb7ab3fe011aaa9 (4) 2 (1)-20250612-232237.png icon within the Merge task.

    lab1.d3securityonline.net_d3_main_release_p1_VSOC_LifeServer.aspx_div=dashboard&Open=Other&t2=b501f51ee693975967b6e413cadcf38765f4e65c332e53ff7eb7ab3fe011aaa9 (9) 1-20250612-234926.png
  7. Observe the execution results for the Merge task in the Raw Data tab.
    Merge result

    JSON
    [
      {
        "DataSource": { ... },
        "A1": { ... },
        "A2": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      }
    ]
    

TAKEAWAY

  • Each completed upstream lineage reaching the Merge task—whether originating from a linear sequence of distinct task nodes or from repeated executions triggered by Unwind-based element deconstruction—results in a distinct execution-lineage object in the merge result.

Example 3 - Merge Tasks in Sequential Levels

objective – Demonstrate how Merge tasks behave when used in sequential levels.


  1. Build the following playbook:

    lab1.d3securityonline.net_d3_main_release_p1_VSOC_LifeServer.aspx_div=dashboard&Open=Other&t2=b501f51ee693975967b6e413cadcf38765f4e65c332e53ff7eb7ab3fe011aaa9 (24) 1-20250613-175407.png
  2. Configure the delay tasks appropriately.

    7c805373-2afd-43c1-8b84-d93946471043.png
  3. Use the default merge condition for all Merge tasks:

    JSON
    {
      "groupBy": "Playbook Instance"
    }
    
  4. Test run the playbook. Frame 1 (31)-20250602-235821.png

  5. Check the merge results.

    Frame 85 (1)-20250613-175112.png

    merge ABC result

    JSON
    [
      {
        "DataSource": { ... },
        "B": { ... }
      },
      {
        "DataSource": { ... },
        "C": { ... }
      },
      {
        "DataSource": { ... },
        "A": { ... },
        "Delay 5 Seconds": { ... }
      }
    ]
    

    merge DEF result

    JSON
    [
      {
        "DataSource": { ... },
        "D": { ... },
        "Delay 6": { ... }
      },
      {
        "DataSource": { ... },
        "F": { ... },
        "Delay 7 Seconds": { ... }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 seconds": { ... }
      }
    ]
    

    merge ABCDEF result

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... },
        "Delay 5 Seconds": { ... },
        "Merge ABC": {
          ...
          "rawData": [
            {
              "DataSource": { ... },
              "B": { ... }
            },
            {
              "DataSource": { ... },
              "C": { ... }
            },
            {
              "DataSource": { ... },
              "A": { ... },
              "Delay 5 Seconds": { ... }
            }
          ],
          ...
        }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 seconds": { ... },
        "Merge DEF": {
          ...
          "rawData": [
            {
              "DataSource": { ... },
              "D": { ... },
              "Delay 6": { ... }
            },
            {
              "DataSource": { ... },
              "F": { ... },
              "Delay 7 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "E": { ... },
              "Delay 8 seconds": { ... }
            }
          ],
          ...
        }
      }
    ]
    
  6. Re-run the playbook with the following Data Formatter tasks inserted:

    • Format ABC between Merge ABC and Merge ABCDEF

    • Format DEF 1 between Merge DEF and Merge ABCDEF

    • Format DEF 2 between Merge DEF and Merge ABCDEF

      Frame 86-20250613-184859.png
  7. Check the merge results of the Merge ABCDEF task.
    merge ABCDEF result

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... },
        "Delay 5 Seconds": { ... },
        "Merge ABC": {
    	  ...
          "rawData": [
            {
              "DataSource": { ... },
              "B": { ... }
            },
            {
              "DataSource": { ... },
              "C": { ... }
            },
            {
              "DataSource": { ... },
              "A": { ... },
              "Delay 5 Seconds": { ... }
            }
          ],
          ...
        },
        "Format ABC": { ... }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 seconds": { ... },
        "Merge DEF": {
    	  ...
          "rawData": [
            {
              "DataSource": { ... },
              "D": { ... },
              "Delay 6": { ... }
            },
            {
              "DataSource": { ... },
              "F": { ... },
              "Delay 7 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "E": { ... },
              "Delay 8 seconds": { ... }
            }
          ],
          ...
        },
        "Format DEF 1": { ... }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 seconds": { ... },
        "Merge DEF": {
    	  ...
          "rawData": [
            {
              "DataSource": { ... },
              "D": { ... },
              "Delay 6": { ... }
            },
            {
              "DataSource": { ... },
              "F": { ... },
              "Delay 7 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "E": { ... },
              "Delay 8 seconds": { ... }
            }
          ],
          ...
        },
        "Format DEF 2": { ... }
      }
    ]
    

TAKEAWAYS

  • In subsequent merges (e.g., Merge ABCDEF), only the last-arriving lineage from each prior merge is included as a top-level object in the merged result.

  • The number of execution lineage objects in any merge result is equal to the number of inbound connectors feeding that Merge task.