Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
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
liyuan
byit-myth-job
Commits
65b5ae9a
Commit
65b5ae9a
authored
Mar 12, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作流运行唯一判断
parent
6d08ed46
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
FlowThreadRunHelper.java
...main/java/com/byit/thread/helper/FlowThreadRunHelper.java
+11
-2
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/FlowThreadRunHelper.java
View file @
65b5ae9a
...
@@ -7,6 +7,7 @@ import com.byit.model.Node;
...
@@ -7,6 +7,7 @@ import com.byit.model.Node;
import
com.byit.service.FlowService
;
import
com.byit.service.FlowService
;
import
com.byit.service.NodeService
;
import
com.byit.service.NodeService
;
import
com.byit.service.RunNodeServer
;
import
com.byit.service.RunNodeServer
;
import
com.byit.service.RunRecordingService
;
import
com.byit.thread.BaseThreadRunHelper
;
import
com.byit.thread.BaseThreadRunHelper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -30,12 +31,15 @@ public class FlowThreadRunHelper extends BaseThreadRunHelper {
...
@@ -30,12 +31,15 @@ public class FlowThreadRunHelper extends BaseThreadRunHelper {
private
final
FlowService
flowService
;
private
final
FlowService
flowService
;
private
final
NodeService
nodeService
;
private
final
NodeService
nodeService
;
private
final
RunNodeServer
runNodeServer
;
private
final
RunNodeServer
runNodeServer
;
private
final
RunRecordingService
runRecordingService
;
public
FlowThreadRunHelper
(
DataSource
dataSource
,
FlowService
flowService
,
NodeService
nodeService
,
RunNodeServer
runNodeServer
)
{
public
FlowThreadRunHelper
(
DataSource
dataSource
,
FlowService
flowService
,
NodeService
nodeService
,
RunNodeServer
runNodeServer
,
RunRecordingService
runRecordingService
)
{
this
.
dataSource
=
dataSource
;
this
.
dataSource
=
dataSource
;
this
.
flowService
=
flowService
;
this
.
flowService
=
flowService
;
this
.
nodeService
=
nodeService
;
this
.
nodeService
=
nodeService
;
this
.
runNodeServer
=
runNodeServer
;
this
.
runNodeServer
=
runNodeServer
;
this
.
runRecordingService
=
runRecordingService
;
}
}
@Override
@Override
...
@@ -45,7 +49,12 @@ public class FlowThreadRunHelper extends BaseThreadRunHelper {
...
@@ -45,7 +49,12 @@ public class FlowThreadRunHelper extends BaseThreadRunHelper {
List
<
Flow
>
halfAnHourFlow
=
flowService
.
findHalfAnHourFlow
(
preTestTime
);
List
<
Flow
>
halfAnHourFlow
=
flowService
.
findHalfAnHourFlow
(
preTestTime
);
if
(
CollectionUtil
.
isNotEmpty
(
halfAnHourFlow
))
{
if
(
CollectionUtil
.
isNotEmpty
(
halfAnHourFlow
))
{
for
(
Flow
flow
:
halfAnHourFlow
){
for
(
Flow
flow
:
halfAnHourFlow
){
log
.
debug
(
"-----------------【工作流{}的执行次数大于0,放行】-------------------------"
,
flow
.
getFlowName
());
log
.
debug
(
"-----------------【工作流{}的执行次数不等于0,放行】-------------------------"
,
flow
.
getFlowName
());
if
(
runRecordingService
.
findRunRecordingIsRunning
(
flow
.
getFlowId
()))
{
//TODO 是否可以使用事件通知机制,由完结的工作流实例通知通过流可以运行了
log
.
info
(
"-----工作流{},有正在运行中的实例,跳过等待------"
,
flow
);
continue
;
}
//String versionName = flow.getVersionName()
//String versionName = flow.getVersionName()
Integer
flowId
=
flow
.
getFlowId
();
Integer
flowId
=
flow
.
getFlowId
();
//根据工作流查询工作流下所有的节点
//根据工作流查询工作流下所有的节点
...
...
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