Stop If Block
Conditional stopping in Scout workflows
The Stop If block is a control-flow component in Scout workflows that enables conditional execution. It evaluates a specified condition and halts the execution of subsequent blocks if the condition is met, allowing for dynamic control over workflow processes.
Configuration (Required)
Template that should evaluate to True or False. This input uses Jinja templating to dynamically assess conditions based on the current state of the workflow.
Outputs
The Stop If block outputs a JSON object containing:
- evaluated_condition: A boolean indicating whether the condition evaluated to true.
- details: Includes metadata such as the execution time.
Usage Context
Use this block to conditionally stop execution based on dynamic conditions within your workflow. This is particularly useful for workflows that require conditional branching or need to prevent certain actions from occurring unless specific criteria are satisfied.
Best Practices
- Ensure the condition template correctly evaluates to a boolean value. This is crucial for the block to function as intended.
- Use Jinja templating to dynamically evaluate conditions based on workflow state. This allows for flexible and context-aware decision-making within your workflows.