Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
42bc5585
提交
42bc5585
编写于
1月 19, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
9da88fea
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
31 行增加
和
22 行删除
+31
-22
ModelStorage.java
.../src/main/java/cn/ibizlab/codegen/model/ModelStorage.java
+1
-0
SystemModel.java
...e/src/main/java/cn/ibizlab/codegen/model/SystemModel.java
+1
-1
WorkflowModel.java
...src/main/java/cn/ibizlab/codegen/model/WorkflowModel.java
+20
-12
{{workflows}}.bpmn.hbs
...}-core/src/main/resources/workflow/{{workflows}}.bpmn.hbs
+9
-9
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/ModelStorage.java
浏览文件 @
42bc5585
...
...
@@ -144,6 +144,7 @@ public class ModelStorage {
}
else
if
(
type
.
equals
(
TemplateFileType
.
workflow
))
{
getSystemModel
().
getWorkflows
().
forEach
(
item
->
{
CliOption
opt
=
newCliOption
(
TemplateFileType
.
workflow
)
.
baseData
(
item
,
item
.
getCodeName
().
toString
());
rt
.
addOption
(
opt
);
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/SystemModel.java
浏览文件 @
42bc5585
...
...
@@ -128,7 +128,7 @@ public class SystemModel extends BaseModel {
workflowsMap
=
new
LinkedHashMap
<>();
getSystem
().
getAllPSWorkflows
().
forEach
(
workflow
->
{
workflow
.
getPSWFVersions
().
forEach
(
workflowVersion
->
{
workflowsMap
.
put
(
workflowVersion
.
getCodeName
(),
new
WorkflowModel
(
this
,
workflowVersion
));
workflowsMap
.
put
(
workflowVersion
.
getCodeName
(),
new
WorkflowModel
(
this
,
workflow
,
workflow
Version
));
});
});
}
catch
(
Exception
e
)
{
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/WorkflowModel.java
浏览文件 @
42bc5585
...
...
@@ -22,10 +22,11 @@ import java.util.*;
@Accessors
(
chain
=
true
)
public
class
WorkflowModel
extends
BaseModel
{
public
WorkflowModel
(
SystemModel
systemModel
,
IPSWFVersion
ver
)
public
WorkflowModel
(
SystemModel
systemModel
,
IPSW
orkflow
psWorkflow
,
IPSW
FVersion
ver
)
{
this
.
opt
=
ver
;
this
.
system
=
systemModel
;
this
.
psWorkflow
=
psWorkflow
;
this
.
setCodeName
(
ver
.
getCodeName
());
this
.
setName
(
ver
.
getName
());
this
.
setId
(
String
.
format
(
"%1$s-%2$s"
,
system
.
getCodeName
().
toLowerCase
(),
ver
.
getCodeName
().
toLowerCase
()));
...
...
@@ -37,6 +38,9 @@ public class WorkflowModel extends BaseModel{
return
(
IPSWFVersion
)
opt
;
}
private
IPSWorkflow
psWorkflow
;
private
SystemModel
system
;
private
Map
<
String
,
IPSWFProcessRole
>
refGroups
;
...
...
@@ -78,13 +82,15 @@ public class WorkflowModel extends BaseModel{
private
Map
<
String
,
EntityModel
>
bookings
;
public
Map
<
String
,
EntityModel
>
getBookings
()
{
if
(
get
WFVer
().
getPSWorkflow
()!=
null
&&
getWFVer
().
getPS
Workflow
().
getPSWFDEs
()!=
null
)
if
(
get
PsWorkflow
()!=
null
&&
getPs
Workflow
().
getPSWFDEs
()!=
null
)
{
if
(
bookings
==
null
)
{
bookings
=
new
LinkedHashMap
<>();
getWFVer
().
getPSWorkflow
().
getPSWFDEs
().
forEach
(
de
->{
bookings
.
put
(
de
.
getCodeName
(),
getSystem
().
getEntity
(
de
.
getCodeName
()));
getPsWorkflow
().
getPSWFDEs
().
forEach
(
de
->{
if
(
de
.
getPSDataEntity
()==
null
)
return
;
bookings
.
put
(
de
.
getPSDataEntity
().
getCodeName
(),
getSystem
().
getEntity
(
de
.
getPSDataEntity
().
getCodeName
()));
});
}
}
...
...
@@ -177,17 +183,19 @@ public class WorkflowModel extends BaseModel{
map
.
put
(
"process"
,
WFProcess
);
List
<
IPSWFProcessRole
>
roles
=
null
;
List
<
String
>
formParam
=
new
ArrayList
<>();
boolean
multiInstanceLoopCharacteristics
=
false
;
if
(
WFProcess
instanceof
IPSWFInteractiveProcess
)
{
IPSWFInteractiveProcess
interactiveProcess
=(
IPSWFInteractiveProcess
)
WFProcess
;
if
(
"SEQUENTIAL"
.
equalsIgnoreCase
(
interactiveProcess
.
getMultiInstMode
()))
{
map
.
put
(
"sequential"
,
true
);
m
ap
.
put
(
"multiInstanceLoopCharacteristics"
,
true
)
;
m
ultiInstanceLoopCharacteristics
=
true
;
}
else
if
(
"PARALLEL"
.
equalsIgnoreCase
(
interactiveProcess
.
getMultiInstMode
()))
{
map
.
put
(
"sequential"
,
false
);
m
ap
.
put
(
"multiInstanceLoopCharacteristics"
,
true
)
;
m
ultiInstanceLoopCharacteristics
=
true
;
}
map
.
put
(
"multiInstanceLoopCharacteristics"
,
multiInstanceLoopCharacteristics
);
roles
=
interactiveProcess
.
getPSWFProcessRoles
();
map
.
put
(
"hasForm"
,(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getFormCodeName
()))||(!
StringUtils
.
isEmpty
(
interactiveProcess
.
getMobFormCodeName
())));
...
...
@@ -291,7 +299,7 @@ public class WorkflowModel extends BaseModel{
if
(!
ObjectUtils
.
isEmpty
(
assignUtCond
))
map
.
put
(
"assignUtCond"
,
String
.
join
(
"|"
,
assignUtCond
));
}
if
(
formParam
.
size
()>
0
&&
map
.
containsKey
(
"assignUtCond"
))
{
if
(
multiInstanceLoopCharacteristics
&&
formParam
.
size
()>
0
&&
map
.
containsKey
(
"assignUtCond"
))
{
formParam
.
add
(
"candidateUsersList=\""
+
map
.
get
(
"assignUtCond"
)+
"\" "
);
}
}
...
...
@@ -386,11 +394,11 @@ public class WorkflowModel extends BaseModel{
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
;
flowId
=
"lid-"
+
WFLink
.
getName
(
)+
"-"
+
linkDeployId
;
map
.
put
(
sourceProcessId
,
sourceProcessId
);
map
.
put
(
targetProcessId
,
targetProcessId
);
map
.
put
(
flowId
,
flowId
);
map
.
put
(
"sourceProcessId"
,
sourceProcessId
);
map
.
put
(
"targetProcessId"
,
targetProcessId
);
map
.
put
(
"flowId"
,
flowId
);
List
<
String
>
linkParam
=
new
ArrayList
<>();
if
(
WFLink
instanceof
PSWFInteractiveLinkImpl
)
{
...
...
@@ -410,7 +418,7 @@ public class WorkflowModel extends BaseModel{
}
if
(
linkParam
.
size
()>
0
)
map
.
put
(
"linkParam"
,
linkParam
);
if
(
"TIMEOUT"
.
equalsIgnoreCase
(
WFLink
.
getWFLinkType
()))
if
(
!
"TIMEOUT"
.
equalsIgnoreCase
(
WFLink
.
getWFLinkType
()))
{
if
(!
"Start001"
.
equalsIgnoreCase
(
sourceProcess
.
getCodeName
()))
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/resources/workflow/{{workflows}}.bpmn.hbs
浏览文件 @
42bc5585
...
...
@@ -44,12 +44,10 @@
<flowable:string>
{{
lowerCase
wfde
.
uDStatePSDEField
.
codeName
}}
</flowable:string>
</flowable:field>
{{/if}}
{{#if
workflow
.
psWorkflow
.
entityWFStates
}}
{{#
neq
workflow
.
psWorkflow
.
entityWFStates
""
}}
{{#if
workflow
.
psWorkflow
.
entityWFState
}}
<flowable:field
name=
"udstateingval_
{{
pluralize
wfde
.
psDataEntity
.
codeName
}}
"
>
<flowable:string>
{{
workflow
.
psWorkflow
.
entityWFState
s
}}
</flowable:string>
<flowable:string>
{{
workflow
.
psWorkflow
.
entityWFState
}}
</flowable:string>
</flowable:field>
{{/
neq
}}
{{/if}}
{{#if
workflow
.
psWorkflow
.
entityWFFinishState
}}
{{#
neq
workflow
.
psWorkflow
.
entityWFFinishState
""
}}
...
...
@@ -80,13 +78,15 @@
<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>
{{/
each
}}
{{#
each
workflow
.
bookings
as
|
booking
|
}}
{{#if
booking
.
orgField
}}
<flowable:field
name=
"orgfield_
{{
pluralize
booking
.
codeName
}}
"
>
<flowable:string>
{{
lowerCase
booking
.
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
}}
<flowable:field
name=
"isvalid"
><flowable:string>
{{#if
workflow
.
valid
}}
1
{{else}}
0
{{/if}}
</flowable:string></flowable:field>
</extensionElements>
{{#if
workflow
.
psWFProcesses
}}
{{#
each
workflow
.
psWFProcesses
as
|
WFProcess
|
}}
...
...
@@ -182,7 +182,7 @@
{{#
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>
<conditionExpression
xsi:type=
"tFormalExpression"
>
{{
sequenceFlow
.
linkCond
}}
</conditionExpression>
{{/if}}
{{#if
sequenceFlow
.
linkParam
}}
<extensionElements>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录