Controls

Control nodes are to control the workflow execution. They begin or end the workflow or allow for branching of the workflow execution.

Triggers

Triggers kick of the execution of a workflow, several nodes are available:

  • API triggers allow you to create a Lleverage API end point by specifying a path and HTTP method. Once configured, you can start workflow execution by sending a call to the API trigger from within your application.

  • Scheduled cron nodes allow you to trigger a workflow execution based on a time based schedule.

Switches

The Switch is designed to execute different sets of actions based on user defined Cases. Cases can be captured as logical expressions that can include conditional logic that evaluate incoming data. Every case spawns a link with its own set of nodes to be executed. Cases can end workflow execution in case they include a Response node. A default node is always available as a fallback.

Infinite cases can be added. A case is created by providing a name and an expression. A case called Sci-fi could have an expression that can look like this:

state.movie.genre === 'scifi'

Expressions can reference structured data points that are part of the global workflow state, which is populated by the output of previously executed nodes.

Loops

The Loop allows you to iterate over an array of inputs to facilitate bulk processing. The loop will execute the nodes inside of it for every item in the provided list. The loop will close when all inputs are processed, after which the workflow will move to the next node.

Returns

Returns appear at the end of your workflow and return the outcome of the last node to feed it back to your application. Return types are a one-to-one match with the data types supported by links:

  1. Structured data like a JSON object or tabular data, these will be returned as JSON.

  2. Text data returned as a string.

  3. Files like an image blob or audio file, returned as a file with applicable headers like Content-Type and Content-Length.

  4. Text and Audio streams returned as an HTTP stream. Use the Lleverage SDK to simplify consumption of stream output.

Last updated