tokenEntity.terminationChildTokenWithTask(taskCommand.getTaskCommandType(), taskCommand.getName(), this.taskComment, userId, this.agent, this.admin);
//TokenEntity token = processInstanceImpl.getTokenMap().get(tokenId);
ExecutionContext executionContext = ProcessObjectFactory.FACTORYINSTANCE.createExecutionContext(tokenEntity);
//taskInstanceTemp.setAssigneeWithoutCascade(userId);
taskInstanceTemp.customEnd(taskCommand, taskComment);
tokenEntity.removeTaskInstanceSynchronization(taskCommand.getTaskCommandType(), taskCommand.getName(), this.taskComment, userId, this.agent, this.admin);
if (recoverToTask.getTaskGroup() != null) {
if (taskCommand != null) {
userTask.enter(executionContext);
}
try {
saveProcessInstance(commandContext);
} catch (Exception e) {
throw new FixFlowException("流程实例持久化失败!", e);
}
return null;
} else {
if (taskCommand != null) {
executionContext.setRollBackAssignee(recoverToTask.getAssignee());
userTask.enter(executionContext);
}
try {
saveProcessInstance(commandContext);
} catch (Exception e) {
throw new FixFlowException("流程实例持久化失败!", e);
}
return null;
}
} else {
ProcessDefinitionBehavior processDefinition = processInstanceImpl.getProcessDefinition();
UserTaskBehavior userTask = (UserTaskBehavior) processDefinition.getDefinitions().getElement(recoverNodeId);
TokenEntity tokenEntity = processInstanceImpl.getRootToken();
tokenEntity.terminationChildTokenWithTask(taskCommand.getTaskCommandType(), taskCommand.getName(), this.taskComment, userId, this.agent, this.admin);
//TokenEntity token = processInstanceImpl.getTokenMap().get(tokenId);
ExecutionContext executionContext = ProcessObjectFactory.FACTORYINSTANCE.createExecutionContext(tokenEntity);
//taskInstanceTemp.setAssigneeWithoutCascade(userId);
taskInstanceTemp.customEnd(taskCommand, taskComment);
tokenEntity.removeTaskInstanceSynchronization(taskCommand.getTaskCommandType(), taskCommand.getName(), this.taskComment, userId, this.agent, this.admin);
if (recoverToTask.getTaskGroup() != null) {
if (taskCommand != null) {
userTask.enter(executionContext);
}
try {
saveProcessInstance(commandContext);
} catch (Exception e) {
throw new FixFlowException("流程实例持久化失败!", e);
}
return null;
} else {
if (taskCommand != null) {
executionContext.setRollBackAssignee(recoverToTask.getAssignee());
userTask.enter(executionContext);
}
try {