Commit ba6cdabe62768f71b7bbccac58869c3423d346b3
1 parent
5adf07b7
fix(bpm): 串行多实例审批使用 LinkedHashSet 保证审批人顺序
Showing
1 changed file
with
2 additions
and
1 deletions
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java
| ... | ... | @@ -14,6 +14,7 @@ import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior; |
| 14 | 14 | import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior; |
| 15 | 15 | import org.flowable.engine.impl.persistence.entity.ExecutionEntity; |
| 16 | 16 | |
| 17 | +import java.util.LinkedHashSet; | |
| 17 | 18 | import java.util.List; |
| 18 | 19 | import java.util.Set; |
| 19 | 20 | |
| ... | ... | @@ -53,7 +54,7 @@ public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceB |
| 53 | 54 | @SuppressWarnings("unchecked") |
| 54 | 55 | Set<Long> assigneeUserIds = (Set<Long>) execution.getVariableLocal(super.collectionVariable, Set.class); |
| 55 | 56 | if (assigneeUserIds == null) { |
| 56 | - assigneeUserIds = taskCandidateInvoker.calculateUsersByTask(execution); | |
| 57 | + assigneeUserIds = new LinkedHashSet<>(taskCandidateInvoker.calculateUsersByTask(execution)); | |
| 57 | 58 | if (CollUtil.isEmpty(assigneeUserIds)) { |
| 58 | 59 | // 特殊:如果没有处理人的情况下,至少有一个 null 空元素,避免自动通过! |
| 59 | 60 | // 这样,保证在 BpmUserTaskActivityBehavior 至少创建出一个 Task 任务 | ... | ... |