提交 ca80edb4 编写于 作者: zhouweidong's avatar zhouweidong

将逻辑中的id调整为codename

上级 c7b60415
......@@ -24,24 +24,25 @@ TARGET=PSDELOGIC
<#if item.getPSDELogicNodes?? && item.getPSDELogicNodes()??>
<#list item.getPSDELogicNodes() as logicNode>
<#if logicNode.getLogicNodeType()=='BEGIN'>
<startEvent id="${logicNode.getId()}" isInterrupting="true"/>
<startEvent id="${logicNode.getCodeName()}" isInterrupting="true"/>
<#else>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="${logicName+logicNode.getCodeName()?lower_case}" id="${logicNode.getId()}" implementation="http://www.jboss.org/drools/rule" name="${logicNode.getName()}"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="${logicName+logicNode.getCodeName()?lower_case}" id="${logicNode.getCodeName()}" implementation="http://www.jboss.org/drools/rule" name="${logicNode.getName()}"/>
</#if>
<#if !(logicNode.getPSDELogicLinks()??)><#comment>是否为流程最后一个处理节点,若为最后一个处理节点则生成End节点</#comment>
<endEvent id="${logicNode.getId()}_End" name="End"/>
<sequenceFlow id="${logicNode.getId()}_End_Line" sourceRef="${logicNode.getId()}" targetRef="${logicNode.getId()}_End"/><#comment>生成流程最后一个处理节点与End节点之间的连线</#comment>
<endEvent id="${logicNode.getCodeName()}_End" name="End"/>
<sequenceFlow id="${logicNode.getCodeName()}_End_Line" sourceRef="${logicNode.getCodeName()}" targetRef="${logicNode.getCodeName()}_End"/><#comment>生成流程最后一个处理节点与End节点之间的连线</#comment>
</#if>
</#list>
</#if>
<#comment>绘制节点连线</#comment>
<#if item.getPSDELogicLinks?? && item.getPSDELogicLinks()??>
<#list item.getPSDELogicLinks() as LogicLink>
<#assign sourceNodeid=LogicLink.getSrcPSDELogicNode().getId()>
<#assign sourceNodeId=LogicLink.getSrcPSDELogicNode().getCodeName()>
<#if LogicLink.getPSDELogicLinkGroupCond?? && LogicLink.getPSDELogicLinkGroupCond()??><#comment>判断连接线含有条件,若有条件,则将源节点指向网关</#comment>
<#assign sourceNodeid="gateway-"+LogicLink.getSrcPSDELogicNode().getId()>
<#assign sourceNodeId="gateway-"+LogicLink.getSrcPSDELogicNode().getCodeName()>
</#if>
<sequenceFlow id="${LogicLink.getId()}" sourceRef="${sourceNodeid}" targetRef="${LogicLink.getDstPSDELogicNode().getId()}">
<#assign targetNodeId=LogicLink.getDstPSDELogicNode().getCodeName()>
<sequenceFlow id="${sourceNodeId}_${targetNodeId}" sourceRef="${sourceNodeId}" targetRef="${targetNodeId}">
<#if LogicLink.getPSDELogicLinkGroupCond?? && LogicLink.getPSDELogicLinkGroupCond()??><#comment>连接线含有条件</#comment>
<conditionExpression language="http://www.jboss.org/drools/rule" ><![CDATA[
<#comment>准备逻辑参数</#comment>
......@@ -70,17 +71,18 @@ TARGET=PSDELOGIC
<#if item.getPSDELogicLinks?? && item.getPSDELogicLinks()??>
<#list item.getPSDELogicLinks() as LogicLink>
<#if LogicLink.getPSDELogicLinkGroupCond?? && LogicLink.getPSDELogicLinkGroupCond()??><#comment>连接线含有条件</#comment>
<#assign gatewayid="gateway-"+LogicLink.getSrcPSDELogicNode().getId()>
<#if !P.exists("gateway",gatewayid)>
<#assign gatewayId="gateway-"+LogicLink.getSrcPSDELogicNode().getCodeName()>
<#if !P.exists("gateway",gatewayId)>
<#comment>绘制网关</#comment>
<exclusiveGateway id="${gatewayid}" name="Gateway" gatewayDirection="Diverging" default="${gatewayid}_End_Line"></exclusiveGateway>
<exclusiveGateway id="${gatewayId}" name="Gateway" gatewayDirection="Diverging" default="${gatewayId}_End_Line"></exclusiveGateway>
<#comment>绘制网关与源节点的连线</#comment>
<sequenceFlow id="${LogicLink.getId()}-gatewayline" sourceRef="${LogicLink.getSrcPSDELogicNode().getId()}" targetRef="${gatewayid}"></sequenceFlow>
<#assign sourceNodeId=LogicLink.getSrcPSDELogicNode().getCodeName()>
<sequenceFlow id="${sourceNodeId}_${gatewayId}_gatewayLine" sourceRef="${sourceNodeId}" targetRef="${gatewayId}"></sequenceFlow>
</#if>
<#comment>绘制网关默认结束节点</#comment>
<#if !P.exists("gateway-end",gatewayid)>
<sequenceFlow id="${gatewayid}_End_Line" sourceRef="${gatewayid}" targetRef="${gatewayid}_End"/><#comment>生成流程最后一个处理节点与End节点之间的连线</#comment>
<endEvent id="${gatewayid}_End" name="End"/>
<#if !P.exists("gateway-end",gatewayId)>
<sequenceFlow id="${gatewayId}_End_Line" sourceRef="${gatewayId}" targetRef="${gatewayId}_End"/><#comment>生成流程最后一个处理节点与End节点之间的连线</#comment>
<endEvent id="${gatewayId}_End" name="End"/>
</#if>
</#if>
</#list>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册