Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Step

A Step is the basic execution unit of a workflow. Each step can use a built-in or custom package (uses) and pass parameters (params). Steps execute sequentially and can also include branches, error handling, and timeout handling.

name: test
steps:
    - id: step1
      name: step 1
      uses: acts.core.irq
      params:
        key: act1

    - id: step2
      name: step 2
      uses: acts.transform.set
      params:
        a: 10

Step Attributes

KeyNameDescription
idIDUnique node identifier
nameNameHuman-readable name, supports any characters
descDescriptionStep description
tagTagTag configuration
rnResource NameResource name for permission control
usesPackageThe package name, e.g. acts.core.irq, acts.transform.set
paramsParametersParameters passed to the package
varsVariablesLocal variable definitions
ifConditionSkip execution based on condition, e.g. ${{ a }} > 0
whileWhile conditionLoop: re-execute this step while the condition holds
catchesCatchesError handling when step errors, type Vec<Step>
timeoutsTimeoutsTimeout handling, type Vec<Step>
branchesBranchesStep branches, a step can have multiple branches
nextNextJump to a specified step after the step completes
optionsOptionsExtra options, e.g. exposes to export variables
metadataMetadataExtra info for UI styling, not sent to client

A while step is a bounded loop: the condition is re-evaluated before each iteration and the step re-executes while it holds; once it fails the step is skipped and the flow falls through to the next step declared after it:

steps:
    - id: add
      while: index < input
      uses: acts.transform.code
      params: |
          $set("value", value + index);
          $set("index", index + 1);

    - id: end

A step whose if condition fails is also skipped and falls through to the next declared step (a self/backward next is then not taken), so if and next keep their original meanings and while cannot be combined with next.

Multi-Act Steps

When a step needs to execute multiple activities, use the acts.core.block package and nest child activity lists in params:

steps:
    - id: step1
      uses: acts.core.block
      params:
        mode: sequence
        acts:
          - uses: acts.core.irq
            params:
              key: act1
          - uses: acts.core.msg
            params:
              key: msg1

acts.core.parallel can execute over a collection in parallel, and acts.core.sequence can execute sequentially.