mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
feature #I3CTY2 规则支持json和yml
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
liteflow.rule-source=config/flow.xml
|
||||
#liteflow.rule-source=config/flow.yml
|
||||
#liteflow.slot-size=2048
|
||||
liteflow.when-max-wait-seconds=20
|
||||
liteflow.monitor.enable-log=true
|
||||
|
||||
75
liteflow-test-springboot/src/main/resources/config/flow.json
Normal file
75
liteflow-test-springboot/src/main/resources/config/flow.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"flow": {
|
||||
"nodes": {
|
||||
"node": [
|
||||
{
|
||||
"id": "a",
|
||||
"class": "com.yomahub.liteflow.test.component.AComponent"
|
||||
},
|
||||
{
|
||||
"id": "b",
|
||||
"class": "com.yomahub.liteflow.test.component.BComponent"
|
||||
},
|
||||
{
|
||||
"id": "c",
|
||||
"class": "com.yomahub.liteflow.test.component.CComponent"
|
||||
},
|
||||
{
|
||||
"id": "d",
|
||||
"class": "com.yomahub.liteflow.test.component.DComponent"
|
||||
},
|
||||
{
|
||||
"id": "e",
|
||||
"class": "com.yomahub.liteflow.test.component.EComponent"
|
||||
},
|
||||
{
|
||||
"id": "f",
|
||||
"class": "com.yomahub.liteflow.test.component.FComponent"
|
||||
},
|
||||
{
|
||||
"id": "g",
|
||||
"class": "com.yomahub.liteflow.test.component.GComponent"
|
||||
},
|
||||
{
|
||||
"id": "cond",
|
||||
"class": "com.yomahub.liteflow.test.component.CondComponent"
|
||||
}
|
||||
]
|
||||
},
|
||||
"chain": [
|
||||
{
|
||||
"name": "chain1",
|
||||
"topo": [
|
||||
{"type": "then", "value": "a,cond(b|d)"},
|
||||
{"type": "then", "value": "e,f,g"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "chain2",
|
||||
"topo": [
|
||||
{"type": "then", "value": "a,c"},
|
||||
{"type": "when", "value": "b,d,e,f,g"},
|
||||
{"type": "then", "value": "c"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "chain3",
|
||||
"topo": [
|
||||
{"type": "then", "value": "a,c,strategy1,g"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "strategy1",
|
||||
"topo": [
|
||||
{"type": "then", "value": "m(m1|m2|strategy2)"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "strategy2",
|
||||
"topo": [
|
||||
{"type": "then", "value": "q,p(p1|p2)"}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
46
liteflow-test-springboot/src/main/resources/config/flow.yml
Normal file
46
liteflow-test-springboot/src/main/resources/config/flow.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
flow:
|
||||
nodes:
|
||||
node:
|
||||
- id: a
|
||||
class: com.yomahub.liteflow.test.component.AComponent
|
||||
- id: b
|
||||
class: com.yomahub.liteflow.test.component.BComponent
|
||||
- id: c
|
||||
class: com.yomahub.liteflow.test.component.CComponent
|
||||
- id: d
|
||||
class: com.yomahub.liteflow.test.component.DComponent
|
||||
- id: e
|
||||
class: com.yomahub.liteflow.test.component.EComponent
|
||||
- id: f
|
||||
class: com.yomahub.liteflow.test.component.FComponent
|
||||
- id: g
|
||||
class: com.yomahub.liteflow.test.component.GComponent
|
||||
- id: cond
|
||||
class: com.yomahub.liteflow.test.component.CondComponent
|
||||
chain:
|
||||
- name: chain1
|
||||
topo:
|
||||
- type: then
|
||||
value: 'a,cond(b|d)'
|
||||
- type: then
|
||||
value: 'e,f,g'
|
||||
- name: chain2
|
||||
topo:
|
||||
- type: then
|
||||
value: 'a,c'
|
||||
- type: when
|
||||
value: 'b,d,e,f,g'
|
||||
- type: then
|
||||
value: 'c'
|
||||
- name: chain3
|
||||
topo:
|
||||
- type: then
|
||||
value: 'a,c,strategy1,g'
|
||||
- name: strategy1
|
||||
topo:
|
||||
- type: then
|
||||
value: m(m1|m2|strategy2)
|
||||
- name: strategy2
|
||||
topo:
|
||||
- type: then
|
||||
value: 'q,p(p1|p2)'
|
||||
Reference in New Issue
Block a user