feat: 2.6.0

1. 添加日志
2. 添加阻塞策略
This commit is contained in:
byteblogs168 2023-12-28 23:36:32 +08:00
parent 52a77a3022
commit e5da8ce5c5
3 changed files with 7 additions and 4 deletions

View File

@ -35,8 +35,8 @@ public class WorkflowRequestVO {
@NotNull(message = "执行超时时间不能为空") @NotNull(message = "执行超时时间不能为空")
private Integer executorTimeout; private Integer executorTimeout;
// @NotNull(message = "阻塞策略不能为空") @NotNull(message = "阻塞策略不能为空")
// private Integer blockStrategy; private Integer blockStrategy;
/** /**
* 0关闭1开启 * 0关闭1开启

View File

@ -138,7 +138,7 @@ public class WorkflowServiceImpl implements WorkflowService {
LambdaQueryWrapper<Workflow> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Workflow> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(Workflow::getDeleted, StatusEnum.NO.getStatus()); queryWrapper.eq(Workflow::getDeleted, StatusEnum.NO.getStatus());
queryWrapper.eq(Workflow::getNamespaceId, userSessionVO.getNamespaceId()); queryWrapper.eq(Workflow::getNamespaceId, userSessionVO.getNamespaceId());
queryWrapper.orderByDesc(Workflow::getId);
PageDTO<Workflow> page = workflowMapper.selectPage(pageDTO, queryWrapper); PageDTO<Workflow> page = workflowMapper.selectPage(pageDTO, queryWrapper);
List<WorkflowResponseVO> jobResponseList = WorkflowConverter.INSTANCE.toWorkflowResponseVO(page.getRecords()); List<WorkflowResponseVO> jobResponseList = WorkflowConverter.INSTANCE.toWorkflowResponseVO(page.getRecords());
@ -236,6 +236,7 @@ public class WorkflowServiceImpl implements WorkflowService {
if (WorkflowNodeTypeEnum.CONDITION.getType() == nodeConfig.getNodeType()) { if (WorkflowNodeTypeEnum.CONDITION.getType() == nodeConfig.getNodeType()) {
workflowNode.setJobId(SystemConstants.CONDITION_JOB_ID); workflowNode.setJobId(SystemConstants.CONDITION_JOB_ID);
} }
Assert.isTrue(1 == workflowNodeMapper.insert(workflowNode), () -> new EasyRetryServerException("新增工作流节点失败")); Assert.isTrue(1 == workflowNodeMapper.insert(workflowNode), () -> new EasyRetryServerException("新增工作流节点失败"));
// 添加节点 // 添加节点
graph.addNode(workflowNode.getId()); graph.addNode(workflowNode.getId());
@ -244,6 +245,8 @@ public class WorkflowServiceImpl implements WorkflowService {
graph.putEdge(parentId, workflowNode.getId()); graph.putEdge(parentId, workflowNode.getId());
} }
parentIds1.add(workflowNode.getId()); parentIds1.add(workflowNode.getId());
log.warn("workflowNodeId:[{}] parentIds1: [{}] parentIds:[{}]",
workflowNode.getId(), JsonUtil.toJsonString(parentIds1),JsonUtil.toJsonString(parentIds));
buildGraph(Lists.newArrayList(workflowNode.getId()), groupName, workflowId, nodeInfo.getChildNode(), graph); buildGraph(Lists.newArrayList(workflowNode.getId()), groupName, workflowId, nodeInfo.getChildNode(), graph);
} }
} }

View File

@ -69,7 +69,7 @@
<span slot="workflowName" slot-scope="text, record"> <span slot="workflowName" slot-scope="text, record">
<a href="#" @click="handlerOpenDrawer(record)">{{ text }}</a> <a href="#" @click="handlerOpenDrawer(record)">{{ text }}</a>
</span> </span>
<span slot="jobStatus" slot-scope="text"> <span slot="workflowStatus" slot-scope="text">
<a-tag :color="workflowStatus[text].color"> <a-tag :color="workflowStatus[text].color">
{{ workflowStatus[text].name }} {{ workflowStatus[text].name }}
</a-tag> </a-tag>