Input

Inputs can be any of the following types:

Constant

The types string, bool, and number are constant and lets you hardcode a value.

Example

inputs:
  stringInput: "Input1 to the task"
  numberInput: 10
  booleanInput: true
  arrayInput:
    - "first item"
    - "second item"
  object:
    firstAttribute: 10
    secondAttribute: true
    thirdAttribute: "anything"

Reference

The reference type allows access to the data of a previous result or the previous step of a workflow. The reference is a special object that must contain the attribute key and, optionally, the parameter stepKey.

KeyTypeDescription
keyStringPath to the value of the to reference
stepKeyString(optional) Key of the step to reference (defined with the attribute <code>key</code> of the step). If not defined, the previous step is used

The parameter key is the path of data to access. To write a path, you need to follow a simplified JSON path format:

  • KEY_NAME to access a key.
  • . to access data in an object.
  • [INDEX] to access an element in an array at the index INDEX. (You might get a runtime error if your index is out of bounds).

Examples

  • foo: Access the variable foo.
  • foo.bar: Access the variable bar in the object foo.
  • foo[0]: Access the first element of the array foo.
  • foo[0].bar[1]: Access the second element of the array bar contained in the first element of the array foo.
  • foo[0][1]: Access the second element in the first element of the array foo.
inputs:
  referenceInput:
    key: outputA
    stepKey: my-previous-step-x
  referenceWithPathInput:
    key: outputB.attrX[0]
    stepKey: my-previous-step-x

Composable

The types array and object are composable. They can contain data of any types including other composable and reference types.

  • An array of array of string. Eg: [["foo", "bar"], [""]]
  • An object with another object that contains an array of object data. Eg: { a: { b: [{ c: "" }] } }

Examples

objectInput:
  numberInput: 10
  booleanInput: true
arrayInput:
  - foo
  - bar
objectInput:
  referenceInputInObject:
    key: outputA
    stepKey: my-previous-step-x