Commit 60d1f1199d7a8eb6955255c2e8299bc6a9ae2ecd
1 parent
735ec9e3
chore: 部分文件更名
Showing
4 changed files
with
12 additions
and
19 deletions
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmListenerMapType.java renamed to yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmListenerParamTypeEnum.java
| @@ -6,7 +6,6 @@ import lombok.Getter; | @@ -6,7 +6,6 @@ import lombok.Getter; | ||
| 6 | 6 | ||
| 7 | import java.util.Arrays; | 7 | import java.util.Arrays; |
| 8 | 8 | ||
| 9 | -// TODO @lesan:BpmListenerParamTypeEnum | ||
| 10 | /** | 9 | /** |
| 11 | * BPM 任务监听器键值对类型 | 10 | * BPM 任务监听器键值对类型 |
| 12 | * | 11 | * |
| @@ -14,7 +13,7 @@ import java.util.Arrays; | @@ -14,7 +13,7 @@ import java.util.Arrays; | ||
| 14 | */ | 13 | */ |
| 15 | @Getter | 14 | @Getter |
| 16 | @AllArgsConstructor | 15 | @AllArgsConstructor |
| 17 | -public enum BpmListenerMapType implements IntArrayValuable { | 16 | +public enum BpmListenerParamTypeEnum implements IntArrayValuable { |
| 18 | 17 | ||
| 19 | FIXED_VALUE(1, "固定值"), | 18 | FIXED_VALUE(1, "固定值"), |
| 20 | FROM_FORM(2, "表单"); | 19 | FROM_FORM(2, "表单"); |
| @@ -22,7 +21,7 @@ public enum BpmListenerMapType implements IntArrayValuable { | @@ -22,7 +21,7 @@ public enum BpmListenerMapType implements IntArrayValuable { | ||
| 22 | private final Integer type; | 21 | private final Integer type; |
| 23 | private final String name; | 22 | private final String name; |
| 24 | 23 | ||
| 25 | - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmListenerMapType::getType).toArray(); | 24 | + public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmListenerParamTypeEnum::getType).toArray(); |
| 26 | 25 | ||
| 27 | @Override | 26 | @Override |
| 28 | public int[] array() { | 27 | public int[] array() { |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java
| @@ -113,13 +113,9 @@ public class BpmSimpleModelNodeVO { | @@ -113,13 +113,9 @@ public class BpmSimpleModelNodeVO { | ||
| 113 | */ | 113 | */ |
| 114 | private ConditionGroups conditionGroups; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE | 114 | private ConditionGroups conditionGroups; // 仅用于条件节点 BpmSimpleModelNodeType.CONDITION_NODE |
| 115 | 115 | ||
| 116 | - // TODO @lesan:route 改成 router 会不会好点。因为触发器、延迟器,都带了类似 r | ||
| 117 | - | ||
| 118 | - // TODO @lesan:routeGroups | ||
| 119 | @Schema(description = "路由分支组", example = "[]") | 116 | @Schema(description = "路由分支组", example = "[]") |
| 120 | - private List<RouteCondition> routeGroup; | 117 | + private List<RouteCondition> routerGroups; |
| 121 | 118 | ||
| 122 | - // TODO @lesan:貌似没用??? | ||
| 123 | @Schema(description = "默认分支 ID", example = "Flow_xxx") | 119 | @Schema(description = "默认分支 ID", example = "Flow_xxx") |
| 124 | private String defaultFlowId; // 仅用于路由分支节点 BpmSimpleModelNodeType.ROUTE_BRANCH_NODE | 120 | private String defaultFlowId; // 仅用于路由分支节点 BpmSimpleModelNodeType.ROUTE_BRANCH_NODE |
| 125 | 121 | ||
| @@ -136,20 +132,19 @@ public class BpmSimpleModelNodeVO { | @@ -136,20 +132,19 @@ public class BpmSimpleModelNodeVO { | ||
| 136 | private String path; | 132 | private String path; |
| 137 | 133 | ||
| 138 | @Schema(description = "请求头", example = "[]") | 134 | @Schema(description = "请求头", example = "[]") |
| 139 | - private List<ListenerMap> header; | 135 | + private List<ListenerParam> header; |
| 140 | 136 | ||
| 141 | @Schema(description = "请求体", example = "[]") | 137 | @Schema(description = "请求体", example = "[]") |
| 142 | - private List<ListenerMap> body; | 138 | + private List<ListenerParam> body; |
| 143 | 139 | ||
| 144 | // TODO @芋艿:这里后续要不要复用; | 140 | // TODO @芋艿:这里后续要不要复用; |
| 145 | 141 | ||
| 146 | - // TODO @lesan:ListenerParam 更合适哈。首先它是参数配置,然后形式是键值对 | ||
| 147 | @Schema(description = "任务监听器键值对") | 142 | @Schema(description = "任务监听器键值对") |
| 148 | @Data | 143 | @Data |
| 149 | - public static class ListenerMap { | 144 | + public static class ListenerParam { |
| 150 | 145 | ||
| 151 | @Schema(description = "值类型", example = "1") | 146 | @Schema(description = "值类型", example = "1") |
| 152 | - @InEnum(BpmListenerMapType.class) | 147 | + @InEnum(BpmListenerParamTypeEnum.class) |
| 153 | private Integer type; | 148 | private Integer type; |
| 154 | 149 | ||
| 155 | @Schema(description = "键", example = "xxx") | 150 | @Schema(description = "键", example = "xxx") |
| @@ -300,7 +295,6 @@ public class BpmSimpleModelNodeVO { | @@ -300,7 +295,6 @@ public class BpmSimpleModelNodeVO { | ||
| 300 | @NotEmpty(message = "节点 Id 不能为空") | 295 | @NotEmpty(message = "节点 Id 不能为空") |
| 301 | private String nodeId; | 296 | private String nodeId; |
| 302 | 297 | ||
| 303 | - // TODO @lesan:type、expression、groups; | ||
| 304 | @Schema(description = "条件类型", example = "1") | 298 | @Schema(description = "条件类型", example = "1") |
| 305 | @InEnum(BpmSimpleModeConditionType.class) | 299 | @InEnum(BpmSimpleModeConditionType.class) |
| 306 | @NotNull(message = "条件类型不能为空") | 300 | @NotNull(message = "条件类型不能为空") |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java
| @@ -200,7 +200,7 @@ public class SimpleModelUtils { | @@ -200,7 +200,7 @@ public class SimpleModelUtils { | ||
| 200 | // 3. 遍历分支节点 | 200 | // 3. 遍历分支节点 |
| 201 | if (nodeType == BpmSimpleModelNodeType.ROUTE_BRANCH_NODE) { | 201 | if (nodeType == BpmSimpleModelNodeType.ROUTE_BRANCH_NODE) { |
| 202 | // 路由分支遍历 | 202 | // 路由分支遍历 |
| 203 | - for (BpmSimpleModelNodeVO.RouteCondition route : node.getRouteGroups()) { | 203 | + for (BpmSimpleModelNodeVO.RouteCondition route : node.getRouterGroups()) { |
| 204 | SequenceFlow sequenceFlow = RouteBranchNodeConvert.buildSequenceFlow(node.getId(), route); | 204 | SequenceFlow sequenceFlow = RouteBranchNodeConvert.buildSequenceFlow(node.getId(), route); |
| 205 | process.addFlowElement(sequenceFlow); | 205 | process.addFlowElement(sequenceFlow); |
| 206 | } | 206 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/listener/BpmUserTaskListener.java
| @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.bpm.service.task.listener; | @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.bpm.service.task.listener; | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | import cn.hutool.core.util.StrUtil; | 4 | import cn.hutool.core.util.StrUtil; |
| 5 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO; | 5 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO; |
| 6 | -import cn.iocoder.yudao.module.bpm.enums.definition.BpmListenerMapType; | 6 | +import cn.iocoder.yudao.module.bpm.enums.definition.BpmListenerParamTypeEnum; |
| 7 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; | 7 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; |
| 8 | import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; | 8 | import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; |
| 9 | import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; | 9 | import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; |
| @@ -84,16 +84,16 @@ public class BpmUserTaskListener implements TaskListener { | @@ -84,16 +84,16 @@ public class BpmUserTaskListener implements TaskListener { | ||
| 84 | // 4. 是否需要后续操作?TODO 芋艿:待定! | 84 | // 4. 是否需要后续操作?TODO 芋艿:待定! |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | - private void parseListenerMap(List<BpmSimpleModelNodeVO.ListenerHandler.ListenerMap> list, | 87 | + private void parseListenerMap(List<BpmSimpleModelNodeVO.ListenerHandler.ListenerParam> list, |
| 88 | Map<String, Object> processVariables, | 88 | Map<String, Object> processVariables, |
| 89 | MultiValueMap<String, String> to) { | 89 | MultiValueMap<String, String> to) { |
| 90 | if (CollUtil.isEmpty(list)) { | 90 | if (CollUtil.isEmpty(list)) { |
| 91 | return; | 91 | return; |
| 92 | } | 92 | } |
| 93 | list.forEach(item -> { | 93 | list.forEach(item -> { |
| 94 | - if (item.getType().equals(BpmListenerMapType.FIXED_VALUE.getType())) { | 94 | + if (item.getType().equals(BpmListenerParamTypeEnum.FIXED_VALUE.getType())) { |
| 95 | to.add(item.getKey(), item.getValue()); | 95 | to.add(item.getKey(), item.getValue()); |
| 96 | - } else if (item.getType().equals(BpmListenerMapType.FROM_FORM.getType())) { | 96 | + } else if (item.getType().equals(BpmListenerParamTypeEnum.FROM_FORM.getType())) { |
| 97 | to.add(item.getKey(), processVariables.get(item.getValue()).toString()); | 97 | to.add(item.getKey(), processVariables.get(item.getValue()).toString()); |
| 98 | } | 98 | } |
| 99 | }); | 99 | }); |