Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邬友楠
test
Commits
6f25be13
Commit
6f25be13
authored
Oct 09, 2020
by
雍欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
如果流程实例存在回退/打回的情况的话会存在多个申请节点,这时我们按照申请任务创建时间排序并取第一申请任务作为申请节点
parent
1b886516
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
FlowBroker.java
...ou-uasp/src/main/java/com/huigou/uasp/bpm/FlowBroker.java
+10
-7
No files found.
huigou-uasp/src/main/java/com/huigou/uasp/bpm/FlowBroker.java
View file @
6f25be13
...
...
@@ -760,14 +760,17 @@ public class FlowBroker extends BaseApplication implements TaskListener, Executi
ThreadLocalUtil
.
putVariable
(
Constants
.
MAKEACOPYFORPREFIX
,
"办结提醒:"
);
List
<
String
>
executorIds
=
new
ArrayList
<>(
1
);
executorIds
.
add
(
applicantFullId
);
// 查找流程申请节点
HistoricTaskInstance
applyTask
=
delegateExecution
.
getEngineServices
().
getHistoryService
().
createHistoricTaskInstanceQuery
()
// 查找流程申请节点,如果流程实例存在回退/打回的情况的话会存在多个申请节点,
// 这时我们按照申请任务创建时间排序并取第一申请任务作为申请节点
String
taskId
=
delegateExecution
.
getEngineServices
().
getHistoryService
().
createHistoricTaskInstanceQuery
()
.
processInstanceId
(
delegateExecution
.
getProcessInstanceId
())
.
taskDefinitionKey
(
"Apply"
)
.
singleResult
();
String
taskId
=
applyTask
!=
null
?
applyTask
.
getId
()
:
getApprovalParameter
().
getTaskId
();
.
orderByTaskCreateTime
().
asc
()
.
listPage
(
0
,
1
)
.
stream
()
.
map
(
HistoricTaskInstance:
:
getId
)
.
findAny
()
.
orElseGet
(()
->
getApprovalParameter
().
getTaskId
());
this
.
workflowService
.
makeACopyFor
(
taskId
,
executorIds
);
delegateExecution
.
setVariable
(
IS_MAKE_A_COPY_FOR
,
true
);
}
...
...
@@ -1160,7 +1163,7 @@ public class FlowBroker extends BaseApplication implements TaskListener, Executi
if
(
totalChiefHandlers
<
2
)
{
return
false
;
}
if
(
totalChiefHandlers
<=
limitHandler
)
{
if
(
totalChiefHandlers
<=
limitHandler
)
{
// 主审总人数须大于最少审批人数
return
false
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment