feat(REQ-5865) - 测试 trigger 问题
This commit is contained in:
parent
b68a6bec15
commit
5197a49637
@ -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.engine.cmd.CustomBusinessNodeTimeoutTriggerCmd;
|
||||||
import cn.axzo.workflow.core.service.BpmnProcessActivityService;
|
import cn.axzo.workflow.core.service.BpmnProcessActivityService;
|
||||||
import cn.axzo.workflow.core.service.ExtAxHiTaskInstService;
|
import cn.axzo.workflow.core.service.ExtAxHiTaskInstService;
|
||||||
import com.google.common.util.concurrent.Uninterruptibles;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
|
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
|
||||||
import org.flowable.engine.RuntimeService;
|
import org.flowable.engine.RuntimeService;
|
||||||
@ -27,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.Duration;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static cn.axzo.workflow.common.code.BpmnTaskRespCode.ACTIVITY_TRIGGER_NOT_EXISTS;
|
import static cn.axzo.workflow.common.code.BpmnTaskRespCode.ACTIVITY_TRIGGER_NOT_EXISTS;
|
||||||
@ -50,20 +48,10 @@ public class BpmnProcessActivityServiceImpl implements BpmnProcessActivityServic
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void trigger(BpmnActivityTriggerDTO dto) {
|
public void trigger(BpmnActivityTriggerDTO dto) {
|
||||||
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutor();
|
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutor();
|
||||||
try {
|
if (Boolean.TRUE.equals(dto.getAsync())) {
|
||||||
if (Boolean.TRUE.equals(dto.getAsync())) {
|
commandExecutor.execute(new CustomActivityTriggerAsyncCmd(dto));
|
||||||
commandExecutor.execute(new CustomActivityTriggerAsyncCmd(dto));
|
} else {
|
||||||
} else {
|
commandExecutor.execute(new CustomActivityTriggerCmd(dto));
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user