CONDITION_SWITCH
Branches workflow execution by evaluating a condition expression and routing to true or false node paths, ending the path when a branch is missing.
Instructions
按条件表达式走 true / false 分支。运算符 ==、!=、>、<、>=、<=、contains、startswith、endswith;== / != 按字符串比较,> < >= <= 按数字比较(非数字当 0),contains/startswith/endswith 不区分大小写。左边是变量名(不要写 ${}),右边是字面值,值不加引号;> 和 < 两侧必须有空格;未定义变量按字符串 null 比较。分支写在节点的 branches(true/false → 节点 id),不走 next,缺的分支即该路径结束。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| require | No | 执行后要求为 true 的变量名(如 click_success),不满足按出错处理 | |
| on_error | No | 节点出错时:skip=跳过继续(默认),stop=停止整个工作流 | |
| expression | Yes | 条件:变量名 运算符 值(如 battery_level > 20),或单个布尔变量名 | |
| node_timeout_ms | No | 单节点超时毫秒,0=不限;默认 30 分钟 |