Skip to main content
Skip table of contents

Playbook Testing and Task Node Re-runs

LAST UPDATED: MARCH 13, 2025

When testing a playbook, it is important to understand the difference between re-running a task and re-testing the entire playbook:

  • Re-running a task will not update Playbook Data or propagate new return data to downstream tasks.

  • Only re-testing the playbook applies updated configurations in subsequent executions.

For task nodes with the Stop on Error checkmark selected, re-running a task functions differently. Refer to Re-running a task node with Stop on Error Enabled for details.

Frame 1 (1).png

Testing a Playbook

EXAMPLE Consider the following playbook:

  1. Configure DF Task 1 to return "alpha."

  2. Configure the conditional task with two branches: Branch 1 and Branch 2.

  3. Configure the conditional task to evaluate DF Task 1's return data and route execution to Branch 1 if the value is "alpha", otherwise route to Branch 2.

    CODE
    {% set x = PlaybookData | jsonpath('$.["DF Task 1"].returnData') %}
    
    {% if x == 'alpha' %}
        Branch 1
    {% else %}
        Branch 2
    {% endif %}
  4. Click on the button.

    Group 2 (1).png

  5. Click on the Run Test button.

    Frame 287.png
  6. Verify that execution followed Branch 1.

    Frame 292.png
  7. Click on the Frame 3.png icon for DF Task 1 to verify the output.

    Frame 273.png
  8. Click on the Frame 3.png icon for Conditional Task to confirm that "alpha" was indeed read.

    Frame 274.png

Rerunning a Task Node

Continuing the example from above, re-running a task node executes only that task without resuming the playbook.

  1. Re-configure DF Task 1 to return "beta."

  2. Re-run DF Task 1.

    Frame 275.png
    Frame 276.png
  3. Observe the return data.

    Frame 277.png
  4. Observe that DF Task 1 executed twice, with no changes occurring downstream, as indicated by the unchanged task icons.

    Frame 296.png

OBSERVATION

According to the conditional logic defined here, one might expect DF Task 3 to have executed. However, this did not occur – no other task executed apart from DF Task 1.

  1. Re-examine DF Task 1's return data within the conditional task.

    Frame 279.png

INSIGHTS

  • The new return data did not propagate to downstream tasks.

  • The user will see that the return data of DF Task 1 remains "alpha" despite being configured to return "beta" here.

  1. Re-run the conditional task.

    Frame 280.png
    Frame 281.png
  2. Re-examine DF Task 1's return data from the conditional task's perspective.

    Frame 293.png

OBSERVATION

DF Task 1's return data still remains "alpha" unchanged, despite being configured to return "beta" here and re-running the conditional task.

  1. Observe that both DF Task 1 and Conditional Task executed twice, with no changes to the downstream execution path.

    Frame 295-20250226-015925.png
  2. Stop the test and re-test the playbook.

    Frame 284.png
    Group 2 (1).png
    Frame 286.png
  3. Verify that execution followed Branch 2.

    Frame 294.png
  4. Click on the Frame 3.png icon for DF Task 1 to verify that it outputs "beta."

    Frame 291.png
  5. Click on the Frame 3.png icon for Conditional Task, to confirm that "beta" was indeed read.

Frame 290.png

LESSONS

  • Playbook Data remains unchanged for all nodes after re-running a task.

  • Re-testing the playbook applies updated task configurations in subsequent executions.

Re-running a Task Node with Stop on Error Enabled

The button behaves differently for tasks with Stop on Error enabled compared to those without it.

Group 1 (2).png

For a task with Stop on Error enabled, the button re-executes the failed task and resumes playbook execution from that point.

rerunning stop on error.gif

Rerun Button Availability in the Configuration Module

When testing playbooks in the Configuration module, the button remains available even after a successful (Frame 3.png) execution.

Group 3 (2).png
Group 4 (1).png
Group 5.png

Understanding this behavior helps users use the button effectively for Stop on Error tasks, avoiding unintended task repetition. This is important for downstream task nodes, such as those creating Jira tickets or sending emails, where re-execution may result in unnecessary duplicates or repeated actions.

Rerun Button Availability in the Incident Workspace

In contrast to the Configuration module, the Incident Workspace displays the Group 5 (1).png button only for errored tasks, and it disappears after being clicked.

READER NOTE

The Group 5 (1).png button’s availability depends on the selected execution record in the Playbook Task Details dropdown.

  • ABSENT in a successfully re-executed (Frame 3.png) task.

    Group 9 (1).png
  • PRESENT in the original error (Group 142.png) execution.

    Group 8 (2).png
    • CAUTION Re-executing may cause unintended duplicates or repeated actions in downstream tasks.

Example - New Execution Entry Generated After Re-Running an Errored Task

Re-running an errored task creates a new entry in the task execution log (dropdown) for the current task node and all subsequent rerun task nodes.

EXAMPLE

Group 42.png

1 - Error: The initially failed task. The Group 5 (1).png button is available.

2 - Done (Rerun 1 - Error): The successfully re-executed (Frame 3.png) task after clicking on the Group 5 (1).png button in the 1 - Error execution.

3 - Done (Rerun 1 - Error): Returning to the 1 - Error execution and clicking on the Group 5 (1).png button creates a third entry in the execution log.

JavaScript errors detected

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

If this problem persists, please contact our support.