fix - 增加一张新表来支撑业务节点告警问题

This commit is contained in:
wangli 2025-09-05 17:22:12 +08:00
parent f4168959e7
commit ffbf270948

View File

@ -12,7 +12,6 @@ import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.flowable.engine.impl.util.CommandContextUtil;
import org.flowable.job.service.TimerJobService;
import org.flowable.engine.impl.util.ProcessDefinitionUtil;
import org.flowable.task.service.impl.persistence.entity.TaskEntity;
import org.slf4j.Logger;
@ -66,9 +65,6 @@ public class CustomActivityTriggerCmd extends AbstractCommand<Void> implements S
addComment(commandContext, task, COMMENT_TYPE_OPERATION_DESC, "已同意");
RuntimeService runtimeService = processEngineConfiguration.getRuntimeService();
// 告警节点生产的定时任务需要删除否则会因为外键约束导致触发功能会重试并抛出触发节点不存在的问题
TimerJobService timerJobService = CommandContextUtil.getTimerJobService();
timerJobService.findTimerJobsByProcessInstanceId(task.getProcessInstanceId()).forEach(timerJobService::deleteTimerJob);
runtimeService.trigger(dto.getTriggerId());
return null;
}