在使用开关元素满足某个条件时运行的多个可扩展性操作脚本或操作流。
在某些情况下,条件必须为 true,操作才能运行。而在其他情况下,如此示例中所示,必须满足参数值,操作才能运行。如果不满足任何条件,操作流将失败。
version: 1
id: 1234
name: Test
inputs: ...
outputs: ...
flow:
flow_start:
next: forkAction
forkAction:
fork:
next: [action1, action2]
action1:
action: <action_name>
next: action3
action3:
action: <action_name>
next: action4
action4:
action: <action_name>
next: action7
action7:
action: <action_name>
next: joinElement
action2:
action: <action_name>
next: switchAction
switchAction:
switch:
"${1 == 1}": action5
"${1 != 1}": action6
action5:
action: <action_name>
next: action8
action6:
action: <action_name>
next: action8
action8:
action: <action_name>
注: 通过将前一个操作分配为
next: 操作,可以循环回到前一个操作。例如,输入
next: action1 可以重新运行 action1 并重新开始操作序列,而不要输入
next: flow_end 来结束操作流。
|
|
开关元素