flow.end

End the current flow, optionally returning data to the calling flow.

steps:
  - (option 1)
  - say: This is option 1
  - end:
      selected_option: 1

  - (option 2)
  - say: This is option 2
  - end:
      selected_option: 2

In this example the flow will end without processing the steps under
option 2, when option 1 is executed.

If this flow was called by another flow, then the selected_option variable
will be available in the calling flow's flow scope under (@ flow.selected_option ).

Element details

type: meya.flow.component.end
class: EndComponent
path: /meya/flow/component/end.py
signature: end

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
endOptionally specify any data that should be returned to a calling flow if the current flow was called as a nested flow.nulldict

Usage reference

Basic

triggers:
  - keyword: meya.flow.component.end
steps:
  - end:
      foo: bar

Full

triggers:
  - keyword: meya.flow.component.end
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
    end:
      foo: bar