Path Block

Path branching in Scout workflows

The Path block is a key component in Scout workflows, providing the ability to branch execution paths based on dynamic conditions. This enables workflows to adapt and respond to varying inputs and states, enhancing their flexibility and power.

Configuration (Required)

condition
codeRequired

Template that should evaluate to True or False. This condition determines the execution path of the workflow. Ensure the logic accurately reflects the decision criteria needed for your specific use case.

block_on_true
stringRequired

The block_id of the block to run if the condition evaluates to True. This specifies the path the workflow will take when the condition is met.

block_on_false
stringRequired

The block_id of the block to run if the condition evaluates to False. This ensures an alternative path is taken when the condition is not satisfied.

See Workflow Logic & State > State Management for details on using dynamic variables in this block.

Outputs

The output of the Path block provides the evaluated condition as a boolean and the block ID that will be executed based on the condition. This output helps in understanding the decision path taken by the workflow.

Usage Context

Use this block to control workflow execution based on dynamic conditions. It allows workflows to branch and execute different blocks depending on the result of a Jinja2 template evaluation.

Best Practices

  • Ensure the condition template correctly evaluates to a boolean value.
  • Verify that the block IDs provided exist in the workflow.
  • Use clear and concise conditions to avoid unexpected behavior.
  • Utilize the state context to dynamically evaluate conditions based on workflow state.
Built with