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

处理逻辑启动工作流

上级 d53d86ff
......@@ -185,12 +185,21 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#assign wfParam=deLogicNode.getDstPSDELogicParam()>
<#assign wfLogicParam=(logicName+wfParam.codeName)?lower_case>
<#assign wfDECodeName=srfpluralize(wfDE.getCodeName()?lower_case)>
<#assign appName="">
<#if wfDE.hasPSAppDataEntity()??>
<#list wfDE.getAllPSAppDataEntities() as WFAppDE>
<#assign appName=((WFAppDE.getPSApplication().getPKGCodeName())!'')?lower_case>
<#break>
</#list>
</#if>
JSONObject activeData=(JSONObject) JSONObject.toJSON(${wfLogicParam});
Object businessKey=${wfLogicParam}.get("${wfDEKeyField}");
if(ObjectUtils.isEmpty(businessKey)){
throw new BadRequestAlertException("启动流程失败,[${wfParam.codeName?lower_case}]参数中未包含实体业务主键","StartWF","");
}
wfClient.wfstart("${sys.codeName}","","${wfDECodeName}",String.valueOf(businessKey),activeData);
String appName="${appName}";
if(StringUtils.isEmpty(appName))
throw new BadRequestAlertException("无法获取流程应用名称,请检查[${wfDE.getLogicName()}]实体是否已经添加到应用","StartWF","");
if(ObjectUtils.isEmpty(businessKey))
throw new BadRequestAlertException("启动流程失败,逻辑参数[${wfParam.codeName?lower_case}]中未包含实体业务主键","StartWF","");
wfClient.wfstart("${sys.codeName}",appName,"${wfDECodeName}",String.valueOf(businessKey),activeData);
</#if>
<#if delogic.getPSDELogicParams?? && delogic.getPSDELogicParams()??>
<#list delogic.getPSDELogicParams() as logicParam>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册