Commit ca2722d2 by huangfusuper

增加工作流实例 加载状态

parent 46e550a9
...@@ -15,6 +15,7 @@ public enum RunRecordingEnum { ...@@ -15,6 +15,7 @@ public enum RunRecordingEnum {
,FLOW_STATUS_RUN_ING("2","工作流运行中") ,FLOW_STATUS_RUN_ING("2","工作流运行中")
,FLOW_STATUS_IS_STOP("3","工作流被暂停") ,FLOW_STATUS_IS_STOP("3","工作流被暂停")
,FLOW_STATUS_IS_END("4","工作流已经完结") ,FLOW_STATUS_IS_END("4","工作流已经完结")
,FLOW_STATUS_IS_LOAD("5","工作流已经被加载")
,FAIL_FAST_NO("0","不快速失败") ,FAIL_FAST_NO("0","不快速失败")
,FAIL_FAST_YES("1","快速失败") ,FAIL_FAST_YES("1","快速失败")
; ;
......
...@@ -56,9 +56,9 @@ public class RunRecording implements Serializable { ...@@ -56,9 +56,9 @@ public class RunRecording implements Serializable {
private String flowRunResult; private String flowRunResult;
/** /**
* 运行状态 1 未开始 2运行中 3暂停 4完成 * 运行状态 1 未开始 2运行中 3暂停 4完成 5.已加载
*/ */
@ApiModelProperty("运行状态 1 未开始 2运行中 3暂停 4完成") @ApiModelProperty("运行状态 1 未开始 2运行中 3暂停 4完成 5.已加载")
private String flowStatus; private String flowStatus;
/** /**
......
...@@ -49,8 +49,9 @@ public class RunRecordingServiceImpl implements RunRecordingService { ...@@ -49,8 +49,9 @@ public class RunRecordingServiceImpl implements RunRecordingService {
List<RunRecording> runRecordings = runRecordingMapper.findRunRecordingByFlowId(flowId); List<RunRecording> runRecordings = runRecordingMapper.findRunRecordingByFlowId(flowId);
for (RunRecording runRecording : runRecordings) { for (RunRecording runRecording : runRecordings) {
//判断当前的实例 中是否有 未完成的 //判断当前的实例 中是否有 未完成的
if (RunRecordingEnum.FLOW_STATUS_RUN_ING.getCode().equals(runRecording.getFlowStatus()) && if (RunRecordingEnum.FLOW_STATUS_RUN_ING.getCode().equals(runRecording.getFlowStatus()) ||
RunRecordingEnum.FLOW_STATUS_IS_STOP.getCode().equals(runRecording.getFlowStatus())) { RunRecordingEnum.FLOW_STATUS_IS_STOP.getCode().equals(runRecording.getFlowStatus()) ||
RunRecordingEnum.FLOW_STATUS_IS_LOAD.getCode().equals(runRecording.getFlowStatus())) {
return true; return true;
} }
} }
......
...@@ -147,7 +147,7 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask ...@@ -147,7 +147,7 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
log.info("---------开始查询等待工作流{}对应的数据-------------",waitingRecord); log.info("---------开始查询等待工作流{}对应的数据-------------",waitingRecord);
RunRecording runRecording = runRecordingService.findAllByRunID(waitingRecord.getRunId()); RunRecording runRecording = runRecordingService.findAllByRunID(waitingRecord.getRunId());
//将运行实例改为以执行 //将运行实例改为以执行
runRecording.setFlowStatus(RunRecordingEnum.FLOW_STATUS_RUN_ING.getCode()); runRecording.setFlowStatus(RunRecordingEnum.FLOW_STATUS_IS_LOAD.getCode());
runRecordingService.updateRunRecordingById(runRecording); runRecordingService.updateRunRecordingById(runRecording);
log.info("-------修改运行实例表成功,查询对应等待实例{},的等待节点-------",waitingRecord); log.info("-------修改运行实例表成功,查询对应等待实例{},的等待节点-------",waitingRecord);
List<WaitingTask> allByWaitId = taskService.findAllByWaitId(waitingRecord.getWaitId()); List<WaitingTask> allByWaitId = taskService.findAllByWaitId(waitingRecord.getWaitId());
......
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