提交 ecdd8a3e 编写于 作者: xignzi006's avatar xignzi006 🇨🇳

删除重新发布

上级 31c8401d
package cn.ibizlab.sample.logic.ibizorderdetaillogic.countmoney;
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;
global cn.ibizlab.core.sample.domain.IBIZOrderDetail param_default;
global cn.ibizlab.core.sample.service.IBIZOrderDetailService iBzSysIBIZOrderDetailDefaultService;
global cn.ibizlab.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "begingroup"
when
then
update(param_default);//更新fact中变量值
end
//逻辑处理节点[统计金额]
rule "rawsqlcall1"
ruleflow-group "rawsqlcall1group"
when
then
Map param =new HashMap();
param.put("param0",param_default.get("quantity"));
param.put("param1",param_default.get("unitprice"));
String strSql="select (#{et.param0}*#{et.param1}) as AMOUNT from dual";
java.util.List<JSONObject> entities=iBzSysIBIZOrderDetailDefaultService.select(strSql,param);//SQL调用
if(entities.size()>0 && !ObjectUtils.isEmpty(entities.get(0))){
JSONObject entity=entities.get(0);
for (Map.Entry entry : entity.entrySet()) {
param_default.set(String.valueOf(entry.getKey()),entry.getValue());
}
}
update(param_default);//更新fact中变量值
end
<?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="cn.ibizlab.core.sample.service.logic.ibizorderdetailcountmoney" isClosed="false" isExecutable="true"
name="sample_ibizorderdetail_countmoney_RuleFlow" processType="Private"
tns:packageName="cn.ibizlab.core.sample.service.logic.ibizorderdetailcountmoney">
<extensionElements>
<tns:import name="java.util.Map" />
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.util.helper.RuleUtils"/>
<tns:metaData express="" name="default" type="entity"/>
<tns:global identifier="default" type="cn.ibizlab.core.sample.domain.IBIZOrderDetail" />
<tns:metaData express="T(cn.ibizlab.util.security.SpringContextHolder).getBean(T(cn.ibizlab.core.sample.service.IBIZOrderDetailService))" name="iBzSysIBIZOrderDetailDefaultService" type="service"/>
<tns:metaData express="T(cn.ibizlab.util.security.AuthenticationUser).getAuthenticationUser()" name="curuser" type="session"/>
</extensionElements>
<!-- 开始 -->
<startEvent id="begin" isInterrupting="true"/>
<!-- 统计金额 -->
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="rawsqlcall1group" id="rawsqlcall1" implementation="http://www.jboss.org/drools/rule" name="统计金额"/>
<!-- 最后结束节点 -->
<endEvent id="rawsqlcall1_end" name="end"/>
<sequenceFlow id="rawsqlcall1_end_line" sourceRef="rawsqlcall1" targetRef="rawsqlcall1_end"/>
<!-- 连接 -->
<sequenceFlow id="begin_rawsqlcall1" sourceRef="begin" targetRef="rawsqlcall1">
</sequenceFlow>
</process>
</definitions>
package cn.ibizlab.sample.logic.ibizorderdetaillogic.getunitandprice;
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;
global cn.ibizlab.core.sample.domain.IBIZUNIProduct param_product;
global cn.ibizlab.core.sample.domain.IBIZOrderDetail param_default;
global cn.ibizlab.core.sample.service.IBIZUNIProductService ibizuniproductservice;
global cn.ibizlab.core.sample.service.IBIZOrderDetailService iBzSysIBIZOrderDetailDefaultService;
global cn.ibizlab.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "begingroup"
when
then
update(param_product);//更新fact中变量值
update(param_default);//更新fact中变量值
end
//逻辑处理节点[填充单位和单价]
rule "prepareparam2"
ruleflow-group "prepareparam2group"
when
then
param_default.set("unitprice",param_product.get("unitprice"));
param_default.set("unit",param_product.get("unit"));
update(param_product);//更新fact中变量值
update(param_default);//更新fact中变量值
end
//逻辑处理节点[获取商品信息]
rule "deaction1"
ruleflow-group "deaction1group"
when
then
cn.ibizlab.util.helper.CachedBeanCopier.copy(ibizuniproductservice.get(param_product.getIbizuniProductId()),param_product);
update(param_product);//更新fact中变量值
update(param_default);//更新fact中变量值
end
//逻辑处理节点[获取商品ID]
rule "prepareparam1"
ruleflow-group "prepareparam1group"
when
then
param_product.set("ibizuniproductid",param_default.get("ibizuniproductid"));
update(param_product);//更新fact中变量值
update(param_default);//更新fact中变量值
end
<?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="cn.ibizlab.core.sample.service.logic.ibizorderdetailgetunitandprice" isClosed="false" isExecutable="true"
name="sample_ibizorderdetail_getunitandprice_RuleFlow" processType="Private"
tns:packageName="cn.ibizlab.core.sample.service.logic.ibizorderdetailgetunitandprice">
<extensionElements>
<tns:import name="java.util.Map" />
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.util.helper.RuleUtils"/>
<tns:metaData express="new cn.ibizlab.core.sample.domain.IBIZUNIProduct()" name="product" type="refentity"/>
<tns:metaData express="" name="default" type="entity"/>
<tns:global identifier="product" type="cn.ibizlab.core.sample.domain.IBIZUNIProduct" />
<tns:global identifier="default" type="cn.ibizlab.core.sample.domain.IBIZOrderDetail" />
<tns:metaData express="T(cn.ibizlab.util.security.SpringContextHolder).getBean(T(cn.ibizlab.core.sample.service.IBIZUNIProductService))" name="ibizuniproductservice" type="service"/>
<tns:metaData express="T(cn.ibizlab.util.security.SpringContextHolder).getBean(T(cn.ibizlab.core.sample.service.IBIZOrderDetailService))" name="iBzSysIBIZOrderDetailDefaultService" type="service"/>
<tns:metaData express="T(cn.ibizlab.util.security.AuthenticationUser).getAuthenticationUser()" name="curuser" type="session"/>
</extensionElements>
<!-- 开始 -->
<startEvent id="begin" isInterrupting="true"/>
<!-- 填充单位和单价 -->
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="prepareparam2group" id="prepareparam2" implementation="http://www.jboss.org/drools/rule" name="填充单位和单价"/>
<!-- 最后结束节点 -->
<endEvent id="prepareparam2_end" name="end"/>
<sequenceFlow id="prepareparam2_end_line" sourceRef="prepareparam2" targetRef="prepareparam2_end"/>
<!-- 获取商品信息 -->
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="deaction1group" id="deaction1" implementation="http://www.jboss.org/drools/rule" name="获取商品信息"/>
<!-- 获取商品ID -->
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="prepareparam1group" id="prepareparam1" implementation="http://www.jboss.org/drools/rule" name="获取商品id"/>
<!-- 连接 -->
<sequenceFlow id="begin_prepareparam1" sourceRef="begin" targetRef="prepareparam1">
</sequenceFlow>
<!-- 连接 -->
<sequenceFlow id="deaction1_prepareparam2" sourceRef="deaction1" targetRef="prepareparam2">
</sequenceFlow>
<!-- 连接 -->
<sequenceFlow id="prepareparam1_deaction1" sourceRef="prepareparam1" targetRef="deaction1">
</sequenceFlow>
</process>
</definitions>
<?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="cn.ibizlab.core.extensions.service.logic.execute" isClosed="false" isExecutable="true" name="sample_sample_countmoney.execLogic" processType="Private" tns:packageName="cn.ibizlab.core.extensions.service.logic.execute">
<extensionElements>
<tns:import name="java.util.Map"/>
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.util.helper.RuleUtils"/>
</extensionElements>
<startEvent id="begin" isInterrupting="true"/>
<endEvent id="prepareparam1_end" name="end"/>
<callActivity activiti:exclusive="true" calledElement="cn.ibizlab.core.sampleservice.logic.ibizorderdetailcountmoney" id="CountMoney" name="IBIZOrderDetail/CountMoneyRuleFlow.bpmn"/>
<sequenceFlow id="begin_CountMoney" sourceRef="begin" targetRef="CountMoney"/>
<sequenceFlow id="CountMoney_prepareparam1_end" sourceRef="CountMoney" targetRef="prepareparam1_end"/>
</process>
</definitions>
<?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="cn.ibizlab.core.sample.ibizorderdetail.create.afterLogic" isClosed="false" isExecutable="true"
name="sample_ibizorderdetail_create_afterLogic" processType="Private"
tns:packageName="cn.ibizlab.core.sample.ibizorderdetail.create.afterLogic">
<extensionElements>
<tns:import name="java.util.Map"/>
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.util.helper.RuleUtils"/>
<tns:import name="cn.ibizlab.core.sample.domain.IBIZOrderDetail"/>
</extensionElements>
<startEvent id="begin" isInterrupting="true"/>
<endEvent id="prepareparam1_end" name="end"/>
<callActivity activiti:exclusive="true" calledElement="cn.ibizlab.core.sample.service.logic.ibizorderdetailcountmoney" id="Create_0" name="IBIZOrderDetail/CountMoneyRuleFlow.bpmn"/>
<sequenceFlow id="begin_Create_0" sourceRef="begin" targetRef="Create_0"/>
<sequenceFlow id="Create_0_prepareparam1_end" sourceRef="Create_0" targetRef="prepareparam1_end"/>
</process>
</definitions>
<?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="cn.ibizlab.core.extensions.service.logic.execute" isClosed="false" isExecutable="true" name="sample_sample_getunitandprice.execLogic" processType="Private" tns:packageName="cn.ibizlab.core.extensions.service.logic.execute">
<extensionElements>
<tns:import name="java.util.Map"/>
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.util.helper.RuleUtils"/>
</extensionElements>
<startEvent id="begin" isInterrupting="true"/>
<endEvent id="prepareparam1_end" name="end"/>
<callActivity activiti:exclusive="true" calledElement="cn.ibizlab.core.sampleservice.logic.ibizorderdetailgetunitandprice" id="GetUnitAndPrice" name="IBIZOrderDetail/GetUnitAndPriceRuleFlow.bpmn"/>
<sequenceFlow id="begin_GetUnitAndPrice" sourceRef="begin" targetRef="GetUnitAndPrice"/>
<sequenceFlow id="GetUnitAndPrice_prepareparam1_end" sourceRef="GetUnitAndPrice" targetRef="prepareparam1_end"/>
</process>
</definitions>
<?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="cn.ibizlab.core.sample.ibizorderdetail.update.afterLogic" isClosed="false" isExecutable="true"
name="sample_ibizorderdetail_update_afterLogic" processType="Private"
tns:packageName="cn.ibizlab.core.sample.ibizorderdetail.update.afterLogic">
<extensionElements>
<tns:import name="java.util.Map"/>
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.util.helper.RuleUtils"/>
<tns:import name="cn.ibizlab.core.sample.domain.IBIZOrderDetail"/>
<tns:metaData express="T(cn.ibizlab.util.security.SpringContextHolder).getBean(T(cn.ibizlab.core.sample.service.IBIZOrderDetailService))" name="ibizorderdetailService" type="service"/>
<tns:metaData express="" name="et" type="entity"/>
</extensionElements>
<startEvent id="begin" isInterrupting="true"/>
<endEvent id="prepareparam1_end" name="end"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="Update_0" id="Update_0" implementation="http://www.jboss.org/drools/rule" name="ibizorderdetailcheckkey"/>
<sequenceFlow id="begin_Update_0" sourceRef="begin" targetRef="Update_0"/>
<sequenceFlow id="Update_0_prepareparam1_end" sourceRef="Update_0" targetRef="prepareparam1_end"/>
</process>
</definitions>
import cn.ibizlab.util.helper.CachedBeanCopier;
global cn.ibizlab.core.sample.domain.IBIZOrderDetail et;
global cn.ibizlab.core.sample.service.IBIZOrderDetailService ibizorderdetailService;
no-loop
rule "ibizorderdetailcheckkey"
ruleflow-group "Update_0"
when
then
cn.ibizlab.core.sample.domain.IBIZOrderDetail actionLogicDE =new cn.ibizlab.core.sample.domain.IBIZOrderDetail();
CachedBeanCopier.copy(et, actionLogicDE);
ibizorderdetailService.checkKey(actionLogicDE);
end
package cn.ibizlab.sample.logic.ibizorderdetaillogic.countmoney;
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;
global cn.ibizlab.core.sample.domain.IBIZOrderDetail ibizorderdetailcountmoneydefault;
global cn.ibizlab.core.sample.service.IIBIZOrderDetailService iBzSysIbizorderdetailDefaultService;
global cn.ibizlab.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "ibizorderdetailcountmoneybegin"
when
then
end
//逻辑处理节点[统计金额]
rule "rawsqlcall1"
ruleflow-group "ibizorderdetailcountmoneyrawsqlcall1"
when
then
Map param =new HashMap();
param.put("param0",ibizorderdetailcountmoneydefault.get("quantity"));
param.put("param1",ibizorderdetailcountmoneydefault.get("unitprice"));
String strSql="select (#{et.param0}*#{et.param1}) as AMOUNT from dual";
java.util.List<JSONObject> entities=iBzSysIbizorderdetailDefaultService.select(strSql,param);//SQL调用
if(entities.size()>0 && !ObjectUtils.isEmpty(entities.get(0))){
JSONObject entity=entities.get(0);
for (Map.Entry entry : entity.entrySet()) {
ibizorderdetailcountmoneydefault.set(String.valueOf(entry.getKey()),entry.getValue());
}
}
update(ibizorderdetailcountmoneydefault);//更新fact中变量值
end
<?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="cn.ibizlab.core.sample.service.logic.ibizorderdetailcountmoney" isClosed="false" isExecutable="true" name="sample_ibizorderdetail_countmoney_RuleFlow" processType="Private" tns:packageName="cn.ibizlab.core.sample.service.logic.ibizorderdetailcountmoney">
<extensionElements>
<tns:import name="java.util.Map" />
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.util.helper.RuleUtils"/>
<tns:metaData express="" name="ibizorderdetailcountmoneydefault" type="entity"/>
<tns:metaData express="T(cn.ibizlab.util.security.SpringContextHolder).getBean(T(cn.ibizlab.core.sample.service.IIBIZOrderDetailService))" name="iBzSysIbizorderdetailDefaultService" type="service"/>
<tns:metaData express="T(cn.ibizlab.util.security.AuthenticationUser).getAuthenticationUser()" name="curuser" type="session"/>
<tns:global identifier="ibizorderdetailcountmoneydefault" type="cn.ibizlab.core.sample.domain.IBIZOrderDetail" />
</extensionElements>
<startEvent id="begin" isInterrupting="true"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="ibizorderdetailcountmoneyrawsqlcall1" id="rawsqlcall1" implementation="http://www.jboss.org/drools/rule" name="统计金额"/>
<endEvent id="rawsqlcall1_end" name="end"/>
<sequenceFlow id="rawsqlcall1_end_line" sourceRef="rawsqlcall1" targetRef="rawsqlcall1_end"/>
<sequenceFlow id="begin_rawsqlcall1" sourceRef="begin" targetRef="rawsqlcall1">
</sequenceFlow>
</process>
</definitions>
package cn.ibizlab.sample.logic.ibizorderdetaillogic.getunitandprice;
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;
global cn.ibizlab.core.sample.domain.IBIZUNIProduct ibizorderdetailgetunitandpriceproduct;
global cn.ibizlab.core.sample.domain.IBIZOrderDetail ibizorderdetailgetunitandpricedefault;
global cn.ibizlab.core.sample.service.IIBIZUNIProductService ibizuniproductservice;
global cn.ibizlab.core.sample.service.IIBIZOrderDetailService iBzSysIbizorderdetailDefaultService;
global cn.ibizlab.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "ibizorderdetailgetunitandpricebegin"
when
then
end
//逻辑处理节点[填充单位和单价]
rule "prepareparam2"
ruleflow-group "ibizorderdetailgetunitandpriceprepareparam2"
when
then
ibizorderdetailgetunitandpricedefault.set("unitprice",ibizorderdetailgetunitandpriceproduct.get("unitprice"));
ibizorderdetailgetunitandpricedefault.set("unit",ibizorderdetailgetunitandpriceproduct.get("unit"));
update(ibizorderdetailgetunitandpriceproduct);//更新fact中变量值
update(ibizorderdetailgetunitandpricedefault);//更新fact中变量值
end
//逻辑处理节点[获取商品信息]
rule "deaction1"
ruleflow-group "ibizorderdetailgetunitandpricedeaction1"
when
then
cn.ibizlab.util.helper.CachedBeanCopier.copy(ibizuniproductservice.get(ibizorderdetailgetunitandpriceproduct.getIbizuniproductid()),ibizorderdetailgetunitandpriceproduct);
update(ibizorderdetailgetunitandpriceproduct);//更新fact中变量值
update(ibizorderdetailgetunitandpricedefault);//更新fact中变量值
end
//逻辑处理节点[获取商品id]
rule "prepareparam1"
ruleflow-group "ibizorderdetailgetunitandpriceprepareparam1"
when
then
ibizorderdetailgetunitandpriceproduct.set("ibizuniproductid",ibizorderdetailgetunitandpricedefault.get("ibizuniproductid"));
update(ibizorderdetailgetunitandpriceproduct);//更新fact中变量值
update(ibizorderdetailgetunitandpricedefault);//更新fact中变量值
end
<?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="cn.ibizlab.core.sample.service.logic.ibizorderdetailgetunitandprice" isClosed="false" isExecutable="true" name="sample_ibizorderdetail_getunitandprice_RuleFlow" processType="Private" tns:packageName="cn.ibizlab.core.sample.service.logic.ibizorderdetailgetunitandprice">
<extensionElements>
<tns:import name="java.util.Map" />
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.util.helper.RuleUtils"/>
<tns:metaData express="new cn.ibizlab.core.sample.domain.IBIZUNIProduct()" name="ibizorderdetailgetunitandpriceproduct" type="refentity"/>
<tns:metaData express="" name="ibizorderdetailgetunitandpricedefault" type="entity"/>
<tns:metaData express="T(cn.ibizlab.util.security.SpringContextHolder).getBean(T(cn.ibizlab.core.sample.service.IIBIZUNIProductService))" name="ibizuniproductservice" type="service"/>
<tns:metaData express="T(cn.ibizlab.util.security.SpringContextHolder).getBean(T(cn.ibizlab.core.sample.service.IIBIZOrderDetailService))" name="iBzSysIbizorderdetailDefaultService" type="service"/>
<tns:metaData express="T(cn.ibizlab.util.security.AuthenticationUser).getAuthenticationUser()" name="curuser" type="session"/>
<tns:global identifier="ibizorderdetailgetunitandpriceproduct" type="cn.ibizlab.core.sample.domain.IBIZUNIProduct" />
<tns:global identifier="ibizorderdetailgetunitandpricedefault" type="cn.ibizlab.core.sample.domain.IBIZOrderDetail" />
</extensionElements>
<startEvent id="begin" isInterrupting="true"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="ibizorderdetailgetunitandpriceprepareparam2" id="prepareparam2" implementation="http://www.jboss.org/drools/rule" name="填充单位和单价"/>
<endEvent id="prepareparam2_end" name="end"/>
<sequenceFlow id="prepareparam2_end_line" sourceRef="prepareparam2" targetRef="prepareparam2_end"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="ibizorderdetailgetunitandpricedeaction1" id="deaction1" implementation="http://www.jboss.org/drools/rule" name="获取商品信息"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="ibizorderdetailgetunitandpriceprepareparam1" id="prepareparam1" implementation="http://www.jboss.org/drools/rule" name="获取商品ID"/>
<sequenceFlow id="begin_prepareparam1" sourceRef="begin" targetRef="prepareparam1">
</sequenceFlow>
<sequenceFlow id="deaction1_prepareparam2" sourceRef="deaction1" targetRef="prepareparam2">
</sequenceFlow>
<sequenceFlow id="prepareparam1_deaction1" sourceRef="prepareparam1" targetRef="deaction1">
</sequenceFlow>
</process>
</definitions>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册