Commit f2b1247d by huangfusuper

发布工作流的时候保存工作流的内嵌层级

parent 9a797cf1
......@@ -151,7 +151,14 @@ public class ApiFlowServiceImpl implements ApiFlowService {
private Flow saveFlow(PluginFlow pluginFlow, Integer workspaceId, boolean isInnner, String upFlowName) throws Exception {
//拼装工作流名称
upFlowName = String.format("%s:%s",upFlowName,pluginFlow.getName());
Flow flow = new Flow();
FlowExtendedConfiguration extendedConfiguration = pluginFlow.getConfig().getExtendedConfiguration();
if(extendedConfiguration == null) {
extendedConfiguration = new FlowExtendedConfiguration();
}
extendedConfiguration.setFlowEmbedLogo(upFlowName);
flow.setExtendedConfiguration(JSON.toJSONString(extendedConfiguration));
flow.setFlowName(pluginFlow.getName());
flow.setIsInner(isInnner ? "0" : "1");
flow.setFlowNodeCount(pluginFlow.getNodeList().size());
......@@ -207,12 +214,6 @@ public class ApiFlowServiceImpl implements ApiFlowService {
Integer flowId = flowMapper.insertSelective(flow);
saveNode(pluginFlow.getNodeList(), flow, upFlowName);
}
FlowExtendedConfiguration extendedConfiguration = pluginFlow.getConfig().getExtendedConfiguration();
if(extendedConfiguration == null) {
extendedConfiguration = new FlowExtendedConfiguration();
}
extendedConfiguration.setFlowEmbedLogo(upFlowName);
flow.setExtendedConfiguration(JSON.toJSONString(extendedConfiguration));
return flow;
}
......
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