Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
e74fb898
提交
e74fb898
编写于
1月 19, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
版本升级
上级
1b85c180
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
615 行增加
和
393 行删除
+615
-393
EntityModel.java
...e/src/main/java/cn/ibizlab/codegen/model/EntityModel.java
+16
-1
FieldModel.java
...re/src/main/java/cn/ibizlab/codegen/model/FieldModel.java
+5
-0
WorkflowModel.java
...src/main/java/cn/ibizlab/codegen/model/WorkflowModel.java
+380
-11
application.yml.hbs
...ame}}-app-{{apps}}/src/main/resources/application.yml.hbs
+1
-1
application.yml.hbs
...projectName}}-boot/src/main/resources/application.yml.hbs
+1
-1
{{workflows}}.bpmn.hbs
...}-core/src/main/resources/workflow/{{workflows}}.bpmn.hbs
+211
-0
{{workflow}}.bpmn.hbs
...}}-core/src/main/resources/workflow/{{workflow}}.bpmn.hbs
+0
-378
application.yml.hbs
...-provider-{{apis}}/src/main/resources/application.yml.hbs
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/EntityModel.java
浏览文件 @
e74fb898
...
...
@@ -219,8 +219,23 @@ public class EntityModel extends BaseModel {
return
lastModifyField
;
}
private
FieldModel
orgField
;
public
FieldModel
getOrgField
()
{
if
(
fields
!=
null
&&
orgField
==
null
)
for
(
FieldModel
fieldModel:
fields
)
if
(
fieldModel
.
isOrgField
())
{
orgField
=
fieldModel
;
return
orgField
;
}
return
orgField
;
}
public
boolean
isLogicValid
()
{
return
getDataEntity
().
isLogicValid
();
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/FieldModel.java
浏览文件 @
e74fb898
...
...
@@ -186,6 +186,11 @@ public class FieldModel extends BaseModel {
return
"CREATEDATE"
.
equals
(
this
.
getDataEntityField
().
getPredefinedType
())||
"CREATEMAN"
.
equals
(
this
.
getDataEntityField
().
getPredefinedType
());
}
public
boolean
isOrgField
()
{
return
"ORGID"
.
equals
(
this
.
getDataEntityField
().
getPredefinedType
());
}
public
boolean
isUnionKeyField
()
{
return
!
StringUtils
.
isEmpty
(
this
.
getDataEntityField
().
getUnionKeyValue
());
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/WorkflowModel.java
浏览文件 @
e74fb898
...
...
@@ -10,7 +10,9 @@ import net.ibizsys.model.dataentity.action.IPSDEAction;
import
net.ibizsys.model.dataentity.action.IPSDELogicAction
;
import
net.ibizsys.model.dataentity.action.IPSDEScriptAction
;
import
net.ibizsys.model.wf.*
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.*
;
...
...
@@ -30,7 +32,7 @@ public class WorkflowModel extends BaseModel{
}
public
IPSWFVersion
getWFVer
sion
()
public
IPSWFVersion
getWFVer
()
{
return
(
IPSWFVersion
)
opt
;
}
...
...
@@ -43,9 +45,9 @@ public class WorkflowModel extends BaseModel{
if
(
refGroups
==
null
)
{
refGroups
=
new
LinkedHashMap
<>();
if
(
ObjectUtils
.
isEmpty
(
getWFVer
sion
().
getPSWFProcesses
()))
if
(
ObjectUtils
.
isEmpty
(
getWFVer
().
getPSWFProcesses
()))
{
getWFVer
sion
().
getPSWFProcesses
().
forEach
(
WFProcess
->{
getWFVer
().
getPSWFProcesses
().
forEach
(
WFProcess
->{
List
<
IPSWFProcessRole
>
roles
=
null
;
if
(
WFProcess
instanceof
IPSWFInteractiveProcess
)
roles
=((
IPSWFInteractiveProcess
)
WFProcess
).
getPSWFProcessRoles
();
...
...
@@ -54,11 +56,13 @@ public class WorkflowModel extends BaseModel{
if
(!
ObjectUtils
.
isEmpty
(
roles
))
{
roles
.
forEach
(
role
->{
if
(!
"WFROLE"
.
equalsIgnoreCase
(
role
.
getWFProcessRoleType
()))
return
;
String
roleId
=
role
.
getPSWFRole
().
getCodeName
()+
"|"
+
role
.
getPSWFRole
().
getName
()+
"|"
+
role
.
getPSWFRole
().
getWFRoleType
();
if
(
"DEDATASET"
.
equalsIgnoreCase
(
role
.
getPSWFRole
().
getWFRoleType
())&&
role
.
getPSWFRole
()
instanceof
IPSWFDEDataSetRole
)
{
IPSWFDEDataSetRole
dsRole
=(
IPSWFDEDataSetRole
)
role
.
getPSWFRole
();
if
(
dsRole
.
getWFUserIdPSDEF
()!=
null
&&
dsRole
.
getPSDEDataSet
()!=
null
&&
dsRole
.
getPSDataEntity
()!=
null
)
roleId
+=
(
"/"
+
StringAdvUtils
.
pluralize
(
dsRole
.
getPSDataEntity
().
getCodeName
())+
"/fetch"
+
dsRole
.
getPSDEDataSet
().
getCodeName
().
toLowerCase
()+
"."
+
StringAdvUtils
.
camelcase
(
dsRole
.
getWFUserIdPSDEF
().
getCodeName
()
));
roleId
+=
(
"/"
+
StringAdvUtils
.
pluralize
(
dsRole
.
getPSDataEntity
().
getCodeName
())+
"/fetch"
+
dsRole
.
getPSDEDataSet
().
getCodeName
().
toLowerCase
()+
"."
+
dsRole
.
getWFUserIdPSDEF
().
getCodeName
().
toLowerCase
(
));
}
refGroups
.
put
(
roleId
,
role
);
});
...
...
@@ -70,21 +74,23 @@ public class WorkflowModel extends BaseModel{
return
refGroups
;
}
private
Map
<
String
,
EntityModel
>
bookings
;
public
Map
<
String
,
EntityModel
>
getBookings
()
{
if
(
bookings
==
null
)
{
bookings
=
new
LinkedHashMap
<>();
getWFVer
sion
().
getPSWorkflow
().
getPSWFDEs
().
forEach
(
de
->{
getWFVer
().
getPSWorkflow
().
getPSWFDEs
().
forEach
(
de
->{
bookings
.
put
(
de
.
getCodeName
(),
getSystem
().
getEntity
(
de
.
getCodeName
()));
});
}
return
bookings
;
}
private
Map
<
String
,
AppModel
>
mobApps
;
public
Map
<
String
,
AppModel
>
getMobApps
()
{
private
Map
<
String
,
Map
<
String
,
AppModel
>>
mobApps
;
public
Map
<
String
,
Map
<
String
,
AppModel
>>
getMobApps
()
{
if
(
mobApps
==
null
)
{
mobApps
=
new
LinkedHashMap
<>();
getBookings
().
keySet
().
forEach
(
entity
->{
...
...
@@ -99,7 +105,15 @@ public class WorkflowModel extends BaseModel{
{
if
(
appEntity
.
getEntity
()!=
null
&&
entity
.
equalsIgnoreCase
(
appEntity
.
getEntity
().
getCodeName
()))
{
mobApps
.
put
(
app
.
codeName
,
app
);
Map
<
String
,
AppModel
>
refApps
=
null
;
if
(
mobApps
.
containsKey
(
appEntity
.
getEntity
().
getCodeName
()))
refApps
=
mobApps
.
get
(
appEntity
.
getEntity
().
getCodeName
());
else
{
refApps
=
new
LinkedHashMap
<>();
mobApps
.
put
(
appEntity
.
getEntity
().
getCodeName
(),
refApps
);
}
refApps
.
put
(
app
.
codeName
,
app
);
return
;
}
}
...
...
@@ -109,8 +123,8 @@ public class WorkflowModel extends BaseModel{
return
mobApps
;
}
private
Map
<
String
,
AppModel
>
webApps
;
public
Map
<
String
,
AppModel
>
getWebApps
()
{
private
Map
<
String
,
Map
<
String
,
AppModel
>
>
webApps
;
public
Map
<
String
,
Map
<
String
,
AppModel
>
>
getWebApps
()
{
if
(
webApps
==
null
)
{
webApps
=
new
LinkedHashMap
<>();
getBookings
().
keySet
().
forEach
(
entity
->{
...
...
@@ -125,7 +139,15 @@ public class WorkflowModel extends BaseModel{
{
if
(
appEntity
.
getEntity
()!=
null
&&
entity
.
equalsIgnoreCase
(
appEntity
.
getEntity
().
getCodeName
()))
{
webApps
.
put
(
app
.
codeName
,
app
);
Map
<
String
,
AppModel
>
refApps
=
null
;
if
(
webApps
.
containsKey
(
appEntity
.
getEntity
().
getCodeName
()))
refApps
=
webApps
.
get
(
appEntity
.
getEntity
().
getCodeName
());
else
{
refApps
=
new
LinkedHashMap
<>();
webApps
.
put
(
appEntity
.
getEntity
().
getCodeName
(),
refApps
);
}
refApps
.
put
(
app
.
codeName
,
app
);
return
;
}
}
...
...
@@ -135,4 +157,351 @@ public class WorkflowModel extends BaseModel{
return
webApps
;
}
private
List
<
Map
>
userTasks
;
public
List
<
Map
>
getUserTasks
()
{
if
(
getWFVer
().
getPSWFProcesses
()!=
null
)
{
userTasks
=
new
ArrayList
<>();
getWFVer
().
getPSWFProcesses
().
forEach
(
WFProcess
->{
if
(!
isUserTask
(
WFProcess
))
return
;
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"process"
,
WFProcess
);
List
<
IPSWFProcessRole
>
roles
=
null
;
List
<
String
>
formParam
=
new
ArrayList
<>();
if
(
WFProcess
instanceof
IPSWFInteractiveProcess
)
{
IPSWFInteractiveProcess
interactiveProcess
=(
IPSWFInteractiveProcess
)
WFProcess
;
if
(
"SEQUENTIAL"
.
equalsIgnoreCase
(
interactiveProcess
.
getMultiInstMode
()))
{
map
.
put
(
"sequential"
,
true
);
map
.
put
(
"multiInstanceLoopCharacteristics"
,
true
);
}
else
if
(
"PARALLEL"
.
equalsIgnoreCase
(
interactiveProcess
.
getMultiInstMode
()))
{
map
.
put
(
"sequential"
,
false
);
map
.
put
(
"multiInstanceLoopCharacteristics"
,
true
);
}
roles
=
interactiveProcess
.
getPSWFProcessRoles
();
map
.
put
(
"hasForm"
,(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getFormCodeName
()))||(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getMobFormCodeName
())));
if
(!
ObjectUtils
.
isEmpty
(
interactiveProcess
.
getPredefinedActions
()))
{
formParam
.
add
(
"procfunc=\""
+
String
.
join
(
";"
,
interactiveProcess
.
getPredefinedActions
()).
toLowerCase
()+
"\""
);
}
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getFormCodeName
()))
formParam
.
add
(
"process-form=\""
+
interactiveProcess
.
getFormCodeName
()+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getMobFormCodeName
()))
formParam
.
add
(
"process-mobform=\""
+
interactiveProcess
.
getMobFormCodeName
()+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getUtilFormCodeName
()))
formParam
.
add
(
"process-utilform=\""
+
interactiveProcess
.
getUtilFormCodeName
()+
"\" "
+
"process-utilformname=\""
+(
StringUtils
.
isEmpty
(
interactiveProcess
.
getUtilFormName
())?
interactiveProcess
.
getUtilFormCodeName
():
interactiveProcess
.
getUtilFormName
())+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getUtil2FormCodeName
()))
formParam
.
add
(
"process-util2form=\""
+
interactiveProcess
.
getUtil2FormCodeName
()+
"\" "
+
"process-util2formname=\""
+(
StringUtils
.
isEmpty
(
interactiveProcess
.
getUtil2FormName
())?
interactiveProcess
.
getUtil2FormCodeName
():
interactiveProcess
.
getUtil2FormName
())+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getUtil3FormCodeName
()))
formParam
.
add
(
"process-util3form=\""
+
interactiveProcess
.
getUtil3FormCodeName
()+
"\" "
+
"process-util3formname=\""
+(
StringUtils
.
isEmpty
(
interactiveProcess
.
getUtil3FormName
())?
interactiveProcess
.
getUtil3FormCodeName
():
interactiveProcess
.
getUtil3FormName
())+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getMobUtilFormCodeName
()))
formParam
.
add
(
"process-mobutilform=\""
+
interactiveProcess
.
getMobUtilFormCodeName
()+
"\" "
+
"process-mobutilformname=\""
+(
StringUtils
.
isEmpty
(
interactiveProcess
.
getMobUtilFormName
())?
interactiveProcess
.
getMobUtilFormCodeName
():
interactiveProcess
.
getMobUtilFormName
())+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getMobUtil2FormCodeName
()))
formParam
.
add
(
"process-mobutil2form=\""
+
interactiveProcess
.
getMobUtil2FormCodeName
()+
"\" "
+
"process-mobutil2formname=\""
+(
StringUtils
.
isEmpty
(
interactiveProcess
.
getMobUtil2FormName
())?
interactiveProcess
.
getMobUtil2FormCodeName
():
interactiveProcess
.
getMobUtil2FormName
())+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getMobUtil3FormCodeName
()))
formParam
.
add
(
"process-mobutil3form=\""
+
interactiveProcess
.
getMobUtil3FormCodeName
()+
"\" "
+
"process-mobutil3formname=\""
+(
StringUtils
.
isEmpty
(
interactiveProcess
.
getMobUtil3FormName
())?
interactiveProcess
.
getMobUtil3FormCodeName
():
interactiveProcess
.
getMobUtil3FormName
())+
"\" "
);
String
userTag
=
""
;
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getUserData
()))
userTag
=
interactiveProcess
.
getUserData
();
if
(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getUserData2
()))
{
if
(!
StringUtils
.
isEmpty
(
userTag
))
userTag
+=
"|"
;
userTag
+=
interactiveProcess
.
getUserData2
();
}
if
(!
StringUtils
.
isEmpty
(
userTag
))
formParam
.
add
(
"usertag=\""
+
userTag
+
"\" "
);
if
(
interactiveProcess
.
isEditable
())
{
formParam
.
add
(
"isEditable=\""
+
interactiveProcess
.
isEditable
()
+
"\" "
);
formParam
.
add
(
"editMode=\""
+
interactiveProcess
.
getEditMode
()
+
"\" "
);
}
if
(!
ObjectUtils
.
isEmpty
(
interactiveProcess
.
getEditFields
()))
{
formParam
.
add
(
"editFields=\""
+
String
.
join
(
";"
,
interactiveProcess
.
getEditFields
()).
toLowerCase
()+
"\""
);
}
if
(
interactiveProcess
.
isSendInform
()&&
interactiveProcess
.
getPSSysMsgTempl
()!=
null
)
formParam
.
add
(
"msg-template=\""
+
interactiveProcess
.
getPSSysMsgTempl
().
getCodeName
().
toLowerCase
()+
"\" , msg-type=\""
+
interactiveProcess
.
getMsgType
()+
"\" "
);
}
else
if
(
WFProcess
instanceof
IPSWFCallOrgActivityProcess
)
{
roles
=
((
IPSWFCallOrgActivityProcess
)
WFProcess
).
getPSWFProcessRoles
();
}
if
(!
ObjectUtils
.
isEmpty
(
roles
))
{
List
<
String
>
assignCond
=
new
ArrayList
<>();
List
<
String
>
assignUtCond
=
new
ArrayList
<>();
List
<
String
>
assignGroupCond
=
new
ArrayList
<>();
roles
.
forEach
(
processRole
->
{
if
(
"WFROLE"
.
equalsIgnoreCase
(
processRole
.
getWFProcessRoleType
()))
{
String
roleId
=
processRole
.
getPSWFRole
().
getCodeName
();
if
((!
StringUtils
.
isEmpty
(
processRole
.
getUserData
()))&&(!
StringUtils
.
isEmpty
(
processRole
.
getUserData2
())))
roleId
=
roleId
+
"|"
+
processRole
.
getUserData
()+
"|"
+
processRole
.
getUserData2
();
assignGroupCond
.
add
(
roleId
);
}
else
if
(
"CURACTOR"
.
equalsIgnoreCase
(
processRole
.
getWFProcessRoleType
()))
{
assignCond
.
add
(
"${activedata.createman}"
);
assignUtCond
.
add
(
"#activedata.createman"
);
}
else
if
(!
StringUtils
.
isEmpty
(
processRole
.
getUDField
()))
{
for
(
String
str:
processRole
.
getUDField
().
toLowerCase
().
split
(
";|,|;|,"
))
{
assignCond
.
add
(
"${activedata."
+
str
+
"}"
);
assignUtCond
.
add
(
"#activedata."
+
str
);
}
}
});
if
(!
ObjectUtils
.
isEmpty
(
assignGroupCond
))
{
String
strAssignGroupCond
=
String
.
join
(
","
,
assignGroupCond
);
assignCond
.
add
(
"${wfCoreService.getGroupUsers('"
+
strAssignGroupCond
+
"',execution)}"
);
map
.
put
(
"assignGroupCond"
,
strAssignGroupCond
);
map
.
put
(
"assignCond"
,
String
.
join
(
","
,
assignCond
));
String
strAssignUtCond
=
""
;
if
(!
ObjectUtils
.
isEmpty
(
assignUtCond
))
strAssignUtCond
=
String
.
join
(
"|"
,
assignUtCond
)+
"||"
;
strAssignUtCond
+=(
"#wfCoreService.getGroupUsers2('"
+
strAssignGroupCond
+
"',#execution)"
);
map
.
put
(
"assignUtCond"
,
strAssignUtCond
);
}
else
if
(!
ObjectUtils
.
isEmpty
(
assignCond
))
{
map
.
put
(
"assignCond"
,
String
.
join
(
","
,
assignCond
));
if
(!
ObjectUtils
.
isEmpty
(
assignUtCond
))
map
.
put
(
"assignUtCond"
,
String
.
join
(
"|"
,
assignUtCond
));
}
if
(
formParam
.
size
()>
0
&&
map
.
containsKey
(
"assignUtCond"
))
{
formParam
.
add
(
"candidateUsersList=\""
+
map
.
get
(
"assignUtCond"
)+
"\" "
);
}
}
if
(
WFProcess
.
isEnableTimeout
())
{
String
timeUnit
=
""
;
String
timeType
=
""
;
if
(
"MINUTE"
.
equalsIgnoreCase
(
WFProcess
.
getTimeoutType
()))
{
timeUnit
=
"M"
;
timeType
=
"PT"
;
}
else
if
(
"HOUR"
.
equalsIgnoreCase
(
WFProcess
.
getTimeoutType
()))
{
timeUnit
=
"H"
;
timeType
=
"PT"
;
}
else
if
(
"DAY"
.
equalsIgnoreCase
(
WFProcess
.
getTimeoutType
()))
{
timeUnit
=
"D"
;
timeType
=
"P"
;
}
if
(!
ObjectUtils
.
isEmpty
(
WFProcess
.
getPSWFLinks
()))
{
boolean
timeOut
=
false
;
for
(
IPSWFLink
WFLink:
WFProcess
.
getPSWFLinks
()){
if
(
WFLink
.
getWFLinkType
().
equalsIgnoreCase
(
"TIMEOUT"
))
{
timeOut
=
true
;
}
}
if
(
timeOut
)
{
map
.
put
(
"timeOut"
,
true
);
map
.
put
(
"timeoutStrategy"
,
timeType
+
WFProcess
.
getTimeout
()
+
timeUnit
);
}
}
}
if
(
formParam
.
size
()>
0
)
{
map
.
put
(
"formParam"
,
formParam
);
}
userTasks
.
add
(
map
);
});
}
return
userTasks
;
}
private
List
<
Map
>
processes
;
public
List
<
Map
>
getProcesses
()
{
if
(
processes
==
null
)
{
if
(
getWFVer
().
getPSWFProcesses
()!=
null
)
{
processes
=
new
ArrayList
<>();
getWFVer
().
getPSWFProcesses
().
forEach
(
WFProcess
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"process"
,
WFProcess
);
if
(!
isUserTask
(
WFProcess
))
map
.
put
(
"processId"
,
"sid-"
+
WFProcess
.
getCodeName
());
else
map
.
put
(
"processId"
,
"tid-"
+
WFProcess
.
getWFStepValue
()+
"-"
+
WFProcess
.
getCodeName
());
processes
.
add
(
map
);
});
}
}
return
processes
;
}
private
List
<
Map
>
sequenceFlows
;
public
List
<
Map
>
getSequenceFlows
()
{
if
(
sequenceFlows
==
null
)
{
sequenceFlows
=
new
ArrayList
<>();
if
(!
ObjectUtils
.
isEmpty
(
getWFVer
().
getPSWFLinks
()))
{
getWFVer
().
getPSWFLinks
().
forEach
(
WFLink
->{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"link"
,
WFLink
);
IPSWFProcess
sourceProcess
=
WFLink
.
getFromPSWFProcess
();
IPSWFProcess
targetProcess
=
WFLink
.
getToPSWFProcess
();
String
sourceProcessId
=
"sid-"
+
sourceProcess
.
getCodeName
();
if
(
isUserTask
(
sourceProcess
))
sourceProcessId
=
"tid-"
+
sourceProcess
.
getWFStepValue
()+
"-"
+
sourceProcess
.
getCodeName
();
String
targetProcessId
=
"sid-"
+
targetProcess
.
getCodeName
();
if
(
isUserTask
(
targetProcess
))
targetProcessId
=
"tid-"
+
targetProcess
.
getWFStepValue
()+
"-"
+
targetProcess
.
getCodeName
();
String
linkDeployId
=
DigestUtils
.
md5DigestAsHex
((
sourceProcessId
+
sourceProcessId
).
getBytes
());
String
flowId
=
"rid-"
+
linkDeployId
;
if
(!
"ROUTE"
.
equals
(
WFLink
.
getWFLinkType
()))
flowId
=
"lid-"
+(
StringUtils
.
isEmpty
(
WFLink
.
getLogicName
())?
WFLink
.
getName
():
WFLink
.
getLogicName
())+
"-"
+
linkDeployId
;
map
.
put
(
sourceProcessId
,
sourceProcessId
);
map
.
put
(
targetProcessId
,
targetProcessId
);
map
.
put
(
flowId
,
flowId
);
List
<
String
>
linkParam
=
new
ArrayList
<>();
if
(
WFLink
instanceof
PSWFInteractiveLinkImpl
)
{
PSWFInteractiveLinkImpl
interactiveLink
=(
PSWFInteractiveLinkImpl
)
WFLink
;
if
(!
StringUtils
.
isEmpty
(
interactiveLink
.
getFormCodeName
()))
linkParam
.
add
(
"sequenceFlowForm=\""
+
interactiveLink
.
getFormCodeName
()+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveLink
.
getMobFormCodeName
()))
linkParam
.
add
(
"sequenceFlowMobForm=\""
+
interactiveLink
.
getMobFormCodeName
()+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveLink
.
getViewCodeName
()))
linkParam
.
add
(
"sequenceFlowView=\""
+
interactiveLink
.
getViewCodeName
()+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveLink
.
getMobViewCodeName
()))
linkParam
.
add
(
"sequenceFlowMobView=\""
+
interactiveLink
.
getMobViewCodeName
()+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveLink
.
getNextCondition
()))
linkParam
.
add
(
"nextCondition=\""
+
interactiveLink
.
getNextCondition
()+
"\" "
);
if
(!
StringUtils
.
isEmpty
(
interactiveLink
.
getCustomCond
()))
linkParam
.
add
(
"customCond=\""
+
interactiveLink
.
getCustomCond
()+
"\" "
);
}
if
(
linkParam
.
size
()>
0
)
map
.
put
(
"linkParam"
,
linkParam
);
if
(
"TIMEOUT"
.
equalsIgnoreCase
(
WFLink
.
getWFLinkType
()))
{
if
(!
"Start001"
.
equalsIgnoreCase
(
sourceProcess
.
getCodeName
()))
{
String
LinkCond
=
""
;
if
(
"ROUTE"
.
equalsIgnoreCase
(
WFLink
.
getWFLinkType
()))
{
if
(!
StringUtils
.
isEmpty
(
WFLink
.
getCustomCond
()))
LinkCond
=
WFLink
.
getCustomCond
();
else
if
(
WFLink
.
getPSWFLinkGroupCond
()!=
null
)
{
LinkCond
=
"<![CDATA[${"
+
getGroupCond
(
WFLink
.
getPSWFLinkGroupCond
())+
"} ]]>"
;
}
}
else
LinkCond
=
"<![CDATA[${sequenceFlowId==\""
+
flowId
+
"\"}]]>"
;
if
(!
StringUtils
.
isEmpty
(
LinkCond
))
map
.
put
(
"linkCond"
,
LinkCond
);
}
}
sequenceFlows
.
add
(
map
);
});
}
}
return
sequenceFlows
;
}
private
boolean
isUserTask
(
IPSWFProcess
WFProcess
)
{
String
WFProcessType
=
WFProcess
.
getWFProcessType
();
return
!(
"START"
.
equals
(
WFProcessType
)||
"END"
.
equals
(
WFProcessType
)||
"PARALLELGATEWAY"
.
equals
(
WFProcessType
)||
"INCLUSIVEGATEWAY"
.
equals
(
WFProcessType
)||
"EXCLUSIVEGATEWAY"
.
equals
(
WFProcessType
)||
"PROCESS"
.
equals
(
WFProcessType
));
}
private
String
getGroupCond
(
IPSWFLinkGroupCond
WFLinkCond
)
{
String
strRuleCond
=
"("
;
if
(!
ObjectUtils
.
isEmpty
(
WFLinkCond
.
getPSWFLinkConds
()))
{
String
conn
=
WFLinkCond
.
getGroupOP
().
replace
(
"AND"
,
"&&"
).
replace
(
"OR"
,
"||"
);
for
(
IPSWFLinkCond
childWFLinkCond:
WFLinkCond
.
getPSWFLinkConds
())
{
String
childLinkType
=
childWFLinkCond
.
getCondType
();
if
(
childWFLinkCond
instanceof
IPSWFLinkGroupCond
&&
(!
ObjectUtils
.
isEmpty
(((
IPSWFLinkGroupCond
)
childWFLinkCond
).
getPSWFLinkConds
()))
)
{
if
(!
strRuleCond
.
equalsIgnoreCase
(
"("
))
strRuleCond
=
strRuleCond
+
conn
;
strRuleCond
=
strRuleCond
+
getGroupCond
((
IPSWFLinkGroupCond
)
childWFLinkCond
);
}
else
if
(
childWFLinkCond
instanceof
IPSWFLinkSingleCond
)
{
if
(!
strRuleCond
.
equalsIgnoreCase
(
"("
))
strRuleCond
=
strRuleCond
+
conn
;
strRuleCond
=
strRuleCond
+
getFieldCond
((
IPSWFLinkSingleCond
)
childWFLinkCond
);
}
}
}
strRuleCond
=
strRuleCond
+
")"
;
return
strRuleCond
;
}
private
String
getFieldCond
(
IPSWFLinkSingleCond
WFLinkCond
)
{
String
fieldCond
=
"("
;
String
condBody
=
""
;
String
paramType
=
WFLinkCond
.
getParamType
()==
null
?
""
:
WFLinkCond
.
getParamType
();
String
targetField
=
WFLinkCond
.
getFieldName
()==
null
?
""
:
WFLinkCond
.
getFieldName
().
toLowerCase
();
String
targetDBValueOP
=
WFLinkCond
.
getCondType
();
String
targetValue
=
WFLinkCond
.
getParamValue
();
if
(
"ISNULL"
.
equalsIgnoreCase
(
targetDBValueOP
)||
"ISNOTNULL"
.
equalsIgnoreCase
(
targetDBValueOP
))
condBody
=
"wfCoreService.test(activedata."
+
targetField
+
", '"
+
targetDBValueOP
+
"', null)"
;
else
if
(
"ENTITYFIELD"
.
equalsIgnoreCase
(
paramType
)||
"CONTEXT"
.
equalsIgnoreCase
(
paramType
))
{
if
(!
StringUtils
.
isEmpty
(
targetValue
))
condBody
=
"wfCoreService.test(activedata."
+
targetField
+
", '"
+
targetDBValueOP
+
"', activedata."
+
targetValue
.
toLowerCase
()+
")"
;
else
condBody
=
"wfCoreService.test(activedata."
+
targetField
+
", '"
+
targetDBValueOP
+
"', null)"
;
}
else
if
(
"CURTIME"
.
equalsIgnoreCase
(
paramType
))
{
condBody
=
"wfCoreService.test(activedata."
+
targetField
+
", '"
+
targetDBValueOP
+
"', wfCoreService.getnow())"
;
}
else
if
(
"OPERATOR"
.
equalsIgnoreCase
(
paramType
))
condBody
=
"wfCoreService.test(activedata."
+
targetField
+
", '"
+
targetDBValueOP
+
"', curuser.userid)"
;
else
if
(
"OPERATORNAME"
.
equalsIgnoreCase
(
paramType
))
condBody
=
"wfCoreService.test(activedata."
+
targetField
+
", '"
+
targetDBValueOP
+
"', curuser.personname)"
;
else
if
(
"SESSION"
.
equalsIgnoreCase
(
paramType
)&&(!
StringUtils
.
isEmpty
(
targetValue
)))
condBody
=
"wfCoreService.test(activedata."
+
targetField
+
", '"
+
targetDBValueOP
+
"', curuser.sessionParams."
+
targetValue
.
toLowerCase
()+
")"
;
else
if
(!
StringUtils
.
isEmpty
(
targetValue
))
condBody
=
"wfCoreService.test(activedata."
+
targetField
+
", '"
+
targetDBValueOP
+
"', '"
+
targetValue
.
replace
(
"\""
,
""
).
replace
(
"‘"
,
""
).
replace
(
"“"
,
""
).
replace
(
"”"
,
""
)+
"')"
;
else
if
(
StringUtils
.
isEmpty
(
targetValue
))
condBody
=
"wfCoreService.test(activedata."
+
targetField
+
", '"
+
targetDBValueOP
+
"', null)"
;
fieldCond
=
fieldCond
+
condBody
;
fieldCond
=
fieldCond
+
")"
;
return
fieldCond
;
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/resources/application.yml.hbs
浏览文件 @
e74fb898
...
...
@@ -2,4 +2,4 @@ spring:
profiles:
include: nacos,
{{
lowerCase
app
.
codeName
}}
-prod
application:
name:
{{
project
Name
}}
-
{{
lowerCase
app
.
codeName
}}
name:
{{
lowerCase
system
.
code
Name
}}
-
{{
lowerCase
app
.
codeName
}}
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-boot/src/main/resources/application.yml.hbs
浏览文件 @
e74fb898
...
...
@@ -2,6 +2,6 @@ spring:
profiles:
include: sys , nacos ,
{{#
each
system
.
apps
}}
{{
lowerCase
codeName
}}
-dev ,
{{/
each
}}{{#
each
system
.
apis
}}
{{
lowerCase
codeName
}}
-dev ,
{{/
each
}}
dev
application:
name:
{{
project
Name
}}
name:
{{
lowerCase
system
.
code
Name
}}
main:
allow-bean-definition-overriding: true
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/resources/workflow/{{workflows}}.bpmn.hbs
0 → 100644
浏览文件 @
e74fb898
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:flowable=
"http://flowable.org/bpmn"
xmlns:bpmndi=
"http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc=
"http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi=
"http://www.omg.org/spec/DD/20100524/DI"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
expressionLanguage=
"http://www.w3.org/1999/XPath"
targetNamespace=
"http://www.flowable.org/processdef"
>
<process
id=
"
{{
workflow
.
id
}}
"
isClosed=
"false"
isExecutable=
"true"
name=
"
{{
workflow
.
name
}}
"
processType=
"None"
>
<extensionElements>
<flowable:eventListener
delegateExpression=
"${processInstanceListener}"
/>
{{#if
workflow
.
refGroups
}}
<flowable:field
name=
"refgroups"
>
<flowable:string>
{{#
each
workflow
.
refGroups
as
|
refGroup
|
}}{{
@key
}}{{#
unless
@last
}}
,
{{/
unless
}}{{/
each
}}
</flowable:string>
</flowable:field>
{{/if}}
{{#if
workflow
.
bookings
}}
<flowable:field
name=
"bookings"
>
<flowable:string>
{{#
each
workflow
.
bookings
as
|
booking
|
}}{{
pluralize
booking
.
codeName
}}{{#
unless
@last
}}
,
{{/
unless
}}{{/
each
}}
</flowable:string>
</flowable:field>
{{/if}}
{{#if
workflow
.
mobApps
}}
{{#
each
workflow
.
mobApps
as
|
mobApp
|
}}
<flowable:field
name=
"bookingmobs_
{{
pluralize
@key
}}
"
>
<flowable:string>
{{#
each
this
as
|
app
|
}}{{
app
.
codeName
}}{{#
unless
@last
}}
,
{{/
unless
}}{{/
each
}}
</flowable:string>
</flowable:field>
{{/
each
}}
{{/if}}
{{#if
workflow
.
webApps
}}
{{#
each
workflow
.
webApps
as
|
webApp
|
}}
<flowable:field
name=
"bookingapps_
{{
pluralize
@key
}}
"
>
<flowable:string>
{{#
each
this
as
|
app
|
}}{{
app
.
codeName
}}{{#
unless
@last
}}
,
{{/
unless
}}{{/
each
}}
</flowable:string>
</flowable:field>
{{/
each
}}
{{/if}}
{{#
each
item
.
psWorkflow
()
.
psWFDEs
as
|
wfde
|
}}
{{#if
wfde
.
wFStepPSDEField
}}
<flowable:field
name=
"wfstepfield_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
lowerCase
wfde
.
wFStepPSDEField
.
codeName
}}
</flowable:string>
</flowable:field>
{{/if}}
{{#if
wfde
.
wFInstPSDEField
}}
<flowable:field
name=
"wfinstfield_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
lowerCase
wfde
.
wFInstPSDEField
.
codeName
}}
</flowable:string>
</flowable:field>
{{/if}}
{{#if
wfde
.
uDStatePSDEField
}}
<flowable:field
name=
"udstatefield_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
lowerCase
wfde
.
uDStatePSDEField
.
codeName
}}
</flowable:string>
</flowable:field>
{{/if}}
{{#if
workflow
.
psWorkflow
.
entityWFStates
}}
{{#
neq
workflow
.
psWorkflow
.
entityWFStates
""
}}
<flowable:field
name=
"udstateingval_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
workflow
.
psWorkflow
.
entityWFStates
}}
</flowable:string>
</flowable:field>
{{/
neq
}}
{{/if}}
{{#if
workflow
.
psWorkflow
.
entityWFFinishState
}}
{{#
neq
workflow
.
psWorkflow
.
entityWFFinishState
""
}}
<flowable:field
name=
"wffinishval_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
workflow
.
psWorkflow
.
entityWFFinishState
}}
</flowable:string>
</flowable:field>
{{/
neq
}}
{{/if}}
{{#if
workflow
.
psWorkflow
.
entityWFErrorState
}}
{{#
neq
workflow
.
psWorkflow
.
entityWFErrorState
""
}}
<flowable:field
name=
"wferrorval_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
workflow
.
psWorkflow
.
entityWFErrorState
}}
</flowable:string>
</flowable:field>
{{/
neq
}}
{{/if}}
{{#if
wfde
.
wFStatePSDEField
}}
<flowable:field
name=
"wfstatefield_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
lowerCase
wfde
.
wFStatePSDEField
.
codeName
}}
</flowable:string>
</flowable:field>
{{/if}}
{{#if
wfde
.
wFVerPSDEField
}}
<flowable:field
name=
"wfverfield_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
lowerCase
wfde
.
wFVerPSDEField
.
codeName
}}
</flowable:string>
</flowable:field>
{{/if}}
{{#if
wfde
.
psDataEntity
.
majorPSDEField
}}
<flowable:field
name=
"majortext_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
lowerCase
wfde
.
psDataEntity
.
majorPSDEField
.
codeName
}}
</flowable:string>
</flowable:field>
{{/if}}
{{#if
wfde
.
psDataEntity
.
orgField
}}
<flowable:field
name=
"orgfield_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
lowerCase
wfde
.
psDataEntity
.
orgField
.
codeName
}}
</flowable:string>
</flowable:field>
{{/if}}
<flowable:field
name=
"isvalid"
><flowable:string>
{{#if
workflow
.
valid
}}
1
{{else}}
0
{{/if}}
</flowable:string></flowable:field>
{{/
each
}}
</extensionElements>
{{#if
workflow
.
psWFProcesses
}}
{{#
each
workflow
.
psWFProcesses
as
|
WFProcess
|
}}
{{#
eq
WFProcess
.
wFProcessType
'START'
}}
<startEvent
id=
"sid-
{{
WFProcess
.
codeName
}}
"
name=
"
{{
WFProcess
.
name
}}
"
>
{{#if
(
or
WFProcess
.
formCodeName
WFProcess
.
mobFormCodeName
)
}}
<extensionElements>
<flowable:form
{{#if
WFProcess
.
formCodeName
}}
process-form=
"
{{
WFProcess
.
formCodeName
}}
"
{{/if}}
{{#if
WFProcess
.
mobFormCodeName
}}
process-mobform=
"
{{
WFProcess
.
mobFormCodeName
}}
"
{{/if}}
{{#if
WFProcess
.
wFVersion
}}
wfversion=
"
{{
WFProcess
.
wFVersion
}}
"
{{/if}}
/>
</extensionElements>
{{/if}}
</startEvent>
{{/
eq
}}
{{#
eq
WFProcess
.
wFProcessType
'END'
}}
<endEvent
id=
"sid-
{{
WFProcess
.
codeName
}}
"
name=
"
{{
WFProcess
.
name
}}
"
>
{{#if
(
or
(
and
WFProcess
.
userData
(
neq
WFProcess
.
userData
""
))
(
and
WFProcess
.
userData2
(
neq
WFProcess
.
userData2
""
)))
}}
<extensionElements>
<flowable:form
{{#if
(
and
WFProcess
.
userData
(
neq
WFProcess
.
userData
""
))
}}
userdata=
"
{{
WFProcess
.
userData
}}
"
{{/if}}
{{#if
(
and
WFProcess
.
userData2
(
neq
WFProcess
.
userData2
""
))
}}
userdata2=
"
{{
WFProcess
.
userData2
}}
"
{{/if}}
/>
</extensionElements>
{{/if}}
</endEvent>
{{/
eq
}}
{{#
eq
WFProcess
.
wFProcessType
'PARALLELGATEWAY'
}}
<parallelGateway
id=
"sid-
{{
WFProcess
.
codeName
}}
"
/>
{{/
eq
}}
{{#
eq
WFProcess
.
wFProcessType
'INCLUSIVEGATEWAY'
}}
<inclusiveGateway
id=
"sid-
{{
WFProcess
.
codeName
}}
"
/>
{{/
eq
}}
{{#
eq
WFProcess
.
wFProcessType
'EXCLUSIVEGATEWAY'
}}
<exclusiveGateway
id=
"sid-
{{
WFProcess
.
codeName
}}
"
/>
{{/
eq
}}
{{#
eq
WFProcess
.
wFProcessType
'PROCESS'
}}
<serviceTask
id=
"sid-
{{
WFProcess
.
codeName
}}
"
name=
"
{{
WFProcess
.
name
}}
"
flowable:expression=
"${wfCoreService.execute(execution, activedata)}"
>
<extensionElements>
<flowable:field
name=
"service-entity"
><flowable:string>
{{
pluralize
WFProcess
.
psDataEntity
.
codeName
}}
</flowable:string></flowable:field>
<flowable:field
name=
"service-deaction"
><flowable:string>
{{
lowerCase
WFProcess
.
psDEAction
.
codeName
}}
</flowable:string></flowable:field>
{{#if
WFProcess
.
psWFProcessParams
}}
{{#
each
WFProcess
.
psWFProcessParams
as
|
processparams
|
}}
{{#if
processparams
.
dstField
(
neq
processparams
.
dstField
""
)
}}
{{#if
(
and
processparams
.
srcValueType
(
neq
processparams
.
srcValueType
""
))
}}
{{#
eq
processparams
.
srcValue
"CURTIME"
}}
<flowable:field
name=
"params-
{{
lowerCase
processparams
.
dstField
}}
"
><flowable:expression>
<![CDATA[${wfCoreService.getnow()}]]>
</flowable:expression></flowable:field>
{{/
eq
}}
{{#
eq
processparams
.
srcValue
"OPERATOR"
}}
<flowable:field
name=
"params-
{{
lowerCase
processparams
.
dstField
}}
"
><flowable:expression>
<![CDATA[${curuser.userid}]]>
</flowable:expression></flowable:field>
{{/
eq
}}
{{#
eq
processparams
.
srcValue
"OPERATORNAME"
}}
<flowable:field
name=
"params-
{{
lowerCase
processparams
.
dstField
}}
"
><flowable:expression>
<![CDATA[${curuser.personname}]]>
</flowable:expression></flowable:field>
{{/
eq
}}
{{#
eq
processparams
.
srcValue
"CONTEXT"
}}
<flowable:field
name=
"params-
{{
lowerCase
processparams
.
dstField
}}
"
><flowable:expression><
![
CDATA
[${
activedata
.
{{
lowerCase
processparams
.
srcValue
}}
}]]
></flowable:expression></flowable:field>
{{/
eq
}}
{{#
eq
processparams
.
srcValue
"SESSION"
}}
<flowable:field
name=
"params-
{{
lowerCase
processparams
.
dstField
}}
"
><flowable:expression><
![
CDATA
[${
curuser
.
sessionParams
.
{{
lowerCase
processparams
.
srcValue
}}
}]]
></flowable:expression></flowable:field>
{{/
eq
}}
{{else}}
{{#if
(
and
processparams
.
srcValue
(
neq
processparams
.
srcValue
""
))
}}
<flowable:field
name=
"params-
{{
lowerCase
processparams
.
dstField
}}
"
><flowable:string>
{{
processparams
.
srcValue
}}
</flowable:string></flowable:field>
{{/if}}
{{/if}}
{{/if}}
{{/
each
}}
{{/if}}
</extensionElements>
</serviceTask>
{{/
eq
}}
{{/
each
}}
{{#
each
workflow
.
userTasks
as
|
userTask
|
}}
<userTask
flowable:category=
"${businessKey}"
{{#if
userTask
.
timeOut
}}
flowable:dueDate=
"
{{
userTask
.
timeoutStrategy
}}
"
{{/if}}
flowable:candidateUsers=
"
{{#if
userTask
.
multiInstanceLoopCharacteristics
}}
${candidateUsers}
{{else}}{{
userTask
.
assignCond
}}{{/if}}
"
flowable:exclusive=
"true"
id=
"tid-
{{
userTask
.
process
.
wFStepValue
}}
-
{{
userTask
.
process
.
codeName
}}
"
name=
"
{{
userTask
.
process
.
name
}}
"
{{#if
(
or
(
eq
userTask
.
process
.
wFProcessType
"CALLORGACTIVITY"
)
(
eq
userTask
.
process
.
wFProcessType
"EMBED"
))
}}
flowable:formKey=
"
{{
userTask
.
process
.
wFProcessType
}}
"
{{/if}}
>
<documentation>
${majortext}
</documentation>
{{#if
userTask
.
formParam
}}
<extensionElements>
<flowable:form
{{#
each
userTask
.
formParam
as
|
itemParam
|
}}{{
itemParam
}}
{{/
each
}}
/>
</extensionElements>
{{/if}}
{{#if
userTask
.
multiInstanceLoopCharacteristics
}}
<multiInstanceLoopCharacteristics
flowable:collection=
"candidateUsersList"
flowable:elementVariable=
"candidateUsers"
isSequential=
"
{{
userTask
.
sequential
}}
"
>
<completionCondition>
<![CDATA[${nrOfCompletedInstances/nrOfInstances == 1}]]>
</completionCondition>
</multiInstanceLoopCharacteristics>
{{/if}}
</userTask>
{{#if
userTask
.
timeOut
}}
<boundaryEvent
id=
"bid-
{{
userTask
.
process
.
wFStepValue
}}
-
{{
userTask
.
process
.
codeName
}}
"
name=
"timeout-
{{
userTask
.
process
.
name
}}
"
attachedToRef=
"tid-
{{
userTask
.
process
.
wFStepValue
}}
-
{{
userTask
.
process
.
codeName
}}
"
cancelActivity=
"true"
>
<timerEventDefinition>
<timeDate>
{{
userTask
.
timeoutStrategy
}}
</timeDate>
</timerEventDefinition>
</boundaryEvent>
{{/if}}
{{/
each
}}
{{/if}}
{{#
each
workflow
.
sequenceFlows
as
|
sequenceFlow
|
}}
<sequenceFlow
id=
"
{{
sequenceFlow
.
flowId
}}
"
sourceRef=
"
{{
sequenceFlow
.
sourceProcessId
}}
"
targetRef=
"
{{
sequenceFlow
.
targetProcessId
}}
"
name=
"
{{
sequenceFlow
.
link
.
logicName
}}
"
>
{{#if
sequenceFlow
.
linkCond
}}
<conditionExpression
xsi:type=
"tFormalExpression"
>
{{
sequenceFlow
.
linkCond
}}
</conditionExpression>
{{/if}}
{{#if
sequenceFlow
.
linkParam
}}
<extensionElements>
<flowable:form
{{#
each
sequenceFlow
.
linkParam
as
|
itemParam
|
}}{{
itemParam
}}
{{/
each
}}
/>
</extensionElements>
{{/if}}
</sequenceFlow>
{{/
each
}}
</process>
<bpmndi:BPMNDiagram
id=
"BPMNDiagram_
{{
workflow
.
id
}}
"
>
<bpmndi:BPMNPlane
id=
"BPMNPlane_
{{
workflow
.
id
}}
"
bpmnElement=
"
{{
workflow
.
id
}}
"
>
{{#
each
workflow
.
processes
as
|
task
|
}}
<bpmndi:BPMNShape
id=
"BPMNShape-
{{
task
.
processId
}}
"
bpmnElement=
"
{{
task
.
processId
}}
"
>
<omgdi:Bounds
x=
"
{{
task
.
process
.
leftPos
}}
"
y=
"
{{
task
.
process
.
topPos
}}
"
width=
"
{{
task
.
process
.
width
}}
"
height=
"
{{
task
.
process
.
height
}}
"
/>
</bpmndi:BPMNShape>
{{/
each
}}
{{#
each
workflow
.
sequenceFlows
as
|
sequenceFlow
|
}}
<bpmndi:BPMNEdge
id=
"BPMNEdge-
{{
sequenceFlow
.
flowId
}}
"
bpmnElement=
"
{{
sequenceFlow
.
flowId
}}
"
>
<omgdi:waypoint
x=
"0"
y=
"0"
/>
<omgdi:waypoint
x=
"0"
y=
"0"
/>
</bpmndi:BPMNEdge>
{{/
each
}}
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/resources/workflow/{{workflow}}.bpmn.hbs
已删除
100644 → 0
浏览文件 @
1b85c180
<
#
ibiztemplate
>
TARGET=PSWFVERSION
</
#
ibiztemplate>
<
#
assign
sid =
sys.getId()/
>
<
#
assign
sname =
sys.getCodeName()/
>
<
#
assign
slogicname =
sys.getName()
/>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:flowable=
"http://flowable.org/bpmn"
xmlns:bpmndi=
"http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc=
"http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi=
"http://www.omg.org/spec/DD/20100524/DI"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
expressionLanguage=
"http://www.w3.org/1999/XPath"
targetNamespace=
"http://www.flowable.org/processdef"
>
<process
id=
"${sys.getCodeName()?lower_case}-${item.codeName?lower_case}"
isClosed=
"false"
isExecutable=
"true"
name=
"${item.getName()}"
processType=
"None"
>
<extensionElements>
<flowable:eventListener
delegateExpression=
"${processInstanceListener}"
/>
<
#
if
item
.
getPSWFProcesses
??
&&
item
.
getPSWFProcesses
()??
>
<
#
assign
rolesList=
""
>
<
#
list
item
.
getPSWFProcesses
()
as
WFProcess
>
<
#
if
WFProcess
.
getPSWFProcessRoles
??
&&
WFProcess
.
getPSWFProcessRoles
()??
>
<
#
list
WFProcess
.
getPSWFProcessRoles
()
as
processRole
>
<
#
assign
processRoleType=
processRole.getWFProcessRoleType()
>
<
#
if
processRoleType=
='WFROLE'
>
<
#
if
processRole
.
getPSWFRole
()??
&&
processRole
.
getPSWFRole
().
getCodeName
()??
>
<
#
if
!
P
.
exists
("
refgroups
",
processRole
.
getPSWFRole
().
getCodeName
())
>
<
#
if
rolesList
!=""
><
#
assign
rolesList=
rolesList+","
></
#
if>
<
#
assign
rolesList=
rolesList+processRole.getPSWFRole().getCodeName()+"|"+processRole.getPSWFRole().getName()+"|"+processRole.getPSWFRole().getWFRoleType()
>
<
#
if
processRole
.
getPSWFRole
().
getWFRoleType
()=="
DEDATASET
"
>
<
#
assign
rolesList=
rolesList+"/"+srfpluralize(processRole.getPSWFRole().getPSDataEntity().getCodeName()?lower_case)+"/fetch"+processRole.getPSWFRole().getPSDEDataSet().getCodeName()?lower_case+"."+processRole.getPSWFRole().getWFUserIdPSDEF().getCodeName()?lower_case
>
</
#
if>
</
#
if>
</
#
if>
</
#
if>
</
#
list>
</
#
if>
</
#
list>
<
#
if
rolesList
!=""
>
<flowable:field
name=
"refgroups"
>
<flowable:string>
${rolesList}
</flowable:string>
</flowable:field>
</
#
if>
</
#
if>
<
#
if
item
.
getPSWorkflow
()??
&&
item
.
getPSWorkflow
().
getPSWFDEs
()??
>
<
#
assign
des=
""
>
<
#
list
item
.
getPSWorkflow
().
getPSWFDEs
()
as
wfde
>
<
#
if
des
!=""
><
#
assign
des=
des+","
></
#
if>
<
#
assign
des=
des+srfpluralize(wfde.getPSDataEntity().getCodeName()?lower_case)
>
</
#
list>
<
#
if
des
!=""
>
<flowable:field
name=
"bookings"
>
<flowable:string>
${des}
</flowable:string>
</flowable:field>
</
#
if>
<
#
list
item
.
getPSWorkflow
().
getPSWFDEs
()
as
wfde
>
<
#
assign
mobApp=
""
>
<
#
assign
pcApp=
""
>
<
#
if
wfde
.
getPSDataEntity
()??
>
<
#
assign
refDE=
wfde.getPSDataEntity()
>
<
#
if
refDE
.
getAllPSAppDataEntities
()??
>
<
#
list
refDE
.
getAllPSAppDataEntities
()
as
refAppDE
>
<
#
assign
app=
refAppDE.getPSApplication()
>
<
#
if
app
.
isMobileApp
()
>
<
#
if
!
P
.
exists
("
mob
",
app
.
codeName
)
>
<
#
if
mobApp=
=""
>
<
#
assign
mobApp=
app.codeName
>
<
#
else
>
<
#
assign
mobApp=
mobApp+","+app.codeName
>
</
#
if>
</
#
if>
<
#
else
>
<
#
if
!
P
.
exists
("
pc
",
app
.
codeName
)
>
<
#
if
pcApp=
=""
>
<
#
assign
pcApp=
app.codeName
>
<
#
else
>
<
#
assign
pcApp=
pcApp+","+app.codeName
>
</
#
if>
</
#
if>
</
#
if>
</
#
list>
</
#
if>
<
#
if
pcApp
!=""
>
<flowable:field
name=
"bookingapps_${srfpluralize(refDE.getCodeName()?lower_case)}"
>
<flowable:string>
${pcApp}
</flowable:string>
</flowable:field>
</
#
if>
<
#
if
mobApp
!=""
>
<flowable:field
name=
"bookingmobs_${srfpluralize(refDE.getCodeName()?lower_case)}"
>
<flowable:string>
${mobApp}
</flowable:string>
</flowable:field>
</
#
if>
</
#
if>
</
#
list>
<
#
list
item
.
getPSWorkflow
().
getPSWFDEs
()
as
wfde
>
<
#
if
wfde
.
getWFStepPSDEField
()??
>
<flowable:field
name=
"wfstepfield_${srfpluralize(wfde.getPSDataEntity().getCodeName()?lower_case)}"
>
<flowable:string>
${(wfde.getWFStepPSDEField().getCodeName()?lower_case)}
</flowable:string>
</flowable:field>
</
#
if>
<
#
if
wfde
.
getWFInstPSDEField
()??
>
<flowable:field
name=
"wfinstfield_${srfpluralize(wfde.getPSDataEntity().getCodeName()?lower_case)}"
>
<flowable:string>
${(wfde.getWFInstPSDEField().getCodeName()?lower_case)}
</flowable:string>
</flowable:field>
</
#
if>
<
#
if
wfde
.
getUDStatePSDEField
()??
>
<flowable:field
name=
"udstatefield_${srfpluralize(wfde.getPSDataEntity().getCodeName()?lower_case)}"
>
<flowable:string>
${(wfde.getUDStatePSDEField().getCodeName()?lower_case)}
</flowable:string>
</flowable:field>
</
#
if>
<
#
if
item
.
getPSWorkflow
().
getEntityWFStates
??
&&
item
.
getPSWorkflow
().
getEntityWFStates
()??
>
<
#
list
item
.
getPSWorkflow
().
getEntityWFStates
()
as
wfStatus
>
<flowable:field
name=
"udstateingval_${srfpluralize(wfde.getPSDataEntity().getCodeName()?lower_case)}"
>
<flowable:string>
${wfStatus}
</flowable:string>
</flowable:field>
<
#
break
>
</
#
list>
</
#
if>
<
#
if
wfde
.
getWFStatePSDEField
()??
>
<flowable:field
name=
"wfstatefield_${srfpluralize(wfde.getPSDataEntity().getCodeName()?lower_case)}"
>
<flowable:string>
${(wfde.getWFStatePSDEField().getCodeName()?lower_case)}
</flowable:string>
</flowable:field>
</
#
if>
<
#
if
wfde
.
getWFVerPSDEField
()??
>
<flowable:field
name=
"wfverfield_${srfpluralize(wfde.getPSDataEntity().getCodeName()?lower_case)}"
>
<flowable:string>
${(wfde.getWFVerPSDEField().getCodeName()?lower_case)}
</flowable:string>
</flowable:field>
</
#
if>
<
#
if
wfde
.
getPSDataEntity
().
getMajorPSDEField
()??&&
wfde
.
getPSDataEntity
().
getMajorPSDEField
().
getCodeName
()??
>
<flowable:field
name=
"majortext_${srfpluralize(wfde.getPSDataEntity().getCodeName()?lower_case)}"
>
<flowable:string>
${(wfde.getPSDataEntity().getMajorPSDEField().getCodeName()?lower_case)}
</flowable:string>
</flowable:field>
</
#
if>
</
#
list>
</
#
if>
</extensionElements>
<
#
comment
>
绘制处理节点
</
#
comment>
<
#
if
item
.
getPSWFProcesses
??
&&
item
.
getPSWFProcesses
()??
>
<
#
list
item
.
getPSWFProcesses
()
as
WFProcess
>
<
#
if
WFProcess
.
getWFProcessType
()=='
START
'
>
<startEvent
id=
"sid-${WFProcess.getDeployId()}"
name=
"${WFProcess.getName()}"
/>
<
#
elseif
WFProcess
.
getWFProcessType
()=='
END
'
>
<endEvent
id=
"sid-${WFProcess.getDeployId()}"
name=
"${WFProcess.getName()}"
/>
<
#
elseif
WFProcess
.
getWFProcessType
()=='
PARALLELGATEWAY
'
>
<parallelGateway
id=
"sid-${WFProcess.getDeployId()}"
></parallelGateway>
<
#
elseif
WFProcess
.
getWFProcessType
()=='
INCLUSIVEGATEWAY
'
>
<inclusiveGateway
id=
"sid-${WFProcess.getDeployId()}"
></inclusiveGateway>
<
#
elseif
WFProcess
.
getWFProcessType
()=='
EXCLUSIVEGATEWAY
'
>
<exclusiveGateway
id=
"sid-${WFProcess.getDeployId()}"
></exclusiveGateway>
<
#
elseif
WFProcess
.
getWFProcessType
()=='
PROCESS
'
>
<serviceTask
id=
"sid-${WFProcess.getDeployId()}"
name=
"${WFProcess.getName()}"
flowable:expression=
"${wfCoreService.execute(execution, activedata)}"
>
<
#
if
WFProcess
.
getPSDataEntity
()??
>
<extensionElements>
<flowable:field
name=
"service-entity"
><flowable:string>
${srfpluralize(WFProcess.getPSDataEntity().getCodeName()?lower_case)}
</flowable:string></flowable:field>
<flowable:field
name=
"service-deaction"
><flowable:string>
${WFProcess.getPSDEAction().getCodeName()?lower_case}
</flowable:string></flowable:field>
<
#
if
WFProcess
.
getPSWFProcessParams
()??
>
<
#
list
WFProcess
.
getPSWFProcessParams
()
as
processparams
>
<
#
if
processparams
.
getSrcValueType
()??
&&
processparams
.
getSrcValueType
()!=""
&&
processparams
.
getDstField
()??
&&
processparams
.
getDstField
()!=""
>
<
#
if
processparams
.
getSrcValueType
()=="
CURTIME
"
>
<flowable:field
name=
"params-${(processparams.getDstField()?lower_case)}"
><flowable:expression>
<![CDATA[${wfCoreService.getnow()}]]>
</flowable:expression></flowable:field>
<
#
elseif
processparams
.
getSrcValueType
()=="
OPERATOR
"
>
<flowable:field
name=
"params-${(processparams.getDstField()?lower_case)}"
><flowable:expression>
<![CDATA[${curuser.userid}]]>
</flowable:expression></flowable:field>
<
#
elseif
processparams
.
getSrcValueType
()=="
OPERATORNAME
"
>
<flowable:field
name=
"params-${(processparams.getDstField()?lower_case)}"
><flowable:expression>
<![CDATA[${curuser.personname}]]>
</flowable:expression></flowable:field>
<
#
elseif
processparams
.
getSrcValueType
()=="
CONTEXT
"
>
<flowable:field
name=
"params-${(processparams.getDstField()?lower_case)}"
><flowable:expression>
<![CDATA[${activedata.'}${(processparams.getSrcValue()?lower_case)}}]]>
</flowable:expression></flowable:field>
<
#
elseif
processparams
.
getSrcValueType
()=="
SESSION
"
>
<flowable:field
name=
"params-${(processparams.getDstField()?lower_case)}"
><flowable:expression>
<![CDATA[${curuser.sessionParams.'}${processparams.getSrcValue()?lower_case}}]]>
</flowable:expression></flowable:field>
</
#
if>
<
#
elseif
processparams
.
getSrcValue
()??
&&
processparams
.
getDstField
()??
&&
processparams
.
getDstField
()!=""
>
<flowable:field
name=
"params-${(processparams.getDstField()?lower_case)}"
><flowable:string>
${processparams.getSrcValue()}
</flowable:string></flowable:field>
</
#
if>
</
#
list>
</
#
if>
</extensionElements>
</
#
if>
</serviceTask>
<
#
else
>
<
#
assign
assignCond=
""
>
<
#
assign
isSequential=
""
>
<
#
if
WFProcess
.
getMultiInstMode
??
&&
WFProcess
.
getMultiInstMode
()??
&&
(
WFProcess
.
getMultiInstMode
()=='
PARALLEL
'
||
WFProcess
.
getMultiInstMode
()=='
SEQUENTIAL
')
>
<
#
assign
assignCond=
"flowable:assignee=\"
"+"$"+"{
assignee
}\""
>
<
#
if
WFProcess
.
getMultiInstMode
()=='
SEQUENTIAL
'
>
<
#
assign
isSequential=
"isSequential=\"
true
\""
>
<
#
else
>
<
#
assign
isSequential=
"isSequential=\"
false
\""
>
</
#
if>
</
#
if>
<
#
assign
assignCond=
""
>
<
#
assign
assignGroupCond=
""
>
<
#
if
WFProcess
.
getPSWFProcessRoles
??
&&
WFProcess
.
getPSWFProcessRoles
()??
>
<
#
list
WFProcess
.
getPSWFProcessRoles
()
as
processRole
>
<
#
assign
processRoleType=
processRole.getWFProcessRoleType()
>
<
#
assign
roleId=
""
>
<
#
if
processRoleType=
='WFROLE'
>
<
#
if
processRole
.
getPSWFRole
()??
&&
processRole
.
getPSWFRole
().
getCodeName
()??
>
<
#
if
assignGroupCond
!=""
>
<
#
assign
assignGroupCond=
assignGroupCond+","
>
</
#
if>
<
#
assign
assignGroupCond=
assignGroupCond+processRole.getPSWFRole().getCodeName()
>
<
#
if
processRole
.
getUserData
()??
&&
processRole
.
getUserData2
()??
&&
processRole
.
getUserData
()!=""
&&
processRole
.
getUserData
()!=""
>
<
#
assign
assignGroupCond=
assignGroupCond+"|"+processRole.getUserData()+"|"+processRole.getUserData2()
>
</
#
if>
</
#
if>
<
#
else
>
<
#
if
processRole
.
getUDField
()??
&&
processRole
.
getUDField
()!=""
>
<
#
if
assignCond
!=""
>
<
#
assign
assignCond=
assignCond+","
>
</
#
if>
<
#
assign
assignCond=
assignCond+"$"+"{activedata."+(processRole.getUDField()?lower_case)+"}"
>
</
#
if>
</
#
if>
</
#
list>
</
#
if>
<
#
if
assignGroupCond
!=""
>
<
#
if
assignCond
!=""
>
<
#
assign
assignCond=
assignCond+","
>
</
#
if>
<
#
assign
assignCond=
assignCond+"$"+"{wfCoreService.getGroupUsers('"+assignGroupCond+"',execution)}"
>
</
#
if>
<userTask
flowable:category=
"${businessKey}"
flowable:candidateUsers=
"${assignCond}"
flowable:exclusive=
"true"
id=
"tid-${WFProcess.getWFStepValue()}-${WFProcess.getDeployId()}"
name=
"${WFProcess.getName()}"
<#
if
WFProcess
.
getWFProcessType
()??
&&
(
WFProcess
.
getWFProcessType
()=="
CALLORGACTIVITY
"
||
WFProcess
.
getWFProcessType
()=="
EMBED
")
>
flowable:formKey="${WFProcess.getWFProcessType()}"
</
#
if>
>
<
#
comment
>
标记子流程节点
</
#
comment>
<documentation>
${majortext}
</documentation>
<
#
if
(
((
WFProcess
.
getPSSysMsgTempl
())!'')!=''
)
||
((
WFProcess
.
getFormCodeName
())!'')!=''
||
((
WFProcess
.
getMobFormCodeName
())!'')!=''
>
<extensionElements>
<
#
if
(
((
WFProcess
.
getPSSysMsgTempl
())!'')!=''
)
>
<
#
assign
msgTempl=
WFProcess.getPSSysMsgTempl()
>
<flowable:formProperty
id=
"${msgTempl.getCodeName()?lower_case}"
name=
"${msgTempl.getName()}"
variable=
"${assignGroupCond}"
type=
"${WFProcess.getMsgType()}"
/>
</
#
if>
<
#
if
((
WFProcess
.
getFormCodeName
())!'')!=''
||
((
WFProcess
.
getMobFormCodeName
())!'')!=''
>
<flowable:form
<#
if
((
WFProcess
.
getFormCodeName
())!'')!=''
>
process-form="${WFProcess.getFormCodeName()}"
</
#
if><
#
if
((
WFProcess
.
getMobFormCodeName
())!'')!=''
>
process-mobform="${WFProcess.getMobFormCodeName()}"
</
#
if>
/>
</
#
if>
</extensionElements>
</
#
if>
<
#
comment
>
多实例节点
</
#
comment>
<
#
if
WFProcess
.
getMultiInstMode
??
&&
WFProcess
.
getMultiInstMode
()??
&&
(
WFProcess
.
getMultiInstMode
()=='
PARALLEL
'
||
WFProcess
.
getMultiInstMode
()=='
SEQUENTIAL
')
>
<multiInstanceLoopCharacteristics
flowable:collection=
"candidateUsersList"
flowable:elementVariable=
"candidateUsers"
${
isSequential
}
>
<completionCondition>
<![CDATA[${nrOfCompletedInstances/nrOfInstances == 1}]]>
</completionCondition>
</multiInstanceLoopCharacteristics>
</
#
if>
</userTask>
</
#
if>
</
#
list>
</
#
if>
<
#
comment
>
绘制节点连线
</
#
comment>
<
#
if
item
.
getPSWFLinks
??
&&
item
.
getPSWFLinks
()??
>
<
#
list
item
.
getPSWFLinks
()
as
WFLink
>
<
#
assign
sourceProcessId=
""
>
<
#
assign
targetProcessId=
""
>
<
#
assign
sourceProcess=
WFLink.getFromPSWFProcess()
>
<
#
assign
targetProcess=
WFLink.getToPSWFProcess()
>
<
#
assign
sourceProcessId=
"sid-"
+
sourceProcess
.
getDeployId
()
>
<
#
if
sourceProcess
.
getWFProcessType
()=='
INTERACTIVE
'
>
<
#
assign
sourceProcessId=
"tid-"
+
sourceProcess
.
getWFStepValue
()+"
-
"+
sourceProcess
.
getDeployId
()
>
</
#
if>
<
#
assign
targetProcessId=
"sid-"
+
targetProcess
.
getDeployId
()
>
<
#
if
targetProcess
.
getWFProcessType
()=='
INTERACTIVE
'
>
<
#
assign
targetProcessId=
"tid-"
+
targetProcess
.
getWFStepValue
()+"
-
"+
targetProcess
.
getDeployId
()
>
</
#
if>
<
#
assign
sourceProcessCodeName=
WFLink.getFromPSWFProcess().getCodeName()
>
<
#
assign
flowId=
"rid-"
+
WFLink
.
getDeployId
()
>
<
#
if
WFLink
.
getWFLinkType
()!='
ROUTE
'
>
<
#
assign
flowId=
"lid-"
+
WFLink
.
getName
()+"
-
"+
WFLink
.
getDeployId
()
>
</
#
if>
<
#
assign
flowTag=
WFLink.getName()
>
<sequenceFlow
id=
"${flowId}"
sourceRef=
"${sourceProcessId}"
targetRef=
"${targetProcessId}"
name=
"${WFLink.getLogicName()}"
>
<
#
if
sourceProcessCodeName
!="
Start001
"
><
#
comment
>
连接线含有条件
</
#
comment>
<
#
assign
LinkCond=
""
>
<
#
assign
strGroupCond=
""
>
<
#
if
WFLink
.
getWFLinkType
()=='
ROUTE
'
>
<
#
if
WFLink
.
getCustomCond
??
&&
WFLink
.
getCustomCond
()??
>
<
#
assign
LinkCond=
WFLink.getCustomCond()
>
<
#
elseif
WFLink
.
getPSWFLinkGroupCond
??
&&
WFLink
.
getPSWFLinkGroupCond
()??
>
<
#
assign
WFLinkCond=
WFLink.getPSWFLinkGroupCond()
>
<
#
assign
strGroupCond=
getGroupCond(WFLinkCond)
>
<
#
assign
strGroupCond=
"$\{"
+
strGroupCond
+"}
"
>
<
#
assign
LinkCond=
"<![CDATA["
+
strGroupCond
+"]]
>
">
</
#
if>
<
#
else
>
<
#
assign
LinkCond=
"<![CDATA[$\{sequenceFlowId==\"
"+
flowId
+"\"}]]
>
">
</
#
if>
<
#
if
LinkCond
!=""
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
${LinkCond}
</conditionExpression>
</
#
if>
</
#
if>
<
#
if
((
WFLink
.
getFormCodeName
())!'')!=''
||
((
WFLink
.
getMobFormCodeName
())!'')!=''
||
((
WFLink
.
getViewCodeName
())!'')!=''
||
((
WFLink
.
getMobViewCodeName
())!'')!=''
>
<extensionElements>
<flowable:form
<#
if
((
WFLink
.
getFormCodeName
())!'')!=''
>
sequenceFlowForm="${WFLink.getFormCodeName()}"
</
#
if><
#
if
((
WFLink
.
getMobFormCodeName
())!'')!=''
>
sequenceFlowMobForm="${WFLink.getMobFormCodeName()}"
</
#
if><
#
if
((
WFLink
.
getViewCodeName
())!'')!=''
>
sequenceFlowView="${WFLink.getViewCodeName()}"
</
#
if><
#
if
((
WFLink
.
getMobViewCodeName
())!'')!=''
>
sequenceFlowMobView="${WFLink.getMobViewCodeName()}"
</
#
if>
/>
</extensionElements>
</
#
if>
</sequenceFlow>
</
#
list>
</
#
if>
</process>
<
#
comment
>
下面定义图形位置
</
#
comment>
<bpmndi:BPMNDiagram
id=
"BPMNDiagram_${sys.getCodeName()?lower_case}-${item.codeName?lower_case}"
>
<bpmndi:BPMNPlane
id=
"BPMNPlane_${sys.getCodeName()?lower_case}-${item.codeName?lower_case}"
bpmnElement=
"${sys.getCodeName()?lower_case}-${item.codeName?lower_case}"
>
<
#
comment
>
绘制处理节点
</
#
comment>
<
#
if
item
.
getPSWFProcesses
??
&&
item
.
getPSWFProcesses
()??
>
<
#
list
item
.
getPSWFProcesses
()
as
WFProcess
>
<
#
assign
sourceProcessId=
"sid-"
+
WFProcess
.
getDeployId
()
>
<
#
if
WFProcess
.
getWFProcessType
()=='
INTERACTIVE
'
>
<
#
assign
sourceProcessId=
"tid-"
+
WFProcess
.
getWFStepValue
()+"
-
"+
WFProcess
.
getDeployId
()
>
</
#
if>
<bpmndi:BPMNShape
id=
"BPMNShape-${WFProcess.getDeployId()}"
bpmnElement=
"${sourceProcessId}"
>
<omgdi:Bounds
x=
"${WFProcess.getLeftPos()?c}"
y=
"${WFProcess.getTopPos()?c}"
width=
"${WFProcess.getWidth()?c}"
height=
"${WFProcess.getHeight()?c}"
/>
</bpmndi:BPMNShape>
</
#
list>
</
#
if>
<
#
comment
>
绘制节点连线
</
#
comment>
<
#
if
item
.
getPSWFLinks
??
&&
item
.
getPSWFLinks
()??
>
<
#
list
item
.
getPSWFLinks
()
as
WFLink
>
<
#
assign
flowId=
"rid-"
+
WFLink
.
getDeployId
()
>
<
#
if
WFLink
.
getWFLinkType
()!='
ROUTE
'
>
<
#
assign
flowId=
"lid-"
+
WFLink
.
getName
()+"
-
"+
WFLink
.
getDeployId
()
>
</
#
if>
<bpmndi:BPMNEdge
id=
"BPMNEdge-${flowId}"
bpmnElement=
"${flowId}"
>
<omgdi:waypoint
x=
"0"
y=
"0"
/>
<omgdi:waypoint
x=
"0"
y=
"0"
/>
</bpmndi:BPMNEdge>
</
#
list>
</
#
if>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
<
#
comment
>
获取组合条件表达式
</
#
comment>
<
#
function
getGroupCond
WFLinkCond
>
<
#
assign
strRuleCond=
"("
>
<
#
if
WFLinkCond
.
getPSWFLinkConds
()??
&&
WFLinkCond
.
getPSWFLinkConds
()??
><
#
comment
>
判断是否有组条件
</
#
comment>
<
#
assign
conn=
WFLinkCond.getGroupOP()?replace("AND","&&")?replace("OR","||")
>
<
#
list
WFLinkCond
.
getPSWFLinkConds
()
as
childWFLinkCond
><
#
comment
>
组条件,递归
</
#
comment>
<
#
assign
childLinkType =
childWFLinkCond.getCondType()
>
<
#
if
(
childWFLinkCond
.
getPSWFLinkConds
??
&&
childWFLinkCond
.
getPSWFLinkConds
()??
)
||
childLinkType=
='GROUP'
>
<
#
assign
strRuleCond=
strRuleCond+getGroupCond(childWFLinkCond)
>
//getGroupCond
<
#
else
>
<
#
assign
strRuleCond=
strRuleCond+getFieldCond(childWFLinkCond)
>
//getFieldCond
</
#
if>
<
#
if
childWFLinkCond_has_next
>
<
#
assign
strRuleCond=
strRuleCond+conn
>
//拼接连接符
</
#
if>
</
#
list>
<
#
else
>
</
#
if>
<
#
assign
strRuleCond=
strRuleCond+")"
>
<
#
return
strRuleCond
/>
</
#
function>
<
#
comment
>
获取单项条件表达式
</
#
comment>
<
#
function
getFieldCond
WFLinkCond
>
<
#
assign
fieldCond=
"("
>
<
#
assign
condBody=
""
>
<
#
assign
paramType=
((WFLinkCond.getParamType())!'')
><
#
comment
>
参数类型
</
#
comment>
<
#
assign
targetField=
WFLinkCond.getFieldName()
><
#
comment
>
目标属性
</
#
comment>
<
#
assign
targetDBValueOP=
WFLinkCond.getCondOP()
><
#
comment
>
表达式
</
#
comment>
<
#
assign
targetValue=
WFLinkCond.getParamValue()
><
#
comment
>
值项
</
#
comment>
<
#
if
targetField
??
>
<
#
assign
targetField=
targetField?lower_case
>
<
#
--
<#
assign
strTargetDBValueOP=
targetDBValueOP?replace("ISNOTNULL","!=
null
")?
replace
("
ISNULL
","==
null
")?
replace
("
AND
","&&")?
replace
("
OR
","||")?
replace
("
GT
&&
EQ
","
>
=")?replace("LT
&&
EQ","
<
=")?
replace
("
NOTEQ
","!=")?
replace
("
EQ
","==")?
replace
("
GT
","
>
")?replace("LT","
<
")
>
-->
<
#
if
targetDBValueOP=
="ISNULL"
||
targetDBValueOP=
="ISNOTNULL"
>
<
#
assign
condBody=
"wfCoreService.test(activedata."
+
targetField
+",
'"+
targetDBValueOP
+"',
null
)"
>
<
#
elseif
paramType
??&&
paramType=
='ENTITYFIELD'
>
<
#
if
targetValue
??&&
targetValue
!=""
>
<
#
assign
condBody=
"wfCoreService.test(activedata."
+
targetField
+",
'"+
targetDBValueOP
+"',
activedata
."+
targetValue
?
lower_case
+")"
>
<
#
else
>
<
#
assign
condBody=
"wfCoreService.test(activedata."
+
targetField
+",
'"+
targetDBValueOP
+"',
null
)"
>
</
#
if>
<
#
elseif
paramType
??&&
paramType=
='CURTIME'
>
<
#
assign
condBody=
"wfCoreService.test(activedata."
+
targetField
+",
'"+
targetDBValueOP
+"',
wfCoreService
.
getnow
())"
>
<
#
else
>
<
#
if
targetValue
??&&
targetValue
!=""
>
<
#
assign
condBody=
"wfCoreService.test(activedata."
+
targetField
+",
'"+
targetDBValueOP
+"',
'"+
targetValue
?
replace
("\"","")?
replace
("‘","")?
replace
("“","")?
replace
("”","")+"')"
>
<
#
else
>
<
#
assign
condBody=
"wfCoreService.test(activedata."
+
targetField
+",
'"+
targetDBValueOP
+"',
null
)"
>
</
#
if>
</
#
if>
</
#
if>
<
#
assign
fieldCond=
fieldCond+condBody
>
<
#
assign
fieldCond=
fieldCond+")"
>
<
#
return
fieldCond
/>
</
#
function>
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/resources/application.yml.hbs
浏览文件 @
e74fb898
...
...
@@ -2,4 +2,4 @@ spring:
profiles:
include: sys ,nacos,
{{
lowerCase
api
.
codeName
}}
-prod
application:
name:
{{
project
Name
}}
-
{{
lowerCase
api
.
codeName
}}
name:
{{
lowerCase
system
.
code
Name
}}
-
{{
lowerCase
api
.
codeName
}}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录