Commit 9fbbce4e8dd30c3660e98a6c5f830c50ab1125d7
1 parent
b5777b57
📖 BPMN:code review bpmn 中辅助查找代码
Showing
3 changed files
with
10 additions
and
8 deletions
yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/enums/ProcessConstants.java renamed to yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/core/enums/BpmnModelConstants.java
| ... | ... | @@ -3,16 +3,16 @@ package cn.iocoder.yudao.framework.flowable.core.enums; |
| 3 | 3 | /** |
| 4 | 4 | * 流程常量信息 |
| 5 | 5 | */ |
| 6 | -public interface ProcessConstants { | |
| 6 | +public interface BpmnModelConstants { | |
| 7 | 7 | |
| 8 | 8 | String BPMN_FILE_SUFFIX = ".bpmn"; |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | - * nameapace | |
| 12 | - * bpmn中的命名空间 | |
| 11 | + * BPMN 中的命名空间 | |
| 12 | + * | |
| 13 | 13 | * 这个东西有可能导致无法切换工作流程的实现 |
| 14 | 14 | */ |
| 15 | - String NAMESPASE = "http://flowable.org/bpmn"; | |
| 15 | + String NAMESPACE = "http://flowable.org/bpmn"; | |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * 自定义属性 dataType | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/handler/MultiInstanceHandler.java
| ... | ... | @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.handler; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.util.ObjectUtil; |
| 5 | -import cn.iocoder.yudao.framework.flowable.core.enums.ProcessConstants; | |
| 5 | +import cn.iocoder.yudao.framework.flowable.core.enums.BpmnModelConstants; | |
| 6 | 6 | import cn.iocoder.yudao.module.system.api.permission.PermissionApi; |
| 7 | 7 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; |
| 8 | 8 | import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; |
| ... | ... | @@ -21,6 +21,7 @@ import java.util.stream.Collectors; |
| 21 | 21 | |
| 22 | 22 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 23 | 23 | |
| 24 | +// TODO @芋艿:bpmn 分配人融合时,需要搞下这块; | |
| 24 | 25 | /** |
| 25 | 26 | * 多实例处理类 |
| 26 | 27 | */ |
| ... | ... | @@ -45,7 +46,7 @@ public class MultiInstanceHandler { |
| 45 | 46 | Set<String> candidateUserIds = new LinkedHashSet<>(); |
| 46 | 47 | FlowElement flowElement = execution.getCurrentFlowElement(); |
| 47 | 48 | if (ObjectUtil.isNotEmpty(flowElement) && flowElement instanceof UserTask userTask) { |
| 48 | - String dataType = userTask.getAttributeValue(ProcessConstants.NAMESPASE, ProcessConstants.PROCESS_CUSTOM_DATA_TYPE); | |
| 49 | + String dataType = userTask.getAttributeValue(BpmnModelConstants.NAMESPACE, BpmnModelConstants.PROCESS_CUSTOM_DATA_TYPE); | |
| 49 | 50 | if ("USERS".equals(dataType) && CollUtil.isNotEmpty(userTask.getCandidateUsers())) { |
| 50 | 51 | // 添加候选用户id |
| 51 | 52 | candidateUserIds.addAll(userTask.getCandidateUsers()); |
| ... | ... | @@ -71,4 +72,5 @@ public class MultiInstanceHandler { |
| 71 | 72 | } |
| 72 | 73 | return candidateUserIds; |
| 73 | 74 | } |
| 75 | + | |
| 74 | 76 | } | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java
| ... | ... | @@ -5,7 +5,7 @@ import cn.hutool.core.util.ObjectUtil; |
| 5 | 5 | import cn.hutool.core.util.StrUtil; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.util.object.PageUtils; |
| 8 | -import cn.iocoder.yudao.framework.flowable.core.enums.ProcessConstants; | |
| 8 | +import cn.iocoder.yudao.framework.flowable.core.enums.BpmnModelConstants; | |
| 9 | 9 | import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils; |
| 10 | 10 | import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; |
| 11 | 11 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO; |
| ... | ... | @@ -122,7 +122,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ |
| 122 | 122 | // 创建 Deployment 部署 |
| 123 | 123 | Deployment deploy = repositoryService.createDeployment() |
| 124 | 124 | .key(createReqDTO.getKey()).name(createReqDTO.getName()).category(createReqDTO.getCategory()) |
| 125 | - .addBytes(createReqDTO.getKey() + ProcessConstants.BPMN_FILE_SUFFIX, createReqDTO.getBpmnBytes()) | |
| 125 | + .addBytes(createReqDTO.getKey() + BpmnModelConstants.BPMN_FILE_SUFFIX, createReqDTO.getBpmnBytes()) | |
| 126 | 126 | .tenantId(TenantContextHolder.getTenantIdStr()) |
| 127 | 127 | .deploy(); |
| 128 | 128 | ... | ... |