mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
34 lines
706 B
JSON
34 lines
706 B
JSON
{
|
|
"flow": {
|
|
"nodes": {
|
|
"node": [
|
|
{
|
|
"id": "s1",
|
|
"name": "普通脚本",
|
|
"type": "script",
|
|
"value": "a=3;b=2;slot.setData(\"s1\",a*b);"
|
|
},
|
|
{
|
|
"id": "s2",
|
|
"name": "条件脚本",
|
|
"type": "cond_script",
|
|
"value": "count = slot.getData(\"count\");if(count > 100){return \"a\";}else{return \"b\";}"
|
|
}
|
|
]
|
|
},
|
|
"chain": [
|
|
{
|
|
"name": "chain1",
|
|
"condition": [
|
|
{"type": "then", "value": "a,b,c,s1"}
|
|
]
|
|
},
|
|
{
|
|
"name": "chain2",
|
|
"condition": [
|
|
{"type": "then", "value": "d,s2(a|b)"}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |