flow.set

Set flow scope data.

- flow_set:
    some_result: (@ flow.result )
    foo: bar
    a:
      a: 123
      list:
        - item 1
        - item 2
        - b: 123
          c: 123

The flow_set component takes and arbitrary dictionary of data that can
contain nested dictionaries, values and lists.

You can also use Meya template syntax to render data
into the flow scope.

Also check the Flow scope guide.

Implicit flow.result reference

You can also reference the (@ flow.result ) value when setting a single
key. This is useful if you do not want to type the extra template syntax
explicitly.

For example:

steps:
  - ask: What is your name?
  - flow_set: name

Is the short form of:

steps:
  - ask: What is you name?
  - flow_set:
      name: (@ flow.result )

Element details

type: meya.flow.component.set
class: FlowSetComponent
path: /meya/flow/component/set.py
signature: flow_set

Fields

fielddescription               requiredsignaturedefaulttype
specOverride the original spec for this element.nullSpec
contextSend context data with this component's event.{}
dict
sensitiveMark this component's event as sensitive. This will encrypt the event if the Sensitive Data integration has been enabled.falsebool
triggersActivate these dynamic triggers when the component runs. Check the component triggers guide for more info.[]list
flow_setThis can either be a dictionary of values, or just the name of a single flow scope variable. If just a name is provided, then the value in (@ flow.result ) will be stored under the given name in the flow data scope.str
dict

Usage reference

Basic

triggers:
  - keyword: meya.flow.component.set
steps:
  - flow_set: STRING

Full

triggers:
  - keyword: meya.flow.component.set
steps:
  - spec:
      type: STRING
      data:
        STRING: ANY
      timeout: 123
      trigger_when: ANY
    context:
      STRING: ANY
    sensitive: false
    triggers:
      - type: STRING
        data:
          STRING: ANY
        timeout: 123
        trigger_when: ANY
    flow_set:
      foo: bar