Commit 487b2af1 by huangfusuper

【添加定义】添加运行记录的枚举类

parent 7ff3247d
package com.byit.enums;
/**
* @description: 运行记录的枚举类
* @author huangfu
*/
public enum RunRecordingEnum {
RUN_FLOW_SUCCESS("1","工作流运行成功")
,RUN_FLOW_FAILURE("2","工作流运行失败")
,RUN_FLOW_RE_SUCCESS("3","补批成功")
,RUN_FLOW_RE_FAILURE("4","补批失败")
,RUN_FLOW_KILL("5","工作流进程被杀死")
,FLOW_STATUS_NOT_RUN("1","工作流未开始")
,FLOW_STATUS_RUN_ING("2","工作流运行中")
,FLOW_STATUS_IS_STOP("3","工作流被暂停")
,FLOW_STATUS_IS_END("4","工作流已经完结")
;
private String code;
private String message;
RunRecordingEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}}
package com.byit.thread;
import cn.hutool.core.collection.CollectionUtil;
import com.byit.enums.RunRecordingEnum;
import com.byit.model.JobTaskRunLog;
import com.byit.model.RunRecording;
import com.byit.service.JobTaskRunLogService;
......@@ -162,7 +163,7 @@ public class LogScanHelper {
successNodes.forEach(successNode ->{
String runId = successNode.getRunId( );
Integer flowId = successNode.getFlowId( );
runRecordingService.updateRunRecordingByFlowIdAndRunId(RunRecording.builder().runId(runId).flowId(flowId).flowRunResult("1").flowStatus("4").build());
runRecordingService.updateRunRecordingByFlowIdAndRunId(RunRecording.builder().runId(runId).flowId(flowId).flowRunResult(RunRecordingEnum.RUN_FLOW_SUCCESS.getCode()).flowStatus(RunRecordingEnum.FLOW_STATUS_IS_END.getCode()).build());
successNode.setAlertEnd("1");
jobTaskRunLogService.updateJobTaskRunLog(successNode);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment