Commit c68ab33dfd8b665ca1dca9d460d36b692feadd55
1 parent
5e277e02
fix: 修复流程预测节点错误问题
fix: 补充校验规则,流程创建时只校验预测节点的审批人是否配置
Showing
2 changed files
with
12 additions
and
13 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java
| ... | ... | @@ -32,7 +32,7 @@ import static org.flowable.bpmn.constants.BpmnXMLConstants.FLOWABLE_EXTENSIONS_P |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * BPMN Model 操作工具类。目前分成三部分: |
| 35 | - * <p> | |
| 35 | + * | |
| 36 | 36 | * 1. BPMN 修改 + 解析元素相关的方法 |
| 37 | 37 | * 2. BPMN 简单查找相关的方法 |
| 38 | 38 | * 3. BPMN 复杂遍历相关的方法 |
| ... | ... | @@ -105,8 +105,8 @@ public class BpmnModelUtils { |
| 105 | 105 | * 给节点添加候选人元素 |
| 106 | 106 | * |
| 107 | 107 | * @param candidateStrategy 候选人策略 |
| 108 | - * @param candidateParam 候选人参数,允许空 | |
| 109 | - * @param flowElement 节点 | |
| 108 | + * @param candidateParam 候选人参数,允许空 | |
| 109 | + * @param flowElement 节点 | |
| 110 | 110 | */ |
| 111 | 111 | public static void addCandidateElements(Integer candidateStrategy, String candidateParam, FlowElement flowElement) { |
| 112 | 112 | addExtensionElement(flowElement, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY, |
| ... | ... | @@ -150,9 +150,9 @@ public class BpmnModelUtils { |
| 150 | 150 | /** |
| 151 | 151 | * 解析审批类型 |
| 152 | 152 | * |
| 153 | + * @see BpmUserTaskApproveTypeEnum | |
| 153 | 154 | * @param userTask 任务节点 |
| 154 | 155 | * @return 审批类型 |
| 155 | - * @see BpmUserTaskApproveTypeEnum | |
| 156 | 156 | */ |
| 157 | 157 | public static Integer parseApproveType(FlowElement userTask) { |
| 158 | 158 | return NumberUtils.parseInt(parseExtensionElement(userTask, BpmnModelConstants.USER_TASK_APPROVE_TYPE)); |
| ... | ... | @@ -162,7 +162,7 @@ public class BpmnModelUtils { |
| 162 | 162 | * 添加任务拒绝处理元素 |
| 163 | 163 | * |
| 164 | 164 | * @param rejectHandler 任务拒绝处理 |
| 165 | - * @param userTask 任务节点 | |
| 165 | + * @param userTask 任务节点 | |
| 166 | 166 | */ |
| 167 | 167 | public static void addTaskRejectElements(BpmSimpleModelNodeVO.RejectHandler rejectHandler, UserTask userTask) { |
| 168 | 168 | if (rejectHandler == null) { |
| ... | ... | @@ -196,9 +196,9 @@ public class BpmnModelUtils { |
| 196 | 196 | /** |
| 197 | 197 | * 给节点添加用户任务的审批人与发起人相同时,处理类型枚举 |
| 198 | 198 | * |
| 199 | - * @param assignStartUserHandlerType 发起人处理类型 | |
| 200 | - * @param userTask 任务节点 | |
| 201 | 199 | * @see BpmUserTaskAssignStartUserHandlerTypeEnum |
| 200 | + * @param assignStartUserHandlerType 发起人处理类型 | |
| 201 | + * @param userTask 任务节点 | |
| 202 | 202 | */ |
| 203 | 203 | public static void addAssignStartUserHandlerType(Integer assignStartUserHandlerType, UserTask userTask) { |
| 204 | 204 | if (assignStartUserHandlerType == null) { |
| ... | ... | @@ -211,7 +211,7 @@ public class BpmnModelUtils { |
| 211 | 211 | * 给节点添加用户任务的审批人为空时,处理类型枚举 |
| 212 | 212 | * |
| 213 | 213 | * @param emptyHandler 空处理 |
| 214 | - * @param userTask 任务节点 | |
| 214 | + * @param userTask 任务节点 | |
| 215 | 215 | * @see BpmUserTaskAssignEmptyHandlerTypeEnum |
| 216 | 216 | */ |
| 217 | 217 | public static void addAssignEmptyHandlerType(BpmSimpleModelNodeVO.AssignEmptyHandler emptyHandler, UserTask userTask) { |
| ... | ... | @@ -267,7 +267,7 @@ public class BpmnModelUtils { |
| 267 | 267 | /** |
| 268 | 268 | * 解析表单字段权限 |
| 269 | 269 | * |
| 270 | - * @param bpmnModel bpmnModel 对象 | |
| 270 | + * @param bpmnModel bpmnModel 对象 | |
| 271 | 271 | * @param flowElementId 元素 ID |
| 272 | 272 | * @return 表单字段权限 |
| 273 | 273 | */ |
| ... | ... | @@ -313,7 +313,7 @@ public class BpmnModelUtils { |
| 313 | 313 | /** |
| 314 | 314 | * 解析操作按钮设置 |
| 315 | 315 | * |
| 316 | - * @param bpmnModel bpmnModel 对象 | |
| 316 | + * @param bpmnModel bpmnModel 对象 | |
| 317 | 317 | * @param flowElementId 元素 ID |
| 318 | 318 | * @return 操作按钮设置 |
| 319 | 319 | */ |
| ... | ... | @@ -837,7 +837,7 @@ public class BpmnModelUtils { |
| 837 | 837 | * 计算条件表达式是否为 true 满足条件 |
| 838 | 838 | * |
| 839 | 839 | * @param variables 流程实例 |
| 840 | - * @param express 条件表达式 | |
| 840 | + * @param express 条件表达式 | |
| 841 | 841 | * @return 是否满足条件 |
| 842 | 842 | */ |
| 843 | 843 | public static boolean evalConditionExpress(Map<String, Object> variables, String express) { | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
| ... | ... | @@ -697,9 +697,8 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 697 | 697 | if (CollUtil.isEmpty(tasks)) { |
| 698 | 698 | return; |
| 699 | 699 | } |
| 700 | - // 2.流程发起时要先获取当前流程的预测走向节点,发起是 | |
| 701 | 700 | |
| 702 | - // 2. 校验发起人自选审批人的审批人和抄送人是否都配置了 | |
| 701 | + // 2. 流程发起时要先获取当前流程的预测走向节点,发起时只校验预测的节点发起人自选审批人的审批人和抄送人是否都配置了 | |
| 703 | 702 | tasks.stream().filter(task -> nodeIds == null || nodeIds.contains(task.getId())).forEach(task -> { |
| 704 | 703 | List<Long> assignees = startUserSelectAssignees != null ? startUserSelectAssignees.get(task.getId()) : null; |
| 705 | 704 | if (CollUtil.isEmpty(assignees)) { | ... | ... |