提交 8ebafe95 编写于 作者: sq3536's avatar sq3536

init

上级 0657377d
<#ibiztemplate>
TARGET=PSDEACTION
</#ibiztemplate>
<#comment>引入驼峰配置</#comment>
<#ibizinclude>/SLN/globalfunc.cfg</#ibizinclude>
<#assign hasAfterLogic =false> <#assign hasAfterLogic =false>
<#assign hasAfterDrl=false> <#assign hasAfterDrl=false>
<#assign de=item.getPSDataEntity()> <#assign de=item.getPSDataEntity()>
<#if item.getAfterPSDEActionLogics?? && item.getAfterPSDEActionLogics()??> <#if item.getAfterPSDEActionLogics?? && item.getAfterPSDEActionLogics()??>
<#list item.getAfterPSDEActionLogics() as afterlogic> <#list item.getAfterPSDEActionLogics() as afterlogic>
<#if afterlogic.isValid()==true && afterlogic.getActionLogicType()?c!='2'> <#if afterlogic.isValid()==true>
<#if afterlogic.isInternalLogic() && afterlogic.getPSDELogic().isEnableBackend() && afterlogic.getPSDELogic().isCustomCode()== false> <#if afterlogic.isInternalLogic() && afterlogic.getPSDELogic().isEnableBackend()>
<#assign hasAfterLogic=true> <#assign hasAfterLogic=true>
<#elseif (afterlogic.getDstPSDE()!'')!='' && (afterlogic.getDstPSDEAction()!'')!='' && afterlogic.getDstPSDEAction().isEnableBackend()> <#elseif (afterlogic.getDstPSDE()!'')!='' && (afterlogic.getDstPSDEAction()!'')!='' && afterlogic.getDstPSDEAction().isEnableBackend()>
<#assign hasAfterLogic=true> <#assign hasAfterLogic=true>
...@@ -15,8 +20,8 @@ ...@@ -15,8 +20,8 @@
</#list> </#list>
</#if> </#if>
<#if hasAfterLogic> <#if hasAfterLogic>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:g="http://www.jboss.org/drools/flow/gpd" xmlns:tns="http://www.jboss.org/drools" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.mvel.org/2.0" id="Definition" name="" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes"> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:g="http://www.jboss.org/drools/flow/gpd" xmlns:tns="http://www.jboss.org/drools" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.mvel.org/2.0" id="Definition" name="" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">
<process id="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.${de.codeName?lower_case}.${item.codeName?lower_case}.afterLogic" isClosed="false" isExecutable="true" name="${de.getPSSystemModule().codeName?lower_case}_${de.codeName?lower_case}_${item.codeName?lower_case}_afterLogic" processType="Private" tns:packageName="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.${de.codeName?lower_case}.${item.codeName?lower_case}.afterLogic"> <process id="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.${de.codeName?lower_case}.${item.codeName?lower_case}.afterLogic" isClosed="false" isExecutable="true" name="${de.getPSSystemModule().codeName?lower_case}_${de.codeName?lower_case}_${item.codeName?lower_case}_afterLogic" processType="Private" tns:packageName="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.${de.codeName?lower_case}.${item.codeName?lower_case}.afterLogic">
<extensionElements> <extensionElements>
<tns:import name="java.util.Map"/> <tns:import name="java.util.Map"/>
...@@ -29,7 +34,7 @@ ...@@ -29,7 +34,7 @@
<#assign dataentity = afterlogic.getDstPSDE()> <#assign dataentity = afterlogic.getDstPSDE()>
<#assign deaction = afterlogic.getDstPSDEAction()> <#assign deaction = afterlogic.getDstPSDEAction()>
<#if !P.exists("refservice",dataentity+"service")> <#if !P.exists("refservice",dataentity+"service")>
<tns:metaData express="T(${pub.getPKGCodeName()}.util.security.SpringContextHolder).getBean(T(${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service))" name="${srfcaseformat(dataentity.getCodeName(),'l_u2lC')}Service" type="service"/> <tns:metaData express="T(${pub.getPKGCodeName()}.util.security.SpringContextHolder).getBean(T(${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service))" name="${srfr7templcaseformat(dataentity.getCodeName())}Service" type="service"/>
</#if> </#if>
</#if> </#if>
</#list> </#list>
...@@ -43,17 +48,17 @@ ...@@ -43,17 +48,17 @@
<endEvent id="prepareparam1_end" name="end"/> <endEvent id="prepareparam1_end" name="end"/>
<#assign source="begin"> <#assign source="begin">
<#list item.getAfterPSDEActionLogics() as afterlogic> <#list item.getAfterPSDEActionLogics() as afterlogic>
<#if afterlogic.isValid()==true && afterlogic.getActionLogicType()?c!='2'> <#if afterlogic.isValid()==true>
<#comment>实体行为附加逻辑</#comment> <#comment>实体行为附加逻辑</#comment>
<#if afterlogic.isInternalLogic() && afterlogic.getPSDELogic().isEnableBackend() && afterlogic.getPSDELogic().isCustomCode()== false> <#if afterlogic.isInternalLogic() && afterlogic.getPSDELogic().isEnableBackend()>
<#assign delogic = afterlogic.getPSDELogic()> <#assign delogic = afterlogic.getPSDELogic()>
<#assign target =afterlogic.getId()> <#assign target = afterlogic.getId()>
<callActivity activiti:exclusive="true" calledElement="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.service.logic.${de.codeName?lower_case}${delogic.getCodeName()?lower_case}" id="${target}" name="${delogic.codeName}.json.bpmn"/> <callActivity activiti:exclusive="true" calledElement="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.service.logic.${de.codeName?lower_case}${delogic.getCodeName()?lower_case}" id="${target}" name="${(de.codeName + delogic.codeName)+"RuleFlow.bpmn"}"/>
<#elseif afterlogic.getDstPSDEAction()?? && afterlogic.getDstPSDEAction().isEnableBackend()> <#elseif afterlogic.getDstPSDEAction()?? && afterlogic.getDstPSDEAction().isEnableBackend()>
<#assign dataentity = afterlogic.getDstPSDE()> <#assign dataentity = afterlogic.getDstPSDE()>
<#assign deaction = afterlogic.getDstPSDEAction()> <#assign deaction = afterlogic.getDstPSDEAction()>
<#assign groupName = (dataentity.codeName + deaction.codeName)?lower_case>
<#assign target = afterlogic.getId()> <#assign target = afterlogic.getId()>
<#assign groupName = (dataentity.codeName + deaction.codeName)?lower_case>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="${target}" id="${target}" implementation="http://www.jboss.org/drools/rule" name="${groupName}"/> <businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="${target}" id="${target}" implementation="http://www.jboss.org/drools/rule" name="${groupName}"/>
</#if> </#if>
<sequenceFlow id="${source}_${target}" sourceRef="${source}" targetRef="${target}"/> <sequenceFlow id="${source}_${target}" sourceRef="${source}" targetRef="${target}"/>
...@@ -65,5 +70,5 @@ ...@@ -65,5 +70,5 @@
</#list> </#list>
</#if> </#if>
</process> </process>
</definitions> </definitions>
</#if> </#if>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSDEACTION
</#ibiztemplate>
<#comment>引入驼峰配置</#comment>
<#ibizinclude>/SLN/globalfunc.cfg</#ibizinclude>
<#comment>实体行为调用实体行为</#comment> <#comment>实体行为调用实体行为</#comment>
<#assign hasAfterLogic =false> <#assign hasAfterLogic =false>
<#assign de=item.getPSDataEntity()> <#assign de=item.getPSDataEntity()>
<#if item.getAfterPSDEActionLogics?? && item.getAfterPSDEActionLogics()??> <#if item.getAfterPSDEActionLogics?? && item.getAfterPSDEActionLogics()??>
<#list item.getAfterPSDEActionLogics() as afterlogic> <#list item.getAfterPSDEActionLogics() as afterlogic>
<#if afterlogic.isValid()==true && afterlogic.getActionLogicType()?c!='2'> <#if afterlogic.isValid()==true>
<#if (afterlogic.getDstPSDE()!'')!='' && (afterlogic.getDstPSDEAction()!'')!='' && afterlogic.getDstPSDEAction().isEnableBackend()> <#if (afterlogic.getDstPSDE()!'')!='' && (afterlogic.getDstPSDEAction()!'')!='' && afterlogic.getDstPSDEAction().isEnableBackend()>
<#assign hasAfterLogic=true> <#assign hasAfterLogic=true>
<#assign dataentity = afterlogic.getDstPSDE()> <#assign dataentity = afterlogic.getDstPSDE()>
<#if !P.exists("refservice",dataentity+"service")> <#if !P.exists("refservice",dataentity+"service")>
global ${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service ${srfcaseformat(dataentity.getCodeName(),'l_u2lC')}Service; global ${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service ${srfr7templcaseformat(dataentity.getCodeName())}Service;
</#if> </#if>
</#if> </#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#if hasAfterLogic> <#if hasAfterLogic>
global ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.domain.${de.getCodeName()} et; import ${pub.getPKGCodeName()}.util.helper.CachedBeanCopier;
global ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.domain.${de.getCodeName()} et;
<#if item.getAfterPSDEActionLogics?? && item.getAfterPSDEActionLogics()??> <#if item.getAfterPSDEActionLogics?? && item.getAfterPSDEActionLogics()??>
no-loop no-loop
<#list item.getAfterPSDEActionLogics() as afterlogic> <#list item.getAfterPSDEActionLogics() as afterlogic>
<#comment>实体行为附加逻辑</#comment> <#comment>实体行为附加逻辑</#comment>
<#if afterlogic.isValid()==true && afterlogic.getActionLogicType()?c!='2' && afterlogic.getDstPSDEAction()?? && afterlogic.getDstPSDEAction().isEnableBackend()> <#if afterlogic.isValid()==true && afterlogic.getDstPSDEAction()?? && afterlogic.getDstPSDEAction().isEnableBackend()>
<#assign dataentity = afterlogic.getDstPSDE()> <#assign dataentity = afterlogic.getDstPSDE()>
<#assign deaction = afterlogic.getDstPSDEAction()> <#assign deaction = afterlogic.getDstPSDEAction()>
<#assign dataentityCodeName = afterlogic.getDstPSDE().codeName> <#assign dataentityCodeName = afterlogic.getDstPSDE().codeName>
<#assign deactionCodeName = srfmethodname(afterlogic.getDstPSDEAction().codeName)> <#assign deactionCodeName = srfmethodname(afterlogic.getDstPSDEAction().codeName)>
<#assign groupName = (dataentity.codeName + deaction.codeName)?lower_case> <#assign groupName = (dataentity.codeName + deaction.codeName)?lower_case>
<#assign target = afterlogic.getId()> <#assign target = afterlogic.getId()>
rule "${groupName}" rule "${groupName}"
ruleflow-group "${target}" ruleflow-group "${target}"
when when
...@@ -40,7 +45,6 @@ ...@@ -40,7 +45,6 @@
</#if> </#if>
</#if> </#if>
<#comment>附加实体行为</#comment> <#comment>附加实体行为</#comment>
<#macro addActionLogic deaction actionlogic> <#macro addActionLogic deaction actionlogic>
<#assign actionLogicDE=actionlogic.getDstPSDE()> <#assign actionLogicDE=actionlogic.getDstPSDE()>
...@@ -49,9 +53,9 @@ ...@@ -49,9 +53,9 @@
<#assign sourceCodeName=deaction.getCodeName()?lower_case> <#assign sourceCodeName=deaction.getCodeName()?lower_case>
<#assign targetActionType=actionLogicDEAction.getActionType()> <#assign targetActionType=actionLogicDEAction.getActionType()>
<#assign targetCodeName=actionLogicDEAction.getCodeName()?lower_case> <#assign targetCodeName=actionLogicDEAction.getCodeName()?lower_case>
<#if ((sourceActionType=='SCRIPT')|| (sourceActionType=='USERCUSTOM')|| sourceActionType=='DELOGIC'|| sourceCodeName == "create" || sourceCodeName == "update" || <#if ((sourceActionType=='USERCUSTOM')|| sourceActionType=='DELOGIC'|| sourceCodeName == "create" || sourceCodeName == "update" ||
sourceCodeName == "save" || sourceCodeName == "getdraft" || sourceCodeName == "checkkey") && sourceCodeName == "save" || sourceCodeName == "getdraft" || sourceCodeName == "checkkey") &&
((targetActionType=='SCRIPT')|| (targetActionType=='USERCUSTOM')|| targetActionType=='DELOGIC'|| targetCodeName == "create" || targetCodeName == "update" || ((targetActionType=='USERCUSTOM')|| targetActionType=='DELOGIC'|| targetCodeName == "create" || targetCodeName == "update" ||
targetCodeName == "save" || targetCodeName == "getdraft" || targetCodeName == "checkkey")> targetCodeName == "save" || targetCodeName == "getdraft" || targetCodeName == "checkkey")>
<#if actionlogic.isIgnoreException()?? && actionlogic.isIgnoreException()==true> <#if actionlogic.isIgnoreException()?? && actionlogic.isIgnoreException()==true>
try { try {
...@@ -82,15 +86,15 @@ ...@@ -82,15 +86,15 @@
<#assign actionLogicDE=actionlogic.getDstPSDE()> <#assign actionLogicDE=actionlogic.getDstPSDE()>
<#assign actionLogicDEAction=actionlogic.getDstPSDEAction()> <#assign actionLogicDEAction=actionlogic.getDstPSDEAction()>
${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()} actionLogicDE =new ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()}(); ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()} actionLogicDE =new ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()}();
et.copyTo(actionLogicDE,true); CachedBeanCopier.copy(et, actionLogicDE);
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE); ${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE);
</#macro> </#macro>
<#comment>实体行为附加逻辑-remove</#comment> <#comment>实体行为附加逻辑-remove</#comment>
<#macro actionLogic_remove actionlogic> <#macro actionLogic_remove actionlogic>
<#if de.getKeyPSDEField().getStdDataType()==actionLogicDE.getKeyPSDEField().getStdDataType()> <#if de.getKeyPSDEField().getStdDataType()==actionLogicDE.getKeyPSDEField().getStdDataType()>
<#assign privateCodeName = srfcaseformat(de.getKeyPSDEField().getCodeName(),'l_u2lC') > <#assign privateCodeName = srfr7templcaseformat(de.getKeyPSDEField().getCodeName()) >
<#assign publicCodeName = privateCodeName?cap_first > <#assign publicCodeName = privateCodeName?cap_first >
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.remove(et.get${publicCodeName}()); ${srfr7templcaseformat(actionLogicDE.getCodeName())}Service.remove(et.get${publicCodeName}());
</#if> </#if>
</#macro> </#macro>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSDEACTION
</#ibiztemplate>
<#comment>引入驼峰配置</#comment>
<#ibizinclude>/SLN/globalfunc.cfg</#ibizinclude>
<#assign hasBeforeLogic =false> <#assign hasBeforeLogic =false>
<#assign hasBeforeDrl=false> <#assign hasBeforeDrl=false>
<#assign de=item.getPSDataEntity()> <#assign de=item.getPSDataEntity()>
<#if item.getBeforePSDEActionLogics?? && item.getBeforePSDEActionLogics()??> <#if item.getBeforePSDEActionLogics?? && item.getBeforePSDEActionLogics()??>
<#list item.getBeforePSDEActionLogics() as beforelogic> <#list item.getBeforePSDEActionLogics() as beforelogic>
<#if beforelogic.isValid()==true && beforelogic.getActionLogicType()?c!='2'> <#if beforelogic.isValid()==true>
<#if beforelogic.isInternalLogic() && beforelogic.getPSDELogic().isEnableBackend() && beforelogic.getPSDELogic().isCustomCode()== false> <#if beforelogic.isInternalLogic() && beforelogic.getPSDELogic().isEnableBackend()>
<#assign hasBeforeLogic=true> <#assign hasBeforeLogic=true>
<#elseif (beforelogic.getDstPSDE()!'')!='' && (beforelogic.getDstPSDEAction()!'')!='' && beforelogic.getDstPSDEAction().isEnableBackend()> <#elseif (beforelogic.getDstPSDE()!'')!='' && (beforelogic.getDstPSDEAction()!'')!='' && beforelogic.getDstPSDEAction().isEnableBackend()>
<#assign hasBeforeLogic=true> <#assign hasBeforeLogic=true>
...@@ -15,8 +20,8 @@ ...@@ -15,8 +20,8 @@
</#list> </#list>
</#if> </#if>
<#if hasBeforeLogic> <#if hasBeforeLogic>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:g="http://www.jboss.org/drools/flow/gpd" xmlns:tns="http://www.jboss.org/drools" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.mvel.org/2.0" id="Definition" name="" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes"> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:g="http://www.jboss.org/drools/flow/gpd" xmlns:tns="http://www.jboss.org/drools" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.mvel.org/2.0" id="Definition" name="" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">
<process id="${pub.getPKGCodeName()}.core.extensions.service.logic.before" isClosed="false" isExecutable="true" name="${de.getPSSystemModule().codeName?lower_case}_${de.codeName?lower_case}_${item.codeName?lower_case}_beforeLogic" processType="Private" tns:packageName="${pub.getPKGCodeName()}.core.extensions.service.logic.before"> <process id="${pub.getPKGCodeName()}.core.extensions.service.logic.before" isClosed="false" isExecutable="true" name="${de.getPSSystemModule().codeName?lower_case}_${de.codeName?lower_case}_${item.codeName?lower_case}_beforeLogic" processType="Private" tns:packageName="${pub.getPKGCodeName()}.core.extensions.service.logic.before">
<extensionElements> <extensionElements>
<tns:import name="java.util.Map"/> <tns:import name="java.util.Map"/>
...@@ -29,7 +34,7 @@ ...@@ -29,7 +34,7 @@
<#assign dataentity = beforelogic.getDstPSDE()> <#assign dataentity = beforelogic.getDstPSDE()>
<#assign deaction = beforelogic.getDstPSDEAction()> <#assign deaction = beforelogic.getDstPSDEAction()>
<#if !P.exists("refservice",dataentity+"service")> <#if !P.exists("refservice",dataentity+"service")>
<tns:metaData express="T(${pub.getPKGCodeName()}.util.security.SpringContextHolder).getBean(T(${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service))" name="${srfcaseformat(dataentity.getCodeName(),'l_u2lC')}Service" type="service"/> <tns:metaData express="T(${pub.getPKGCodeName()}.util.security.SpringContextHolder).getBean(T(${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service))" name="${srfr7templcaseformat(dataentity.getCodeName())}Service" type="service"/>
</#if> </#if>
</#if> </#if>
</#list> </#list>
...@@ -43,18 +48,17 @@ ...@@ -43,18 +48,17 @@
<endEvent id="prepareparam1_end" name="end"/> <endEvent id="prepareparam1_end" name="end"/>
<#assign source="begin"> <#assign source="begin">
<#list item.getBeforePSDEActionLogics() as beforelogic> <#list item.getBeforePSDEActionLogics() as beforelogic>
<#if beforelogic.isValid()==true && beforelogic.getActionLogicType()?c!='2'> <#if beforelogic.isValid()==true>
<#comment>实体行为附加逻辑</#comment> <#comment>实体行为附加逻辑</#comment>
<#if beforelogic.isInternalLogic() && beforelogic.getPSDELogic().isEnableBackend() && beforelogic.getPSDELogic().isCustomCode()== false> <#if beforelogic.isInternalLogic() && beforelogic.getPSDELogic().isEnableBackend()>
<#assign delogic = beforelogic.getPSDELogic()> <#assign delogic = beforelogic.getPSDELogic()>
<#assign target =beforelogic.getId()> <#assign target =beforelogic.getId()>
<callActivity activiti:exclusive="true" calledElement="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.service.logic.${de.codeName?lower_case}${delogic.getCodeName()?lower_case}" id="${target}" name="${delogic.codeName}.json.bpmn"/> <callActivity activiti:exclusive="true" calledElement="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.service.logic.${de.codeName?lower_case}${delogic.getCodeName()?lower_case}" id="${target}" name="${(de.codeName + delogic.codeName)+"RuleFlow.bpmn"}"/>
<#elseif beforelogic.getDstPSDEAction()?? && beforelogic.getDstPSDEAction().isEnableBackend()> <#elseif beforelogic.getDstPSDEAction()?? && beforelogic.getDstPSDEAction().isEnableBackend()>
<#assign dataentity = beforelogic.getDstPSDE()> <#assign dataentity = beforelogic.getDstPSDE()>
<#assign deaction = beforelogic.getDstPSDEAction()> <#assign deaction = beforelogic.getDstPSDEAction()>
<#assign target = beforelogic.getId()> <#assign target = beforelogic.getId()>
<#assign groupName = (dataentity.codeName + deaction.codeName)?lower_case> <#assign groupName = (dataentity.codeName + deaction.codeName)?lower_case>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="${target}" id="${target}" implementation="http://www.jboss.org/drools/rule" name="${groupName}"/> <businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="${target}" id="${target}" implementation="http://www.jboss.org/drools/rule" name="${groupName}"/>
</#if> </#if>
<sequenceFlow id="${source}_${target}" sourceRef="${source}" targetRef="${target}"/> <sequenceFlow id="${source}_${target}" sourceRef="${source}" targetRef="${target}"/>
...@@ -66,5 +70,5 @@ ...@@ -66,5 +70,5 @@
</#list> </#list>
</#if> </#if>
</process> </process>
</definitions> </definitions>
</#if> </#if>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSDEACTION
</#ibiztemplate>
<#comment>引入驼峰配置</#comment>
<#ibizinclude>/SLN/globalfunc.cfg</#ibizinclude>
<#comment>实体行为调用实体行为</#comment> <#comment>实体行为调用实体行为</#comment>
<#assign hasBeforeLogic =false> <#assign hasBeforeLogic =false>
<#assign de=item.getPSDataEntity()> <#assign de=item.getPSDataEntity()>
<#if item.getBeforePSDEActionLogics?? && item.getBeforePSDEActionLogics()??> <#if item.getBeforePSDEActionLogics?? && item.getBeforePSDEActionLogics()??>
<#list item.getBeforePSDEActionLogics() as beforelogic> <#list item.getBeforePSDEActionLogics() as beforelogic>
<#if beforelogic.isValid()==true && beforelogic.getActionLogicType()?c!='2'> <#if beforelogic.isValid()==true>
<#if (beforelogic.getDstPSDE()!'')!='' && (beforelogic.getDstPSDEAction()!'')!='' && beforelogic.getDstPSDEAction().isEnableBackend()> <#if (beforelogic.getDstPSDE()!'')!='' && (beforelogic.getDstPSDEAction()!'')!='' && beforelogic.getDstPSDEAction().isEnableBackend()>
<#assign hasBeforeLogic=true> <#assign hasBeforeLogic=true>
<#assign dataentity = beforelogic.getDstPSDE()> <#assign dataentity = beforelogic.getDstPSDE()>
<#if !P.exists("refservice",dataentity+"service")> <#if !P.exists("refservice",dataentity+"service")>
global ${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service ${srfcaseformat(dataentity.getCodeName(),'l_u2lC')}Service; global ${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service ${srfr7templcaseformat(dataentity.getCodeName())}Service;
</#if> </#if>
</#if> </#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#if hasBeforeLogic> <#if hasBeforeLogic>
global ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.domain.${de.getCodeName()} et; import ${pub.getPKGCodeName()}.util.helper.CachedBeanCopier;
global ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.domain.${de.getCodeName()} et;
<#if item.getBeforePSDEActionLogics?? && item.getBeforePSDEActionLogics()??> <#if item.getBeforePSDEActionLogics?? && item.getBeforePSDEActionLogics()??>
no-loop no-loop
<#list item.getBeforePSDEActionLogics() as beforelogic> <#list item.getBeforePSDEActionLogics() as beforelogic>
<#comment>实体行为附加逻辑</#comment> <#comment>实体行为附加逻辑</#comment>
<#if beforelogic.isValid()==true && beforelogic.getActionLogicType()?c!='2' && beforelogic.getDstPSDEAction()?? && beforelogic.getDstPSDEAction().isEnableBackend()> <#if beforelogic.isValid()==true && beforelogic.getDstPSDEAction()?? && beforelogic.getDstPSDEAction().isEnableBackend()>
<#assign dataentity = beforelogic.getDstPSDE()> <#assign dataentity = beforelogic.getDstPSDE()>
<#assign deaction = beforelogic.getDstPSDEAction()> <#assign deaction = beforelogic.getDstPSDEAction()>
<#assign dataentityCodeName = beforelogic.getDstPSDE().codeName> <#assign dataentityCodeName = beforelogic.getDstPSDE().codeName>
<#assign deactionCodeName = srfmethodname(beforelogic.getDstPSDEAction().codeName)> <#assign deactionCodeName = srfmethodname(beforelogic.getDstPSDEAction().codeName)>
<#assign groupName = (dataentity.codeName + deaction.codeName)?lower_case> <#assign groupName = (dataentity.codeName + deaction.codeName)?lower_case>
<#assign target = beforelogic.getId()> <#assign target = beforelogic.getId()>
rule "${groupName}" rule "${groupName}"
ruleflow-group "${target}" ruleflow-group "${target}"
when when
...@@ -48,9 +53,9 @@ ...@@ -48,9 +53,9 @@
<#assign sourceCodeName=deaction.getCodeName()?lower_case> <#assign sourceCodeName=deaction.getCodeName()?lower_case>
<#assign targetActionType=actionLogicDEAction.getActionType()> <#assign targetActionType=actionLogicDEAction.getActionType()>
<#assign targetCodeName=actionLogicDEAction.getCodeName()?lower_case> <#assign targetCodeName=actionLogicDEAction.getCodeName()?lower_case>
<#if ((sourceActionType=='SCRIPT')|| (sourceActionType=='USERCUSTOM')|| sourceActionType=='DELOGIC'|| sourceCodeName == "create" || sourceCodeName == "update" || <#if ((sourceActionType=='USERCUSTOM')|| sourceActionType=='DELOGIC'|| sourceCodeName == "create" || sourceCodeName == "update" ||
sourceCodeName == "save" || sourceCodeName == "getdraft" || sourceCodeName == "checkkey") && sourceCodeName == "save" || sourceCodeName == "getdraft" || sourceCodeName == "checkkey") &&
((targetActionType=='SCRIPT')|| (targetActionType=='USERCUSTOM')|| targetActionType=='DELOGIC'|| targetCodeName == "create" || targetCodeName == "update" || ((targetActionType=='USERCUSTOM')|| targetActionType=='DELOGIC'|| targetCodeName == "create" || targetCodeName == "update" ||
targetCodeName == "save" || targetCodeName == "getdraft" || targetCodeName == "checkkey")> targetCodeName == "save" || targetCodeName == "getdraft" || targetCodeName == "checkkey")>
<#if actionlogic.isIgnoreException()?? && actionlogic.isIgnoreException()==true> <#if actionlogic.isIgnoreException()?? && actionlogic.isIgnoreException()==true>
try { try {
...@@ -81,15 +86,15 @@ ...@@ -81,15 +86,15 @@
<#assign actionLogicDE=actionlogic.getDstPSDE()> <#assign actionLogicDE=actionlogic.getDstPSDE()>
<#assign actionLogicDEAction=actionlogic.getDstPSDEAction()> <#assign actionLogicDEAction=actionlogic.getDstPSDEAction()>
${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()} actionLogicDE =new ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()}(); ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()} actionLogicDE =new ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()}();
et.copyTo(actionLogicDE,true); CachedBeanCopier.copy(et, actionLogicDE);
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE); ${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE);
</#macro> </#macro>
<#comment>实体行为附加逻辑-remove</#comment> <#comment>实体行为附加逻辑-remove</#comment>
<#macro actionLogic_remove actionlogic> <#macro actionLogic_remove actionlogic>
<#if de.getKeyPSDEField().getStdDataType()==actionLogicDE.getKeyPSDEField().getStdDataType()> <#if de.getKeyPSDEField().getStdDataType()==actionLogicDE.getKeyPSDEField().getStdDataType()>
<#assign privateCodeName = srfcaseformat(de.getKeyPSDEField().getCodeName(),'l_u2lC') > <#assign privateCodeName = srfr7templcaseformat(de.getKeyPSDEField().getCodeName()) >
<#assign publicCodeName = privateCodeName?cap_first > <#assign publicCodeName = privateCodeName?cap_first >
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.remove(et.get${publicCodeName}()); ${srfr7templcaseformat(actionLogicDE.getCodeName())}Service.remove(et.get${publicCodeName}());
</#if> </#if>
</#macro> </#macro>
\ No newline at end of file
<#if item.getActionType()=='DELOGIC' && item.getPSDELogic()?? && item.getPSDELogic().isEnableBackend() && item.getPSDELogic().isCustomCode()== false> <#ibiztemplate>
<#assign de=item.getPSDataEntity()> TARGET=PSDEACTION
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> </#ibiztemplate>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:g="http://www.jboss.org/drools/flow/gpd" xmlns:tns="http://www.jboss.org/drools" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.mvel.org/2.0" id="Definition" name="" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes"> <#if item.getActionType()=='DELOGIC' && item.getPSDELogic()?? && item.getPSDELogic().isEnableBackend()>
<process id="${pub.getPKGCodeName()}.core.extensions.service.logic.execute" isClosed="false" isExecutable="true" name="${de.getPSSystemModule().codeName?lower_case}_${de.codeName?lower_case}_${item.codeName?lower_case}_execLogic" processType="Private" tns:packageName="${pub.getPKGCodeName()}.core.extensions.service.logic.execute"> <#assign de=item.getPSDataEntity()>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:g="http://www.jboss.org/drools/flow/gpd" xmlns:tns="http://www.jboss.org/drools" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.mvel.org/2.0" id="Definition" name="" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">
<process id="${pub.getPKGCodeName()}.core.extensions.service.logic.execute" isClosed="false" isExecutable="true" name="${de.getPSSystemModule().codeName?lower_case}_${de.codeName?lower_case}_${item.codeName?lower_case}.execLogic" processType="Private" tns:packageName="${pub.getPKGCodeName()}.core.extensions.service.logic.execute">
<extensionElements> <extensionElements>
<tns:import name="java.util.Map"/> <tns:import name="java.util.Map"/>
<tns:import name="org.springframework.util.StringUtils"/> <tns:import name="org.springframework.util.StringUtils"/>
...@@ -15,10 +18,10 @@ ...@@ -15,10 +18,10 @@
<startEvent id="begin" isInterrupting="true"/> <startEvent id="begin" isInterrupting="true"/>
<endEvent id="prepareparam1_end" name="end"/> <endEvent id="prepareparam1_end" name="end"/>
<#assign target = action.getCodeName()> <#assign target = action.getCodeName()>
<callActivity activiti:exclusive="true" calledElement="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.service.logic.${de.codeName?lower_case}${delogic.getCodeName()?lower_case}" id="${target}" name="${delogic.codeName}.json.bpmn"/> <callActivity activiti:exclusive="true" calledElement="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.service.logic.${de.codeName?lower_case}${delogic.getCodeName()?lower_case}" id="${target}" name="${(de.codeName + delogic.codeName)+"RuleFlow.bpmn"}"/>
<sequenceFlow id="${source}_${target}" sourceRef="${source}" targetRef="${target}"/> <sequenceFlow id="${source}_${target}" sourceRef="${source}" targetRef="${target}"/>
<#assign source = target> <#assign source = target>
<sequenceFlow id="${source}_${target}" sourceRef="${source}" targetRef="prepareparam1_end"/> <sequenceFlow id="${source}_${target}" sourceRef="${source}" targetRef="prepareparam1_end"/>
</process> </process>
</definitions> </definitions>
</#if> </#if>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册