Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
f2367874
提交
f2367874
编写于
3月 15, 2021
作者:
tangyaolong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
push
上级
e8479c03
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
50 行增加
和
12 行删除
+50
-12
WFCoreService.java
...izlab/core/workflow/extensions/service/WFCoreService.java
+50
-12
未找到文件。
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/extensions/service/WFCoreService.java
浏览文件 @
f2367874
...
...
@@ -16,6 +16,7 @@ import cn.ibizlab.util.service.RemoteService;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.databind.node.ObjectNode
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.flowable.bpmn.BpmnAutoLayout
;
import
org.flowable.bpmn.converter.BpmnXMLConverter
;
import
org.flowable.bpmn.model.*
;
...
...
@@ -520,6 +521,7 @@ public class WFCoreService
if
(
list
.
size
()==
0
)
return
taskWays
;
Task
task
=
list
.
get
(
0
);
LinkedHashMap
activeData
=
(
LinkedHashMap
)
runtimeService
.
getVariable
(
task
.
getExecutionId
(),
"activedata"
);
if
((!
StringUtils
.
isEmpty
(
task
.
getProcessDefinitionId
()))&&(!
StringUtils
.
isEmpty
(
task
.
getTaskDefinitionKey
())))
{
UserTask
userTask
=
wfModelService
.
getModelStepById
(
task
.
getProcessDefinitionId
()).
get
(
task
.
getTaskDefinitionKey
());
//设置流程表单
...
...
@@ -537,7 +539,42 @@ public class WFCoreService
way
.
setProcessinstancebusinesskey
(
processInstanceBusinessKey
);
//设置流程交互表单
setTaskWayForm
(
sequenceFlow
,
way
);
taskWays
.
add
(
way
);
String
userIds
=
""
;
String
activeIds
=
""
;
//过滤权限不足的用户
// String roles = (String) way.get("roles");
// String activeForm = (String) way.get("activeData");
String
roles
=
null
;
String
activeForm
=
null
;
String
[]
both
=
new
String
[]{};
if
(
activeForm
!=
null
){
String
[]
temp
=
activeForm
.
split
(
","
);
int
iMax
=
temp
.
length
-
1
;
for
(
int
i
=
0
;
i
<
temp
.
length
;
i
++){
if
(
iMax
==
-
1
){
break
;
}
Object
key
=
activeData
.
get
(
temp
[
i
]);
if
(!
ObjectUtils
.
isEmpty
(
key
))
{
activeIds
+=
key
;
if
(
i
==
iMax
)
{
break
;
}
activeIds
+=
","
;
}
}
if
(
activeIds
.
endsWith
(
","
)){
activeIds
=
activeIds
.
substring
(
0
,
activeIds
.
lastIndexOf
(
","
));
}
}
both
=
(
String
[])
ArrayUtils
.
addAll
(
both
,
activeIds
.
split
(
","
));
userIds
=
getGroupUsers
(
roles
,
null
);
both
=
(
String
[])
ArrayUtils
.
addAll
(
both
,
userIds
.
split
(
","
));
if
(
Arrays
.
asList
(
both
).
contains
(
userId
)
||
(
roles
==
null
&&
activeForm
==
null
)){
taskWays
.
add
(
way
);
}
}
}
}
...
...
@@ -1235,16 +1272,21 @@ public class WFCoreService
}
else
{
Object
activedata
=
delegateExecution
.
getVariable
(
"activedata"
);
if
(
activedata
!=
null
&&
activedata
instanceof
Map
)
{
Map
entity
=
(
Map
)
activedata
;
if
(
entity
.
get
(
userData2
)!=
null
)
userData2
=
entity
.
get
(
userData2
).
toString
();
if
(
delegateExecution
==
null
)
{
userData2
=
""
;
}
else
{
Object
activedata
=
delegateExecution
.
getVariable
(
"activedata"
);
if
(
activedata
!=
null
&&
activedata
instanceof
Map
)
{
Map
entity
=
(
Map
)
activedata
;
if
(
entity
.
get
(
userData2
)!=
null
)
userData2
=
entity
.
get
(
userData2
).
toString
();
else
userData2
=
""
;
}
else
userData2
=
""
;
}
else
userData2
=
""
;
}
if
(!
StringUtils
.
isEmpty
(
userData2
))
{
...
...
@@ -1254,10 +1296,6 @@ public class WFCoreService
orgid
=
userData2
;
}
}
WFGroup
group
=
iwfGroupService
.
get
(
groupId
);
List
<
WFMember
>
list
=
group
.
getWfmember
();
if
(
list
!=
null
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录