Commit 4b09bff64b3aad5ddd945df8b6dc3c1cf1fd9010
1 parent
4acb01c3
【代码评审】BPM:Simple 设计器 - 路由节点
Showing
2 changed files
with
38 additions
and
34 deletions
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmListenerMapType.java
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java
| ... | ... | @@ -36,24 +36,6 @@ public class BpmSimpleModelNodeVO { |
| 36 | 36 | @Schema(description = "子节点") |
| 37 | 37 | private BpmSimpleModelNodeVO childNode; // 补充说明:在该模型下,子节点有且仅有一个,不会有多个 |
| 38 | 38 | |
| 39 | - @Schema(description = "条件节点") | |
| 40 | - private List<BpmSimpleModelNodeVO> conditionNodes; // 补充说明:有且仅有条件、并行、包容等分支会使用 | |
| 41 | - | |
| 42 | - // TODO @jason:conditionType、conditionExpression、defaultFlow、conditionGroups 搞成一个 condition 属性,会好点么? | |
| 43 | - @Schema(description = "条件类型", example = "1") | |
| 44 | - @InEnum(BpmSimpleModeConditionType.class) | |
| 45 | - private Integer conditionType; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE | |
| 46 | - | |
| 47 | - @Schema(description = "条件表达式", example = "${day>3}") | |
| 48 | - private String conditionExpression; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE | |
| 49 | - | |
| 50 | - @Schema(description = "是否默认条件", example = "true") | |
| 51 | - private Boolean defaultFlow; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE | |
| 52 | - /** | |
| 53 | - * 条件组 | |
| 54 | - */ | |
| 55 | - private ConditionGroups conditionGroups; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE | |
| 56 | - | |
| 57 | 39 | @Schema(description = "候选人策略", example = "30") |
| 58 | 40 | @InEnum(BpmTaskCandidateStrategyEnum.class) |
| 59 | 41 | private Integer candidateStrategy; // 用于审批,抄送节点 |
| ... | ... | @@ -110,6 +92,37 @@ public class BpmSimpleModelNodeVO { |
| 110 | 92 | */ |
| 111 | 93 | private ListenerHandler taskCompleteListener; |
| 112 | 94 | |
| 95 | + @Schema(description = "延迟器设置", example = "{}") | |
| 96 | + private DelaySetting delaySetting; | |
| 97 | + | |
| 98 | + @Schema(description = "条件节点") | |
| 99 | + private List<BpmSimpleModelNodeVO> conditionNodes; // 补充说明:有且仅有条件、并行、包容分支会使用 | |
| 100 | + | |
| 101 | + // TODO @jason:conditionType、conditionExpression、defaultFlow、conditionGroups 搞成一个 condition 属性,会好点么? | |
| 102 | + @Schema(description = "条件类型", example = "1") | |
| 103 | + @InEnum(BpmSimpleModeConditionType.class) | |
| 104 | + private Integer conditionType; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE | |
| 105 | + | |
| 106 | + @Schema(description = "条件表达式", example = "${day>3}") | |
| 107 | + private String conditionExpression; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE | |
| 108 | + | |
| 109 | + @Schema(description = "是否默认条件", example = "true") | |
| 110 | + private Boolean defaultFlow; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE | |
| 111 | + /** | |
| 112 | + * 条件组 | |
| 113 | + */ | |
| 114 | + private ConditionGroups conditionGroups; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE | |
| 115 | + | |
| 116 | + // TODO @lesan:route 改成 router 会不会好点。因为触发器、延迟器,都带了类似 r | |
| 117 | + | |
| 118 | + // TODO @lesan:routeGroups | |
| 119 | + @Schema(description = "路由分支组", example = "[]") | |
| 120 | + private List<RouteCondition> routeGroup; | |
| 121 | + | |
| 122 | + // TODO @lesan:貌似没用??? | |
| 123 | + @Schema(description = "默认分支 ID", example = "Flow_xxx") | |
| 124 | + private String defaultFlowId; // 仅用于路由分支节点 BpmSimpleModelNodeType.ROUTE_BRANCH_NODE | |
| 125 | + | |
| 113 | 126 | @Schema(description = "任务监听器") |
| 114 | 127 | @Valid |
| 115 | 128 | @Data |
| ... | ... | @@ -130,17 +143,18 @@ public class BpmSimpleModelNodeVO { |
| 130 | 143 | |
| 131 | 144 | // TODO @芋艿:这里后续要不要复用; |
| 132 | 145 | |
| 146 | + // TODO @lesan:ListenerParam 更合适哈。首先它是参数配置,然后形式是键值对 | |
| 133 | 147 | @Schema(description = "任务监听器键值对") |
| 134 | 148 | @Data |
| 135 | 149 | public static class ListenerMap { |
| 136 | 150 | |
| 137 | - @Schema(description = "键", example = "xxx") | |
| 138 | - private String key; | |
| 139 | - | |
| 140 | 151 | @Schema(description = "值类型", example = "1") |
| 141 | 152 | @InEnum(BpmListenerMapType.class) |
| 142 | 153 | private Integer type; |
| 143 | 154 | |
| 155 | + @Schema(description = "键", example = "xxx") | |
| 156 | + private String key; | |
| 157 | + | |
| 144 | 158 | @Schema(description = "值", example = "xxx") |
| 145 | 159 | private String value; |
| 146 | 160 | |
| ... | ... | @@ -261,9 +275,6 @@ public class BpmSimpleModelNodeVO { |
| 261 | 275 | |
| 262 | 276 | } |
| 263 | 277 | |
| 264 | - @Schema(description = "延迟器设置", example = "{}") | |
| 265 | - private DelaySetting delaySetting; | |
| 266 | - | |
| 267 | 278 | @Schema(description = "延迟器") |
| 268 | 279 | @Data |
| 269 | 280 | @Valid |
| ... | ... | @@ -280,23 +291,16 @@ public class BpmSimpleModelNodeVO { |
| 280 | 291 | |
| 281 | 292 | } |
| 282 | 293 | |
| 283 | - // TODO @lesan:routeGroups | |
| 284 | - @Schema(description = "路由分支组", example = "[]") | |
| 285 | - private List<RouteCondition> routeGroup; | |
| 286 | - | |
| 287 | - @Schema(description = "默认分支id", example = "Flow_xxx") | |
| 288 | - private String defaultFlowId; // 仅用于路由分支节点 BpmSimpleModelNodeType.ROUTE_BRANCH_NODE | |
| 289 | - | |
| 290 | 294 | @Schema(description = "路由分支") |
| 291 | 295 | @Data |
| 292 | 296 | @Valid |
| 293 | 297 | public static class RouteCondition { |
| 294 | 298 | |
| 295 | - @Schema(description = "节点 Id", example = "Activity_xxx") | |
| 299 | + @Schema(description = "节点 Id", example = "Activity_xxx") // 跳转到该节点 | |
| 296 | 300 | @NotEmpty(message = "节点 Id 不能为空") |
| 297 | 301 | private String nodeId; |
| 298 | 302 | |
| 299 | - // TODO @lesan:type、expression、groups;(可以晚点改,在和 conditionType、conditionExpression、defaultFlow、conditionGroups 讨论!) | |
| 303 | + // TODO @lesan:type、expression、groups; | |
| 300 | 304 | @Schema(description = "条件类型", example = "1") |
| 301 | 305 | @InEnum(BpmSimpleModeConditionType.class) |
| 302 | 306 | @NotNull(message = "条件类型不能为空") | ... | ... |