fix - 处理XXL——JOB 定时任务的逻辑处理

This commit is contained in:
wangli 2025-09-12 10:20:15 +08:00
parent 7d75eccfc2
commit d14696f8d6

View File

@ -69,16 +69,16 @@ public class NodeAlterJobHandler extends IJobHandler {
jobs.forEach(e -> {
XxlJobHelper.log("start execution of job: {}", JSON.toJSONString(e));
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(e.getProcessInstanceId()).singleResult();
if (Objects.isNull(processInstance)) {
executedJobs.add(e);
return;
}
if (!refreshProperties.getAlterAllDefinitionKey()) {
if (!ListUtils.emptyIfNull(refreshProperties.getAlterDefinitionKeys()).contains(processInstance.getProcessDefinitionKey())) {
XxlJobHelper.log("skip alter by config");
return;
}
}
if (Objects.isNull(processInstance)) {
executedJobs.add(e);
return;
}
List<Task> tasks = taskService.createTaskQuery()
.processInstanceId(e.getProcessInstanceId())
.taskDefinitionKey(e.getActivityId())