feat(REQ-5865) - 测试 trigger 问题

This commit is contained in:
wangli 2025-11-27 18:52:14 +08:00
parent b68a6bec15
commit 5197a49637

View File

@ -15,7 +15,6 @@ import cn.axzo.workflow.core.engine.cmd.CustomBusinessNodeTimeoutCallbackCmd;
import cn.axzo.workflow.core.engine.cmd.CustomBusinessNodeTimeoutTriggerCmd;
import cn.axzo.workflow.core.service.BpmnProcessActivityService;
import cn.axzo.workflow.core.service.ExtAxHiTaskInstService;
import com.google.common.util.concurrent.Uninterruptibles;
import lombok.extern.slf4j.Slf4j;
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
import org.flowable.engine.RuntimeService;
@ -27,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.time.Duration;
import java.util.Objects;
import static cn.axzo.workflow.common.code.BpmnTaskRespCode.ACTIVITY_TRIGGER_NOT_EXISTS;
@ -50,21 +48,11 @@ public class BpmnProcessActivityServiceImpl implements BpmnProcessActivityServic
@Transactional(rollbackFor = Exception.class)
public void trigger(BpmnActivityTriggerDTO dto) {
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutor();
try {
if (Boolean.TRUE.equals(dto.getAsync())) {
commandExecutor.execute(new CustomActivityTriggerAsyncCmd(dto));
} else {
commandExecutor.execute(new CustomActivityTriggerCmd(dto));
}
} catch (Exception e) {
log.info("trigger error msg: {}", e.getMessage(), e);
Uninterruptibles.sleepUninterruptibly(Duration.ofSeconds(2));
if (Boolean.TRUE.equals(dto.getAsync())) {
commandExecutor.execute(new CustomActivityTriggerAsyncCmd(dto));
} else {
commandExecutor.execute(new CustomActivityTriggerCmd(dto));
}
}
}
@Override