_Docs/
Get StartedModulesPlatformDeployCookbookChangelogReference
_Stack
_Modules
  • Ledger
  • Numscript
  • Connectivity
  • WalletsEE
  • FlowsEE
    • Workflows definition
    • Workflows execution
    • Stages Reference
      • Send Statement
      • Waiting for events
      • Waiting for a delay
    • Examples
      • Ledger to Ledger
      • Payment to Wallet
      • Ledger to Stripe Payout
    • Triggers
  • ReconciliationEE
  1. Modules
  2. Flows
  3. Workflows definition
Flows

Workflows definition

Within the Flows service, a Workflow refers to a template that defines an ordered sequence of actions, called stages, to be executed as a Workflow Instance.

Workflow Definition Syntax#

A workflow definition is a YAML file, with the following structure:

YAML
---
name: "my-workflow"
stages:
  - send:
    # ...
  - wait_event:
      event: deposit.confirmed
  - delay:
      seconds: 7d
  - send:
    # ...

Available stages#

As of today, the following stages are supported:

StageDescription
sendTransfers value from a source to a destination. This stage is compatible with ledgers, payments, and wallets.
wait_eventMakes the workflow instance wait for an event to be emitted by an external system.
delayMakes the workflow instance wait for a given amount of time.

To learn more about each stage, please refer to the dedicated documentation page in the following section.

Using variables#

Variables can be used in the workflow definition, by using the ${} syntax. Variables will then be expanded according to the values passed at workflow execution time.

YAML
---
stages:
  - wait_event:
      event: "${event}"

Lifecycle#

Workflows have a lifecycle of their own, and need to be created before they can be executed as instances - follow on to the next section to learn more and create your first workflow.

FlowsWorkflows execution
On This Page
  • Workflow Definition Syntax
  • Available stages
  • Using variables
  • Lifecycle