fix - 添加节点告警逻辑
This commit is contained in:
parent
0600c5c65b
commit
7d75eccfc2
@ -18,6 +18,7 @@ import com.xxl.job.core.context.XxlJobHelper;
|
|||||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.ListUtils;
|
||||||
import org.flowable.engine.RuntimeService;
|
import org.flowable.engine.RuntimeService;
|
||||||
import org.flowable.engine.TaskService;
|
import org.flowable.engine.TaskService;
|
||||||
import org.flowable.engine.runtime.ProcessInstance;
|
import org.flowable.engine.runtime.ProcessInstance;
|
||||||
@ -68,6 +69,12 @@ public class NodeAlterJobHandler extends IJobHandler {
|
|||||||
jobs.forEach(e -> {
|
jobs.forEach(e -> {
|
||||||
XxlJobHelper.log("start execution of job: {}", JSON.toJSONString(e));
|
XxlJobHelper.log("start execution of job: {}", JSON.toJSONString(e));
|
||||||
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(e.getProcessInstanceId()).singleResult();
|
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(e.getProcessInstanceId()).singleResult();
|
||||||
|
if (!refreshProperties.getAlterAllDefinitionKey()) {
|
||||||
|
if (!ListUtils.emptyIfNull(refreshProperties.getAlterDefinitionKeys()).contains(processInstance.getProcessDefinitionKey())) {
|
||||||
|
XxlJobHelper.log("skip alter by config");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (Objects.isNull(processInstance)) {
|
if (Objects.isNull(processInstance)) {
|
||||||
executedJobs.add(e);
|
executedJobs.add(e);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user