{{#if entityLogic.isEnableBackend}}
package {{packageName}}.{{entityLogic.entity.module}}.logic.{{lowerCase entityLogic.entity.codeName}}logic.{{lowerCase entityLogic.codeName}};

import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
import org.springframework.util.ObjectUtils;
import cn.ibizlab.util.errors.BadRequestAlertException;

{{#each entityLogic.ruleGlobalParams as |ruleGlobalParam|}}
{{ruleGlobalParam}}
{{/each}}

no-loop
{{#each entityLogic.logicNodeModels as |logicNodeModel|}}

//逻辑处理节点[{{logicNodeModel.name}}]
rule "{{lowerCase logicNodeModel.codeName}}"
ruleflow-group "{{lowerCase logicNodeModel.codeName}}group"
  when
  then
{{#eq logicNodeModel.logicNodeType "PREPAREPARAM"}}{{> @macro/logic/drl/PrepareParam.hbs logicNodeModel=logicNodeModel}}{{/eq}}
{{#eq logicNodeModel.logicNodeType "DEACTION"}}{{> @macro/logic/drl/DEAction.hbs logicNodeModel=logicNodeModel}}{{/eq}}
{{#eq logicNodeModel.logicNodeType "RAWSQLCALL"}}{{> @macro/logic/drl/RawSQLCall.hbs logicNodeModel=logicNodeModel}}{{/eq}}
{{#eq logicNodeModel.logicNodeType "RAWSQLANDLOOPCALL"}}{{> @macro/logic/drl/RawSQLAndLoopCall.hbs logicNodeModel=logicNodeModel}}{{/eq}}
{{#eq logicNodeModel.logicNodeType "STARTWF"}}{{> @macro/logic/drl/StartWF.hbs logicNodeModel=logicNodeModel}}{{/eq}}
{{#each entityLogic.pSDELogicParams as |logicParam|}}
    update(param_{{lowerCase logicParam.codeName}});//更新fact中变量值
{{/each}}
  end
{{/each}}
{{/if}}