Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
ecdd8a3e
提交
ecdd8a3e
编写于
11月 09, 2022
作者:
xignzi006
🇨🇳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除重新发布
上级
31c8401d
变更
13
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
0 行增加
和
450 行删除
+0
-450
CountMoneyRule.drl
...c/main/resources/rules/IBIZOrderDetail/CountMoneyRule.drl
+0
-41
CountMoneyRuleFlow.bpmn
...n/resources/rules/IBIZOrderDetail/CountMoneyRuleFlow.bpmn
+0
-33
GetUnitAndPriceRule.drl
...n/resources/rules/IBIZOrderDetail/GetUnitAndPriceRule.drl
+0
-77
GetUnitAndPriceRuleFlow.bpmn
...ources/rules/IBIZOrderDetail/GetUnitAndPriceRuleFlow.bpmn
+0
-50
exec.bpmn
...main/resources/rules/IBIZOrderDetail/countmoney/exec.bpmn
+0
-21
after.bpmn
...rc/main/resources/rules/IBIZOrderDetail/create/after.bpmn
+0
-21
exec.bpmn
...resources/rules/IBIZOrderDetail/getunitandprice/exec.bpmn
+0
-21
after.bpmn
...rc/main/resources/rules/IBIZOrderDetail/update/after.bpmn
+0
-23
after.drl
...src/main/resources/rules/IBIZOrderDetail/update/after.drl
+0
-18
IBIZOrderDetailCountMoneyRule.drl
...rc/main/resources/rules/IBIZOrderDetailCountMoneyRule.drl
+0
-40
IBIZOrderDetailCountMoneyRuleFlow.bpmn
...in/resources/rules/IBIZOrderDetailCountMoneyRuleFlow.bpmn
+0
-21
IBIZOrderDetailGetUnitAndPriceRule.drl
...in/resources/rules/IBIZOrderDetailGetUnitAndPriceRule.drl
+0
-54
IBIZOrderDetailGetUnitAndPriceRuleFlow.bpmn
...sources/rules/IBIZOrderDetailGetUnitAndPriceRuleFlow.bpmn
+0
-30
未找到文件。
demo-core/src/main/resources/rules/IBIZOrderDetail/CountMoneyRule.drl
已删除
100644 → 0
浏览文件 @
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
demo-core/src/main/resources/rules/IBIZOrderDetail/CountMoneyRuleFlow.bpmn
已删除
100644 → 0
浏览文件 @
31c8401d
<?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>
demo-core/src/main/resources/rules/IBIZOrderDetail/GetUnitAndPriceRule.drl
已删除
100644 → 0
浏览文件 @
31c8401d
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
demo-core/src/main/resources/rules/IBIZOrderDetail/GetUnitAndPriceRuleFlow.bpmn
已删除
100644 → 0
浏览文件 @
31c8401d
<?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>
demo-core/src/main/resources/rules/IBIZOrderDetail/countmoney/exec.bpmn
已删除
100644 → 0
浏览文件 @
31c8401d
<?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>
demo-core/src/main/resources/rules/IBIZOrderDetail/create/after.bpmn
已删除
100644 → 0
浏览文件 @
31c8401d
<?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>
demo-core/src/main/resources/rules/IBIZOrderDetail/getunitandprice/exec.bpmn
已删除
100644 → 0
浏览文件 @
31c8401d
<?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>
demo-core/src/main/resources/rules/IBIZOrderDetail/update/after.bpmn
已删除
100644 → 0
浏览文件 @
31c8401d
<?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>
demo-core/src/main/resources/rules/IBIZOrderDetail/update/after.drl
已删除
100644 → 0
浏览文件 @
31c8401d
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
demo-core/src/main/resources/rules/IBIZOrderDetailCountMoneyRule.drl
已删除
100644 → 0
浏览文件 @
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
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
demo-core/src/main/resources/rules/IBIZOrderDetailCountMoneyRuleFlow.bpmn
已删除
100644 → 0
浏览文件 @
31c8401d
<?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>
demo-core/src/main/resources/rules/IBIZOrderDetailGetUnitAndPriceRule.drl
已删除
100644 → 0
浏览文件 @
31c8401d
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
demo-core/src/main/resources/rules/IBIZOrderDetailGetUnitAndPriceRuleFlow.bpmn
已删除
100644 → 0
浏览文件 @
31c8401d
<?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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录