feature #I3CTY2 规则支持json和yml

This commit is contained in:
tonnyguo
2021-03-26 15:58:57 +08:00
parent 32026989e1
commit 4794792cfb
11 changed files with 412 additions and 29 deletions

View File

@@ -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

View 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)"}
]
}
]
}
}

View 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)'