flow.if

type: meya.flow.component.if
class: IfComponent
path: /meya/flow/component/if_.py
signature: if

Conditionally execute one action or another.

Fields

field

signature

required

type

default

description               

spec

ForwardRef('Spec')

null

Override the original spec for this element

context

dict

{}

Send context data with this component's event

sensitive

bool

false

Mark this component's event as sensitive

triggers

list

[]

Activate these dynamic triggers when the component runs

if

typing.Any

Condition to evaluate

then

ActionComponentSpec

Action executed if condition passes

else

ActionComponentSpec

Action executed if condition fails

Examples

Basic

triggers:
  - keyword: meya.flow.component.if
steps:
  - if: ANY
    then: COMPONENT
    else: COMPONENT

Full

triggers:
  - keyword: meya.flow.component.if
steps:
  - spec: '?'
    context:
      STRING: ANY
    sensitive: false
    triggers:
      - type: STRING
        data:
          STRING: ANY
        timeout: 123
        trigger_when: ANY
    if: ANY
    then: COMPONENT
    else: COMPONENT