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
a7aa4ce1
Commit
a7aa4ce1
authored
Jan 11, 2021
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开始工作流基于RunID开始,解决BUG,暂停工作流之后,再开始,内嵌节点还是暂停的BUG
parent
64a0bba8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+4
-2
RunRecordingMapper.java
...ore/src/main/java/com/byit/mapper/RunRecordingMapper.java
+1
-1
RunRecordingMapper.xml
...min-core/src/main/resources/mapper/RunRecordingMapper.xml
+1
-1
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
a7aa4ce1
...
@@ -1687,11 +1687,12 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -1687,11 +1687,12 @@ public class ApiFlowServiceImpl implements ApiFlowService {
String
[]
runIdList
=
runIds
.
split
(
","
);
String
[]
runIdList
=
runIds
.
split
(
","
);
for
(
String
runId
:
runIdList
)
{
for
(
String
runId
:
runIdList
)
{
List
<
RunRecording
>
runRecordList
=
runRecordingMapper
.
findStopRunCordByRunId
(
runId
,
flowName
);
List
<
RunRecording
>
runRecordList
=
runRecordingMapper
.
findStopRunCordByRunId
(
runId
);
ValidationUtil
.
isTrueValidation
(
CollectionUtil
.
isEmpty
(
runRecordList
),
"该工作流不是暂停状态!"
);
ValidationUtil
.
isTrueValidation
(
CollectionUtil
.
isEmpty
(
runRecordList
),
"该工作流不是暂停状态!"
);
RunRecording
mainRunRecording
=
runRecordList
.
stream
().
filter
(
runRecording
->
flowName
.
equals
(
runRecording
.
getFlowName
())).
findFirst
().
orElse
(
null
);
//RunRecording mainRunRecording = runRecordList.stream().filter(runRecording -> flowName.equals(runRecording.getFlowName())).findFirst().orElse(null);
runRecordList
.
forEach
(
mainRunRecording
->{
Integer
stopCount
;
Integer
stopCount
;
if
(
mainRunRecording
!=
null
)
{
if
(
mainRunRecording
!=
null
)
{
stopCount
=
mainRunRecording
.
getStopCount
();
stopCount
=
mainRunRecording
.
getStopCount
();
...
@@ -1704,6 +1705,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -1704,6 +1705,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
jobTaskMapper
.
startByRunIdAndFlowId
(
runId
,
mainRunRecording
.
getFlowId
());
jobTaskMapper
.
startByRunIdAndFlowId
(
runId
,
mainRunRecording
.
getFlowId
());
}
}
}
}
});
}
}
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/RunRecordingMapper.java
View file @
a7aa4ce1
...
@@ -198,7 +198,7 @@ public interface RunRecordingMapper {
...
@@ -198,7 +198,7 @@ public interface RunRecordingMapper {
* @param runId
* @param runId
* @return
* @return
*/
*/
List
<
RunRecording
>
findStopRunCordByRunId
(
@Param
(
"runId"
)
String
runId
,
@Param
(
"flowName"
)
String
flowName
);
List
<
RunRecording
>
findStopRunCordByRunId
(
@Param
(
"runId"
)
String
runId
);
/**
/**
* 根据runid和flowid杀死运行实例
* 根据runid和flowid杀死运行实例
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
a7aa4ce1
...
@@ -207,7 +207,7 @@
...
@@ -207,7 +207,7 @@
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from run_recording
from run_recording
where run_id = #{runId,jdbcType=VARCHAR} and flow_
name = #{flowName}
where run_id = #{runId,jdbcType=VARCHAR} and flow_
status = '3'
and schedule_type != 4
and schedule_type != 4
</select>
</select>
...
...
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