【同步】BOOT 和 CLOUD 的功能
This commit is contained in:
@@ -14,6 +14,7 @@ import org.flowable.bpmn.model.UserTask;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior;
|
||||
import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior;
|
||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -82,4 +83,13 @@ public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceB
|
||||
return super.resolveNrOfInstances(execution);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void executeOriginalBehavior(DelegateExecution execution, ExecutionEntity multiInstanceRootExecution, int loopCounter) {
|
||||
// 参见 https://gitee.com/zhijiantianya/yudao-cloud/issues/IC239F
|
||||
super.collectionExpression = null;
|
||||
super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(execution.getCurrentActivityId());
|
||||
super.collectionElementVariable = FlowableUtils.formatExecutionCollectionElementVariable(execution.getCurrentActivityId());
|
||||
super.executeOriginalBehavior(execution, multiInstanceRootExecution, loopCounter);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -597,6 +597,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
* @param nextAssignees 下一个节点审批人集合(参数)
|
||||
* @param processInstance 流程实例
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private Map<String, Object> validateAndSetNextAssignees(String taskDefinitionKey, Map<String, Object> variables, BpmnModel bpmnModel,
|
||||
Map<String, List<Long>> nextAssignees, ProcessInstance processInstance) {
|
||||
// simple 设计器第一个节点默认为发起人节点,不校验是否存在审批人
|
||||
@@ -646,6 +647,11 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
approveUserSelectAssignees = new HashMap<>();
|
||||
}
|
||||
approveUserSelectAssignees.put(nextFlowNode.getId(), assignees);
|
||||
Map<String,List<Long>> existingApproveUserSelectAssignees = (Map<String,List<Long>>) variables.get(
|
||||
BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES);
|
||||
if (CollUtil.isNotEmpty(existingApproveUserSelectAssignees)) {
|
||||
approveUserSelectAssignees.putAll(existingApproveUserSelectAssignees);
|
||||
}
|
||||
variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES, approveUserSelectAssignees);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user