fix - 调整因为修复自动过审卡节点导致MQ 事件无法正确发出的问题
This commit is contained in:
parent
f5b8f66a39
commit
4935e3f8d2
@ -110,7 +110,9 @@ public class CustomApproveTaskCmd extends AbstractCommand<Void> implements Seria
|
||||
List<BpmnFlowNodeType> nodeTypes) {
|
||||
this.taskId = taskId;
|
||||
this.advice = advice;
|
||||
this.operationDesc = operationDesc;
|
||||
if (StringUtils.hasText(operationDesc)) {
|
||||
this.operationDesc = operationDesc;
|
||||
}
|
||||
this.attachmentList = attachmentList;
|
||||
this.approver = approver;
|
||||
this.nextApprover = nextApprover;
|
||||
|
||||
@ -1,19 +1,17 @@
|
||||
package cn.axzo.workflow.core.engine.tx.listener;
|
||||
|
||||
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskAuditDTO;
|
||||
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskDelegateAssigner;
|
||||
import cn.axzo.workflow.core.engine.cmd.CustomApproveTaskCmd;
|
||||
import cn.axzo.workflow.core.engine.cmd.CustomApproveTaskAsyncCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.flowable.common.engine.impl.cfg.TransactionListener;
|
||||
import org.flowable.common.engine.impl.interceptor.CommandConfig;
|
||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
|
||||
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
|
||||
import org.flowable.engine.ProcessEngineConfiguration;
|
||||
import org.flowable.engine.RuntimeService;
|
||||
import org.flowable.task.service.delegate.DelegateTask;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_TASK_RELATION_ASSIGNEE_INFO;
|
||||
|
||||
/**
|
||||
@ -47,9 +45,15 @@ public class AutoPassTransactionListener implements TransactionListener {
|
||||
BpmnTaskDelegateAssigner assigner = BpmnTaskDelegateAssigner.toObjectCompatible(
|
||||
runtimeService.getVariable(delegateTask.getProcessInstanceId(), INTERNAL_TASK_RELATION_ASSIGNEE_INFO + delegateTask.getId()));
|
||||
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutor();
|
||||
CommandConfig commandConfig = new CommandConfig().transactionRequiresNew();
|
||||
commandExecutor.execute(commandConfig, new CustomApproveTaskCmd(delegateTask.getId(), advice, "自动通过",
|
||||
Collections.emptyList(), assigner, null));
|
||||
|
||||
BpmnTaskAuditDTO pass = new BpmnTaskAuditDTO();
|
||||
pass.setTaskId(delegateTask.getId());
|
||||
pass.setAdvice(advice);
|
||||
pass.setApprover(assigner);
|
||||
commandExecutor.execute(new CustomApproveTaskAsyncCmd(pass));
|
||||
|
||||
// commandExecutor.execute(commandConfig, new CustomApproveTaskCmd(delegateTask.getId(), advice, "自动通过",
|
||||
// Collections.emptyList(), assigner, null));
|
||||
|
||||
log.info("exec auto pass transaction listener end");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user