Action Chain Variables

An action chain can also have variables. These are defined and used in the same way as page parameters.

Unlike page parameters, input variables only support the 'fromCaller' or 'none' type. Input variables must be specified by event handlers calling into action chains. 

"myActionChain": {
  "variables": {
    "id": {
      "type": "string",
      "description": "the ID of something to update",
      "input": "fromCaller",
      "required": true
    }
  },
  "root": "myAction",
  "actions": {
    "myAction": {
      "module": "vb/action/builtin/someAction"
    }
  }
}

Action chain variables can be assigned to or read from using the syntax $chain.variables.varName and are only accessible within an action chain. They can also be referenced by the shorthand $variables.varName within the chain.