-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflow_json.json
More file actions
96 lines (91 loc) · 2.22 KB
/
flow_json.json
File metadata and controls
96 lines (91 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"_id":{
"$oid":"6284996796e28d6fc3e1c0db"
},
"name":"测试",
"desc":"测试流程",
// 需要执行的任务
"works":[
{
// 步骤号
"step":"1",
"async":false,
"restId":"62833f1858f599635e0a8cd5",
// 需要执行的接口
"restApiForEx":{
"_id":{
"$oid":"62833f1858f599635e0a8cd5"
},
"url":"/getAge",
"method":"get",
"desc":"getAge",
"params":[
{
"in":"query",
"name":"uid",
"require":true,
"type":"string",
"paramEntities":[
],
"extract":{
"el":"$.uuu",
"elType":"JSON_PATH"
}
}
],
"res":[
{
"require":false,
"type":"integer",
"paramEntities":[
]
}
]
},
// 执行接口需要做的操作
"watchers":[
{
// 条件表达式, 在接口执行完成后对age属性进行判断,是否大于0,如果是则执行then,反之则执行cat
"condition":"$.age > 0",
"elType":"JSON_PATH",
"then":[
{
"step":"2",
"async":false,
"restId":"62833f1858f599635e0a8cd6",
"restApiForEx":{
"_id":{
"$oid":"62833f1858f599635e0a8cd6"
},
"url":"/getUs",
"method":"get",
"desc":"getUs",
"params":[
{
"in":"query",
"name":"uid",
"require":true,
"type":"string",
"paramEntities":[
],
// 执行参数
"extract":{
"el":"$.uuu",
"elType":"JSON_PATH"
}
}
],
"res":[
]
},
"watchers":[
]
}
]
}
]
}
],
"resultId":"6284996796e28d6fc3e1c0da",
"_class":"com.github.brick.apiflow.model.flow.FlowEntity"
}