@@ -7,15 +7,18 @@ use tardis::web::poem_openapi::{
7
7
8
8
use super :: { flow_state_dto:: FlowSysStateKind , flow_transition_dto:: FlowTransitionActionByVarChangeInfoChangedKind } ;
9
9
10
+ /// External data exchange requests
11
+ ///
12
+ /// 对外数据交换请求
10
13
#[ derive( Serialize , Deserialize , Debug , Default , poem_openapi:: Object ) ]
11
14
pub struct FlowExternalReq {
12
- /// Type of request initiated, ex: query field, modification field, status change notification...
15
+ /// Associated [enum](FlowExternalKind)
13
16
///
14
- /// 发起请求的类型,例:查询字段,修改字段,状态变更通知..
17
+ /// 关联的[枚举](FlowExternalKind)
15
18
pub kind : FlowExternalKind ,
16
- /// When kind is ModifyField, the field is modified in a specific way, for example: validate the content, post action, precondition trigger ...
19
+ /// Associated [enum](FlowExternalCallbackOp)
17
20
///
18
- /// 当 kind 为 ModifyField 时,字段被修改的具体操作方式,例:验证内容,后置动作,前置条件触发..
21
+ /// 关联的[枚举](FlowExternalCallbackOp)
19
22
pub callback_op : Option < FlowExternalCallbackOp > ,
20
23
/// The tag corresponding to the current business
21
24
///
@@ -25,25 +28,25 @@ pub struct FlowExternalReq {
25
28
///
26
29
/// 当前业务ID
27
30
pub curr_bus_obj_id : String ,
28
- /// Workflow Instance ID
31
+ /// Associated [flow_instance](super::flow_inst_dto::FlowInstDetailResp) id
29
32
///
30
- /// 工作流实例ID
33
+ /// 关联的[工作流实例](super::flow_inst_dto::FlowInstDetailResp) id
31
34
pub inst_id : String ,
32
35
/// Modified State ID
33
36
///
34
37
/// 修改后的状态ID
35
38
pub target_state : Option < String > ,
36
- /// Modified state type
39
+ /// Associated [enum](super::flow_state_dto::FlowSysStateKind)
37
40
///
38
- /// 修改后的状态类型
41
+ /// 关联的[枚举](super::flow_state_dto::FlowSysStateKind)
39
42
pub target_sys_state : Option < FlowSysStateKind > ,
40
43
/// Status ID before modification
41
44
///
42
45
/// 修改前的状态ID
43
46
pub original_state : Option < String > ,
44
- /// Type of state before modification
47
+ /// Associated [enum](super::flow_state_dto::FlowSysStateKind)
45
48
///
46
- /// 修改前的状态类型
49
+ /// 关联的[枚举](super::flow_state_dto::FlowSysStateKind)
47
50
pub original_sys_state : Option < FlowSysStateKind > ,
48
51
/// Name of the action actually triggered (business side logging operation)
49
52
///
@@ -64,31 +67,53 @@ pub struct FlowExternalReq {
64
67
pub params : Vec < FlowExternalParams > ,
65
68
}
66
69
70
+ /// Type of request initiated, ex: query field, modification field, status change notification...
71
+ ///
72
+ /// 发起请求的类型,例:查询字段,修改字段,状态变更通知..
67
73
#[ derive( Clone , Debug , Default , PartialEq , Eq , Deserialize , Serialize , poem_openapi:: Enum ) ]
68
74
pub enum FlowExternalKind {
69
75
#[ default]
76
+ /// 获取关联业务对象
70
77
FetchRelObj ,
78
+ /// 修改字段
71
79
ModifyField ,
80
+ /// 状态变更通知
72
81
NotifyChanges ,
82
+ /// 查询字段值
73
83
QueryField ,
74
84
}
75
85
86
+ /// When kind is ModifyField, the field is modified in a specific way, for example: validate the content, post action, precondition trigger ...
87
+ ///
88
+ /// 当 kind 为 ModifyField 时,字段被修改的具体操作方式,例:验证内容,后置动作,前置条件触发..
76
89
#[ derive( Copy , Clone , Debug , Default , PartialEq , Eq , Deserialize , Serialize , poem_openapi:: Enum ) ]
77
90
pub enum FlowExternalCallbackOp {
78
91
#[ default]
79
92
Default ,
93
+ /// 后置动作
80
94
PostAction ,
95
+ /// 验证内容
81
96
VerifyContent ,
97
+ /// 条件触发
82
98
ConditionalTrigger ,
83
99
}
84
100
101
+ /// 扩展字段
102
+ ///
103
+ /// Extended params
85
104
#[ derive( Debug , Deserialize , Serialize , poem_openapi:: Object , Clone ) ]
86
105
pub struct FlowExternalParams {
106
+ /// 关联的 Tag
87
107
pub rel_tag : Option < String > ,
108
+ /// 关联类型 TagRelKind
88
109
pub rel_kind : Option < String > ,
110
+ /// 字段ID
89
111
pub var_id : Option < String > ,
112
+ /// 字段名
90
113
pub var_name : Option < String > ,
114
+ /// 修改成的值
91
115
pub value : Option < Value > ,
116
+ /// 修改方式
92
117
pub changed_kind : Option < FlowTransitionActionByVarChangeInfoChangedKind > ,
93
118
}
94
119
@@ -104,14 +129,19 @@ where
104
129
105
130
#[ derive( Default , Serialize , Deserialize , Debug , poem_openapi:: Object ) ]
106
131
pub struct FlowExternalFetchRelObjResp {
132
+ /// 当前Tag
107
133
pub curr_tag : String ,
134
+ /// 当前业务ID
108
135
pub curr_bus_obj_id : String ,
136
+ /// 关联业务对象
109
137
pub rel_bus_objs : Vec < RelBusObjResp > ,
110
138
}
111
139
112
140
#[ derive( Default , Serialize , Deserialize , Debug , poem_openapi:: Object ) ]
113
141
pub struct RelBusObjResp {
142
+ /// 关联对象的Tag
114
143
pub rel_tag : String ,
144
+ /// 关联业务对象ID
115
145
pub rel_bus_obj_ids : Vec < String > ,
116
146
}
117
147
0 commit comments