Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-process-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 554f2b9e
authored
Sep 15, 2023
by
tiger
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
node job
1 parent
d467741e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/core/SopXxlJobUtil.java
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/impl/SopInstNodeExecuteJobHandler.java
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/param/SopInstNodeParam.java
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/core/SopXxlJobUtil.java
View file @
554f2b9
...
...
@@ -132,6 +132,7 @@ public class SopXxlJobUtil {
SopInstNodeParam
params
=
new
SopInstNodeParam
();
params
.
setInstNodeId
(
node
.
getInstNodeId
());
params
.
setPreIds
(
linkPair
.
getKey
());
params
.
setNextIds
(
linkPair
.
getValue
());
String
paramJson
=
JSONUtil
.
toJsonStr
(
params
);
// 重建job
...
...
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/impl/SopInstNodeExecuteJobHandler.java
View file @
554f2b9
...
...
@@ -8,8 +8,10 @@ import com.xxl.job.core.context.XxlJobHelper;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
cn.com.glsx.process.job.xxljob.core.SopXxlJobUtil
;
import
cn.com.glsx.process.job.xxljob.param.SopInstNodeParam
;
import
cn.com.glsx.process.modules.model.SopStruct
;
import
cn.com.glsx.process.modules.service.SopService
;
import
cn.hutool.json.JSONUtil
;
import
lombok.extern.slf4j.Slf4j
;
@Slf4j
...
...
@@ -21,11 +23,14 @@ public class SopInstNodeExecuteJobHandler {
private
SopService
sopService
;
@XxlJob
(
SopXxlJobUtil
.
SOP_NODE_EXECUTE_JOB_ID
)
public
void
handler
(
String
param
)
throws
Exception
{
param
=
XxlJobHelper
.
getJobParam
();
public
void
handler
(
String
param1
)
throws
Exception
{
String
json
=
XxlJobHelper
.
getJobParam
();
SopInstNodeParam
param
=
JSONUtil
.
toBean
(
json
,
SopInstNodeParam
.
class
);
SopXxlJobUtil
.
log
(
log
,
"【执行Sop节点】{}"
,
param
);
String
instId
=
param
;
SopStruct
sop
=
sopService
.
loadSop
(
instId
);
SopStruct
sop
=
sopService
.
loadSopByInstNodeId
(
param
.
getInstNodeId
());
// TODO 执行sop里面的instNodeId节点。
// 创建所有节点任务
// SopXxlJobUtil.initSopNodeJob(sop);
...
...
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/param/SopInstNodeParam.java
View file @
554f2b9
...
...
@@ -18,4 +18,7 @@ public class SopInstNodeParam {
/** 已完成的前置节点,当所有前置节点已完成时,触发本任务 */
private
Set
<
Integer
>
finishedIds
=
Sets
.
newHashSet
();
/** 实例节点后置节点id,本节点任务完成时触发后续节点 */
private
Set
<
Integer
>
nextIds
=
Sets
.
newHashSet
();
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment