Skip to main content
Skip table of contents

D3 Playbook Command Batch Execution Feature

In a D3 event or incident playbook, when configuring a task that involves a command, the command typically expects input in a specific data type. A special case arises when users provide an array of the required data type. In these instances, the playbook automatically transitions to a special mode known as Batch Execution.

Here is how batch execution works:

  • Automatic Iteration: If the command receives the array (such as an array of JSON objects when one JSON object is expected), the playbook does not simply reject it. Instead, it processes each item in the array sequentially and executes the command individually for each item.

  • Multiple Executions: For instance, if a command is designed to process a JSON object but is provided with a JSON array containing three objects, the playbook will execute the command three times—once for each object in the array.

  • Consistent Behavior: This behavior is not restricted to JSON objects alone; it applies to other data types as well. If the command expects a single integer but receives an integer array, the playbook will process each integer individually, executing the command for each one.

  • Efficiency: Batch execution makes it easier to handle multiple pieces of data at once without needing to set up multiple tasks or write complex scripts. The playbook takes care of the repetition for you, saving time and reducing the chance of errors.

In short, batch execution allows the playbook to be more flexible and powerful, automatically adapting when you need to process a list of items, making your workflow smoother and more efficient.

Example: Get Incident Static Field Command

Let’s say you have a command called "Get Incident Static Field". This command expects an input parameter called Incident Number, which is supposed to be a single string. However, if you provide an array of strings instead—such as ["080924-1609", "080924-1591","071924-16368"]—the playbook will enter batch execution mode.

  • What Happens: The playbook will automatically run the "Get Incident Static Field" command three times, once for each incident number in the array. So instead of failing due to an unexpected input type, the command adapts and processes each incident number individually, retrieving the static field for each incident

image-20240814-012232.png
  • Output: As a result, you will receive a separate output for each incident number, as if you had run the command three times manually, but without the extra effort.

image-20240814-012609.png

  • Efficiency: This batch execution capability streamlines the process, allowing you to handle multiple incidents with a single command, reducing the need for repetitive setup and minimizing the chance of errors.

Efficiency and Flexibility

This feature, known as D3 Playbook Task Batch Execution, makes it easier to handle multiple pieces of data at once without needing to set up multiple tasks or write complex scripts. The playbook takes care of the repetition for you, saving time and reducing the chance of errors.

In short, batch execution allows the playbook to be more flexible and powerful, automatically adapting when you need to process a list of items, making your workflow smoother and more efficient.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.