Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
2abf0cec
提交
2abf0cec
编写于
11月 09, 2022
作者:
chenxiang@lab.ibiz5.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2022.11.09.001 行为附加逻辑
上级
52cf1851
变更
15
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
471 行增加
和
104 行删除
+471
-104
logback.xml
modules/ibizlab-generator-cli/src/main/resources/logback.xml
+0
-19
ActionLogicModel.java
.../main/java/cn/ibizlab/codegen/model/ActionLogicModel.java
+38
-0
ActionModel.java
...e/src/main/java/cn/ibizlab/codegen/model/ActionModel.java
+237
-70
EntityModel.java
...e/src/main/java/cn/ibizlab/codegen/model/EntityModel.java
+0
-6
LogicModel.java
...re/src/main/java/cn/ibizlab/codegen/model/LogicModel.java
+8
-4
ModelStorage.java
.../src/main/java/cn/ibizlab/codegen/model/ModelStorage.java
+7
-0
TemplateFileType.java
.../java/cn/ibizlab/codegen/templating/TemplateFileType.java
+2
-0
DEAction.hbs
...ge/src/main/resources/templ/@macro/logic/drl/DEAction.hbs
+2
-2
{{entityLogics}}Rule.drl.hbs
...resources/rules/{{entities}}/{{entityLogics}}Rule.drl.hbs
+3
-2
{{entityLogics}}RuleFlow.bpmn.hbs
...rces/rules/{{entities}}/{{entityLogics}}RuleFlow.bpmn.hbs
+3
-1
after.bpmn.hbs
...s/{{entities}}/{{lowerCase entityActions}}/after.bpmn.hbs
+34
-0
after.drl.hbs
...es/{{entities}}/{{lowerCase entityActions}}/after.drl.hbs
+40
-0
before.bpmn.hbs
.../{{entities}}/{{lowerCase entityActions}}/before.bpmn.hbs
+34
-0
before.drl.hbs
...s/{{entities}}/{{lowerCase entityActions}}/before.drl.hbs
+40
-0
exec.bpmn.hbs
...es/{{entities}}/{{lowerCase entityActions}}/exec.bpmn.hbs
+23
-0
未找到文件。
modules/ibizlab-generator-cli/src/main/resources/logback.xml
浏览文件 @
2abf0cec
...
...
@@ -33,25 +33,6 @@
<MaxFileSize>
100MB
</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- <appender name="DB-CLASSIC-MYSQL-POOL" class="ch.qos.logback.classic.db.DBAppender">-->
<!-- <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">-->
<!-- <dataSource class="com.mchange.v2.c3p0.ComboPooledDataSource">-->
<!-- <driverClass>com.mysql.cj.jdbc.Driver</driverClass>-->
<!-- <url>jdbc:mysql://127.0.0.1:3306/logback</url>-->
<!-- <user>root</user>-->
<!-- <password>root</password>-->
<!-- <sqlDialect class="ch.qos.logback.core.db.dialect.MySQLDialect" />-->
<!-- </dataSource>-->
<!-- </connectionSource>-->
<!-- <sqlDialect class="ch.qos.logback.core.db.dialect.MySQLDialect" />-->
<!-- </appender>-->
<!-- <!– 异步日志记录 –>-->
<!-- <appender name="ASYNC_APPENDER" class="ch.qos.logback.classic.AsyncAppender">-->
<!-- <appender-ref ref="DB-CLASSIC-MYSQL-POOL" />-->
<!-- <includeCallerData>true</includeCallerData>-->
<!-- </appender>-->
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"Console"
/>
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/ActionLogicModel.java
0 → 100644
浏览文件 @
2abf0cec
package
cn
.
ibizlab
.
codegen
.
model
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
net.ibizsys.model.dataentity.action.IPSDEAction
;
import
net.ibizsys.model.dataentity.action.IPSDEActionLogic
;
import
net.ibizsys.model.dataentity.action.IPSDELogicAction
;
import
net.ibizsys.model.dataentity.action.IPSDEScriptAction
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
ActionLogicModel
extends
BaseModel
{
public
ActionLogicModel
(
ActionModel
actionModel
,
IPSDEActionLogic
iPSDEActionLogic
,
int
index
)
{
this
.
opt
=
iPSDEActionLogic
;
this
.
actionModel
=
actionModel
;
this
.
entityModel
=
actionModel
.
getEntity
();
this
.
id
=
String
.
format
(
"%s_%s"
,
actionModel
.
getCodeName
(),
index
);
}
public
IPSDEActionLogic
getPSDEActionLogic
()
{
return
(
IPSDEActionLogic
)
opt
;
}
private
ActionModel
actionModel
;
private
EntityModel
entityModel
;
}
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/ActionModel.java
浏览文件 @
2abf0cec
此差异已折叠。
点击以展开。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/EntityModel.java
浏览文件 @
2abf0cec
...
...
@@ -588,10 +588,6 @@ public class EntityModel extends BaseModel {
if
(
dataEntity
.
getMinorPSDERs
()
!=
null
)
{
for
(
IPSDERBase
der
:
dataEntity
.
getMinorPSDERs
())
{
if
(
dataEntity
.
getName
().
equals
(
"IBIZCUSTOMERMG"
)
||
dataEntity
.
getName
().
equals
(
"IBIZCUSTOMER"
))
{
System
.
out
.
println
(
dataEntity
.
getName
());
}
RelationshipModel
rel
=
new
RelationshipModel
(
this
,
der
);
rel
.
setRelationType
(
"reference"
).
setCodeName
(
der
.
getCodeName
()).
setEntityId
(
der
.
getMajorPSDataEntity
().
getId
())
.
setEntityCodeName
(
der
.
getMajorPSDataEntity
().
getCodeName
()).
setEntityName
(
der
.
getMajorPSDataEntity
().
getName
())
...
...
@@ -759,8 +755,6 @@ public class EntityModel extends BaseModel {
//处理逻辑
if
(!
CollectionUtils
.
isEmpty
(
dataEntity
.
getAllPSDELogics
()))
{
for
(
IPSDELogic
logic
:
dataEntity
.
getAllPSDELogics
())
{
if
(!
logic
.
isEnableBackend
())
continue
;
LogicModel
logicModel
=
new
LogicModel
(
this
,
logic
);
this
.
addLogic
(
logicModel
);
}
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/LogicModel.java
浏览文件 @
2abf0cec
...
...
@@ -41,7 +41,7 @@ public class LogicModel extends BaseModel {
iPSDELogicParam
.
getParamPSDataEntity
().
getPSSystemModule
().
getCodeName
().
toLowerCase
(),
iPSDELogicParam
.
getParamPSDataEntity
().
getCodeName
()
);
ruleGlobalParams
.
add
(
String
.
format
(
"global %s %s;"
,
strDataType
,
strParamName
));
ruleGlobalParams
.
add
(
String
.
format
(
"global %s %s;"
,
strDataType
,
"param_"
+
strParamName
));
String
bpmnGlobalIdentifier
=
String
.
format
(
"<tns:global identifier=\"%s\" type=\"%s.core.%s.domain.%s\" />"
,
strParamName
,
entityModel
.
getSystem
().
getPackageName
(),
...
...
@@ -50,7 +50,7 @@ public class LogicModel extends BaseModel {
bpmnTnsParams
.
add
(
bpmnGlobalIdentifier
);
}
else
{
String
strDataType
=
"java.util.Map"
;
ruleGlobalParams
.
add
(
String
.
format
(
"global %s %s;"
,
strDataType
,
"param_"
+
strParamName
));
ruleGlobalParams
.
add
(
String
.
format
(
"global %s %s;"
,
strDataType
,
"param_"
+
strParamName
));
}
}
}
...
...
@@ -99,7 +99,7 @@ public class LogicModel extends BaseModel {
ruleGlobalParams
.
add
(
String
.
format
(
"global %s %s;"
,
strDataType
,
"wfClient"
));
}
if
(
true
)
{
String
strDataType
=
String
.
format
(
"%s.core.%s.service.
I
%sService"
,
String
strDataType
=
String
.
format
(
"%s.core.%s.service.%sService"
,
entityModel
.
getSystem
().
getPackageName
(),
entityModel
.
getDataEntity
().
getPSSystemModule
().
getCodeName
().
toLowerCase
(),
entityModel
.
getDataEntity
().
getCodeName
()
...
...
@@ -107,7 +107,7 @@ public class LogicModel extends BaseModel {
ruleGlobalParams
.
add
(
String
.
format
(
"global %s %s;"
,
strDataType
,
String
.
format
(
"iBzSys%sDefaultService"
,
entityModel
.
getCodeName
())));
String
strBpmnService
=
String
.
format
(
"<tns:metaData express=\"T(cn.ibizlab.util.security.SpringContextHolder).getBean(T(%s.core.%s.service.
I
%sService))\" name=\"iBzSys%sDefaultService\" type=\"service\"/>"
,
String
strBpmnService
=
String
.
format
(
"<tns:metaData express=\"T(cn.ibizlab.util.security.SpringContextHolder).getBean(T(%s.core.%s.service.%sService))\" name=\"iBzSys%sDefaultService\" type=\"service\"/>"
,
entityModel
.
getSystem
().
getPackageName
(),
entityModel
.
getDataEntity
().
getPSSystemModule
().
getCodeName
().
toLowerCase
(),
entityModel
.
getDataEntity
().
getCodeName
(),
...
...
@@ -122,6 +122,10 @@ public class LogicModel extends BaseModel {
return
(
IPSDELogic
)
opt
;
}
public
boolean
isEnableBackend
(){
return
this
.
getPSDELogic
().
isEnableBackend
();
}
public
EntityModel
getEntity
()
{
return
entity
;
}
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/ModelStorage.java
浏览文件 @
2abf0cec
...
...
@@ -173,6 +173,13 @@ public class ModelStorage {
rt
.
addOption
(
opt
);
});
}
else
if
(
type
.
equals
(
TemplateFileType
.
entityAction
))
{
getSystemModel
().
getEntities
().
forEach
(
item
->
item
.
getActions
().
values
().
forEach
(
actionModel
->
{
CliOption
opt
=
newCliOption
(
TemplateFileType
.
entityAction
).
baseData
(
actionModel
,
actionModel
.
getCodeName
())
.
set
(
"entities"
,
item
.
getCodeName
());
rt
.
addOption
(
opt
);
}));
}
else
if
(
type
.
equals
(
TemplateFileType
.
entityLogic
))
{
getSystemModel
().
getEntities
().
forEach
(
item
->
item
.
getLogics
().
forEach
(
logicModel
->
{
CliOption
opt
=
newCliOption
(
TemplateFileType
.
entityLogic
).
baseData
(
logicModel
,
logicModel
.
getCodeName
())
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/templating/TemplateFileType.java
浏览文件 @
2abf0cec
...
...
@@ -8,6 +8,7 @@ public enum TemplateFileType {
apiEntity
(
Constants
.
API_ENTITIES
),
apiDto
(
Constants
.
API_DTOS
),
entity
(
Constants
.
ENTITIES
),
entityAction
(
Constants
.
ENTITIY_ACTIONS
),
entityLogic
(
Constants
.
ENTITIY_LOGICS
),
module
(
Constants
.
MODULES
),
workflow
(
Constants
.
WORKFLOWS
),
...
...
@@ -55,6 +56,7 @@ public enum TemplateFileType {
public
static
final
String
APPS
=
"apps"
;
public
static
final
String
DICTS
=
"dicts"
;
public
static
final
String
ENTITIES
=
"entities"
;
public
static
final
String
ENTITIY_ACTIONS
=
"entityActions"
;
public
static
final
String
ENTITIY_LOGICS
=
"entityLogics"
;
public
static
final
String
WORKFLOWS
=
"workflows"
;
public
static
final
String
SYSUTILS
=
"syUtils"
;
...
...
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/@macro/logic/drl/DEAction.hbs
浏览文件 @
2abf0cec
{{#if
(
eq
logicNodeModel
.
pSDELogicNode
.
dstPSDEAction
.
codeName
'Get'
)
}}
cn.ibizlab.util.helper.CachedBeanCopier.copy(
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDataEntity
.
codeName
}}
service.get(param_
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDELogicParam
.
codeName
}}
.get
{{
logicNodeModel
.
pSDELogicNode
.
dstPSDataEntity
.
keyPSDEField
.
codeName
}}
()),param_
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDELogicParam
.
codeName
}}
);
cn.ibizlab.util.helper.CachedBeanCopier.copy(
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDataEntity
.
codeName
}}
service.get(param_
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDELogicParam
.
codeName
}}
.get
{{
pascalCase
logicNodeModel
.
pSDELogicNode
.
dstPSDataEntity
.
keyPSDEField
.
codeName
}}
()),param_
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDELogicParam
.
codeName
}}
);
{{else}}
{{#if
(
eq
logicNodeModel
.
pSDELogicNode
.
dstPSDEAction
.
codeName
'Remove'
)
}}
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDataEntity
.
codeName
}}
service.remove(param_
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDELogicParam
.
codeName
}}
.get
{{
logicNodeModel
.
pSDELogicNode
.
dstPSDataEntity
.
keyPSDEField
.
codeName
}}
());
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDataEntity
.
codeName
}}
service.remove(param_
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDELogicParam
.
codeName
}}
.get
{{
pascalCase
logicNodeModel
.
pSDELogicNode
.
dstPSDataEntity
.
keyPSDEField
.
codeName
}}
());
{{else}}
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDataEntity
.
codeName
}}
service.
{{
camelCase
logicNodeModel
.
pSDELogicNode
.
dstPSDEAction
.
codeName
}}
(param_
{{
lowerCase
logicNodeModel
.
pSDELogicNode
.
dstPSDELogicParam
.
codeName
}}
);
{{/if}}
...
...
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/resources/rules/{{entities}}/{{entityLogics}}Rule.drl.hbs
浏览文件 @
2abf0cec
{{#if
entityLogic
.
isEnableBackend
}}
package
{{
packageName
}}
.
{{
entityLogic
.
entity
.
module
}}
.logic.
{{
lowerCase
entityLogic
.
entity
.
codeName
}}
logic.
{{
lowerCase
entityLogic
.
codeName
}}
;
import java.util.Map;
...
...
@@ -25,8 +26,8 @@ ruleflow-group "{{lowerCase logicNodeModel.codeName}}group"
{{#
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(
{{
lowerCase
logicParam
.
codeName
}}
);//更新fact中变量值
update(
param_
{{
lowerCase
logicParam
.
codeName
}}
);//更新fact中变量值
{{/
each
}}
end
{{/
each
}}
{{/if}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/resources/rules/{{entities}}/{{entityLogics}}RuleFlow.bpmn.hbs
浏览文件 @
2abf0cec
{{#if
entityLogic
.
isEnableBackend
}}
<?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=
"
{{
packageName
}}
.core.
{{
entityLogic
.
entity
.
module
}}
.service.logic.
{{
lowerCase
entityLogic
.
entity
.
codeName
}}{{
lowerCase
entityLogic
.
codeName
}}
"
isClosed=
"false"
isExecutable=
"true"
...
...
@@ -66,4 +67,5 @@
{{/if}}
{{/
each
}}
</process>
</definitions>
\ No newline at end of file
</definitions>
{{/if}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/resources/rules/{{entities}}/{{lowerCase entityActions}}/after.bpmn.hbs
0 → 100644
浏览文件 @
2abf0cec
{{#if
entityAction
.
hasAfterLogics
}}
<?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=
"
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.
{{
lowerCase
entityAction
.
entity
.
codeName
}}
.
{{
lowerCase
entityAction
.
codeName
}}
.afterLogic"
isClosed=
"false"
isExecutable=
"true"
name=
"
{{
entityAction
.
entity
.
module
}}
_
{{
lowerCase
entityAction
.
entity
.
codeName
}}
_
{{
lowerCase
entityAction
.
codeName
}}
_afterLogic"
processType=
"Private"
tns:packageName=
"
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.
{{
lowerCase
entityAction
.
entity
.
codeName
}}
.
{{
lowerCase
entityAction
.
codeName
}}
.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=
"
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.domain.
{{
entityAction
.
entity
.
codeName
}}
"
/>
{{#
each
entityAction
.
afterLogicParams
as
|
afterLogicParam
|
}}
{{
afterLogicParam
}}
{{/
each
}}
</extensionElements>
<startEvent
id=
"begin"
isInterrupting=
"true"
/>
<endEvent
id=
"prepareparam1_end"
name=
"end"
/>
{{#
each
entityAction
.
afterActionLogics
as
|
logicModel
|
}}
{{#if
logicModel
.
pSDEActionLogic
.
pSDELogic
}}
<callActivity
activiti:exclusive=
"true"
calledElement=
"
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.service.logic.
{{
lowerCase
entityAction
.
entity
.
codeName
}}{{
lowerCase
logicModel
.
pSDEActionLogic
.
pSDELogic
.
codeName
}}
"
id=
"
{{
logicModel
.
id
}}
"
name=
"
{{
entityAction
.
entity
.
codeName
}}
/
{{
logicModel
.
pSDEActionLogic
.
pSDELogic
.
codeName
}}
RuleFlow.bpmn"
/>
{{/if}}
{{#if
logicModel
.
pSDEActionLogic
.
dstPSDEAction
}}
<businessRuleTask
activiti:exclusive=
"true"
g:ruleFlowGroup=
"
{{
logicModel
.
id
}}
"
id=
"
{{
logicModel
.
id
}}
"
implementation=
"http://www.jboss.org/drools/rule"
name=
"
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
}}
"
/>
{{/if}}
{{/
each
}}
{{#
each
entityAction
.
afterLogicSequenceFlows
as
|
afterLogicSequenceFlow
|
}}
{{
afterLogicSequenceFlow
}}
{{/
each
}}
</process>
</definitions>
{{/if}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/resources/rules/{{entities}}/{{lowerCase entityActions}}/after.drl.hbs
0 → 100644
浏览文件 @
2abf0cec
{{#if
entityAction
.
hasAfterLogicsDEAction
}}
import cn.ibizlab.util.helper.CachedBeanCopier;
global
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.domain.
{{
entityAction
.
entity
.
codeName
}}
et;
{{#
each
entityAction
.
afterGlobalParams
as
|
afterGlobalParam
|
}}
{{
afterGlobalParam
}}
{{/
each
}}
no-loop
{{#
each
entityAction
.
afterActionLogics
as
|
logicModel
|
}}
{{#if
logicModel
.
pSDEActionLogic
.
dstPSDEAction
}}
rule "
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
}}
"
ruleflow-group "
{{
logicModel
.
id
}}
"
when
then
{{#if
ogicModel
.
pSDEActionLogic
.
isIgnoreException
}}
try{
{{/if}}
{{#if
(
or
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
actionType
'USERCUSTOM'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
actionType
'DELOGIC'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'Create'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'Update'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'Save'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'GetDraft'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'CheckKey'
))
}}
{{
packageName
}}
.core.
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
pSSystemModule
.
codeName
}}
.domain.
{{
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}
actionLogicDE =new
{{
packageName
}}
.core.
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
pSSystemModule
.
codeName
}}
.domain.
{{
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}
();
CachedBeanCopier.copy(et, actionLogicDE);
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}
Service.
{{
camelCase
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
}}
(actionLogicDE);
{{else}}
{{#if
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'Remove'
)
}}
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}
Service.remove(et.get
{{
pascalCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
keyPSDEField
.
codeName
}}
());
{{/if}}
{{/if}}
{{#if
ogicModel
.
pSDEActionLogic
.
isIgnoreException
}}
}catch(Exception e) {
log.error("执行[
{{
logicModel
.
pSDEActionLogic
.
dstPSDEAction
}}
]行为附加逻辑发生异常");
}
{{/if}}
end
{{/if}}
{{/
each
}}
{{/if}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/resources/rules/{{entities}}/{{lowerCase entityActions}}/before.bpmn.hbs
0 → 100644
浏览文件 @
2abf0cec
{{#if
entityAction
.
hasBeforeLogics
}}
<?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=
"
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.
{{
lowerCase
entityAction
.
entity
.
codeName
}}
.
{{
lowerCase
entityAction
.
codeName
}}
.beforeLogic"
isClosed=
"false"
isExecutable=
"true"
name=
"
{{
entityAction
.
entity
.
module
}}
_
{{
lowerCase
entityAction
.
entity
.
codeName
}}
_
{{
lowerCase
entityAction
.
codeName
}}
_beforeLogic"
processType=
"Private"
tns:packageName=
"
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.
{{
lowerCase
entityAction
.
entity
.
codeName
}}
.
{{
lowerCase
entityAction
.
codeName
}}
.beforeLogic"
>
<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=
"
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.domain.
{{
entityAction
.
entity
.
codeName
}}
"
/>
{{#
each
entityAction
.
beforeLogicParams
as
|
beforeLogicParam
|
}}
{{
beforeLogicParam
}}
{{/
each
}}
</extensionElements>
<startEvent
id=
"begin"
isInterrupting=
"true"
/>
<endEvent
id=
"prepareparam1_end"
name=
"end"
/>
{{#
each
entityAction
.
beforeActionLogics
as
|
logicModel
|
}}
{{#if
logicModel
.
pSDEActionLogic
.
pSDELogic
}}
<callActivity
activiti:exclusive=
"true"
calledElement=
"
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.service.logic.
{{
lowerCase
entityAction
.
entity
.
codeName
}}{{
lowerCase
logicModel
.
pSDEActionLogic
.
pSDELogic
.
codeName
}}
"
id=
"
{{
logicModel
.
id
}}
"
name=
"
{{
entityAction
.
entity
.
codeName
}}
/
{{
logicModel
.
pSDEActionLogic
.
pSDELogic
.
codeName
}}
RuleFlow.bpmn"
/>
{{/if}}
{{#if
logicModel
.
pSDEActionLogic
.
dstPSDEAction
}}
<businessRuleTask
activiti:exclusive=
"true"
g:ruleFlowGroup=
"
{{
logicModel
.
id
}}
"
id=
"
{{
logicModel
.
id
}}
"
implementation=
"http://www.jboss.org/drools/rule"
name=
"
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
}}
"
/>
{{/if}}
{{/
each
}}
{{#
each
entityAction
.
beforeLogicSequenceFlows
as
|
beforeLogicSequenceFlow
|
}}
{{
beforeLogicSequenceFlow
}}
{{/
each
}}
</process>
</definitions>
{{/if}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/resources/rules/{{entities}}/{{lowerCase entityActions}}/before.drl.hbs
0 → 100644
浏览文件 @
2abf0cec
{{#if
entityAction
.
hasBeforeLogicsDEAction
}}
import cn.ibizlab.util.helper.CachedBeanCopier;
global
{{
packageName
}}
.core.
{{
entityAction
.
entity
.
module
}}
.domain.
{{
entityAction
.
entity
.
codeName
}}
et;
{{#
each
entityAction
.
beforeGlobalParams
as
|
beforeGlobalParam
|
}}
{{
beforeGlobalParam
}}
{{/
each
}}
no-loop
{{#
each
entityAction
.
beforeActionLogics
as
|
logicModel
|
}}
{{#if
logicModel
.
pSDEActionLogic
.
dstPSDEAction
}}
rule "
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
}}
"
ruleflow-group "
{{
logicModel
.
id
}}
"
when
then
{{#if
ogicModel
.
pSDEActionLogic
.
isIgnoreException
}}
try{
{{/if}}
{{#if
(
or
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
actionType
'USERCUSTOM'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
actionType
'DELOGIC'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'Create'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'Update'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'Save'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'GetDraft'
)
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'CheckKey'
))
}}
{{
packageName
}}
.core.
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
pSSystemModule
.
codeName
}}
.domain.
{{
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}
actionLogicDE =new
{{
packageName
}}
.core.
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
pSSystemModule
.
codeName
}}
.domain.
{{
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}
();
CachedBeanCopier.copy(et, actionLogicDE);
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}
Service.
{{
camelCase
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
}}
(actionLogicDE);
{{else}}
{{#if
(
eq
logicModel
.
pSDEActionLogic
.
dstPSDEAction
.
codeName
'Remove'
)
}}
{{
lowerCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
codeName
}}
Service.remove(et.get
{{
pascalCase
logicModel
.
pSDEActionLogic
.
dstPSDE
.
keyPSDEField
.
codeName
}}
());
{{/if}}
{{/if}}
{{#if
ogicModel
.
pSDEActionLogic
.
isIgnoreException
}}
}catch(Exception e) {
log.error("执行[
{{
logicModel
.
pSDEActionLogic
.
dstPSDEAction
}}
]行为附加逻辑发生异常");
}
{{/if}}
end
{{/if}}
{{/
each
}}
{{/if}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/resources/rules/{{entities}}/{{lowerCase entityActions}}/exec.bpmn.hbs
0 → 100644
浏览文件 @
2abf0cec
{{#if
(
and
(
eq
entityAction
.
dEAction
.
actionType
'DELOGIC'
)
(
entityAction
.
isEnableBackend
)
(
entityAction
.
pSDELogic
.
isEnableBackend
))
}}
<?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=
"
{{
packageName
}}
.core.extensions.service.logic.execute"
isClosed=
"false"
isExecutable=
"true"
name=
"
{{
entityAction
.
entity
.
module
}}
_
{{
lowerCase
entityAction
.
entity
.
module
}}
_
{{
lowerCase
entityAction
.
codeName
}}
.execLogic"
processType=
"Private"
tns:packageName=
"
{{
packageName
}}
.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=
"
{{
packageName
}}
.core.
{{
lowerCase
entityAction
.
entity
.
module
}}
service.logic.
{{
lowerCase
entityAction
.
entity
.
codeName
}}{{
lowerCase
entityAction
.
pSDELogic
.
codeName
}}
"
id=
"
{{
entityAction
.
pSDELogic
.
codeName
}}
"
name=
"
{{
entityAction
.
entity
.
codeName
}}
/
{{
entityAction
.
pSDELogic
.
codeName
}}
RuleFlow.bpmn"
/>
<sequenceFlow
id=
"begin_
{{
entityAction
.
pSDELogic
.
codeName
}}
"
sourceRef=
"begin"
targetRef=
"
{{
entityAction
.
pSDELogic
.
codeName
}}
"
/>
<sequenceFlow
id=
"
{{
entityAction
.
pSDELogic
.
codeName
}}
_prepareparam1_end"
sourceRef=
"
{{
entityAction
.
pSDELogic
.
codeName
}}
"
targetRef=
"prepareparam1_end"
/>
</process>
</definitions>
{{/if}}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录