|
@@ -323,6 +323,9 @@ public class FlowTaskServiceImpl extends BaseServiceImpl<FlowTaskDao, FlowTask>
|
|
|
runtimeService.setVariableLocal(miExecution.getId(), "nrOfInstances", nrOfInstances - 1);
|
|
|
MultiInstanceLoopCharacteristics loopCharacteristics = managementService.executeCommand(new GetLoopCharacteristics(taskInfo.getProcessInstanceId(), taskInfo.getTaskDefinitionKey()));
|
|
|
List<String> assigneeList = runtimeService.getVariable(taskInfo.getProcessInstanceId(), collectionName, List.class);
|
|
|
+ if (assigneeList.size() == 1) {
|
|
|
+ throw new BaseException("会签必须保留一个用户");
|
|
|
+ }
|
|
|
if (loopCharacteristics.isSequential()) {
|
|
|
Integer loopCounter = runtimeService.getVariableLocal(taskInfo.getExecutionId(), "loopCounter", Integer.class);
|
|
|
if (!assigneeList.subList(loopCounter, assigneeList.size() - 1).contains(taskForm.getAssignee())) {
|
|
@@ -354,6 +357,7 @@ public class FlowTaskServiceImpl extends BaseServiceImpl<FlowTaskDao, FlowTask>
|
|
|
.eq(FlowActivity::getInstanceId, taskInfo.getProcessInstanceId())
|
|
|
.eq(FlowActivity::getNodeId, taskInfo.getTaskDefinitionKey())
|
|
|
.eq(FlowActivity::getUserId, taskForm.getAssignee())
|
|
|
+ // .isNull(FlowActivity::getEndTime)
|
|
|
.remove();
|
|
|
}
|
|
|
|