lam.exit

Learn more about the exit keyword

Functionality

The exit keyword acts as an early return for a workflow. If a flow outputs the exit keyword, Laminar will halt the workflow execution and any remaining steps will not be executed.

Invocation

Data transformation must output:

{
  "lam.exit": true
}
Key
Description
Type

exit

Whether or not we should exit the workflow

Boolean

Examples

(payload) => {
  const { step_1 } = payload;
  const results = step_1.response.results;
  
  if (results.length === 0 || results.length > 1) {
    return { "lam.exit": true };
  }
  
  return { 
    "order_ids": [Number(results[0].order_id)]
  };
}

Last updated

Was this helpful?