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 da8154ed
authored
Sep 22, 2023
by
tiger
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加节点执行日志
1 parent
0f8cf67d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/SopNodeExecutor.java
platform-process/src/main/java/cn/com/glsx/process/modules/sop/execute/SopNodeExecutor.java
View file @
da8154e
...
@@ -19,6 +19,7 @@ package cn.com.glsx.process.modules.sop.execute;
...
@@ -19,6 +19,7 @@ package cn.com.glsx.process.modules.sop.execute;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
cn.com.glsx.process.job.xxljob.core.SopXxlJobUtil
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.model.SopStruct
;
import
cn.com.glsx.process.modules.model.SopStruct
;
import
cn.com.glsx.process.util.FreemarkerUtil
;
import
cn.com.glsx.process.util.FreemarkerUtil
;
...
@@ -52,6 +53,8 @@ public interface SopNodeExecutor {
...
@@ -52,6 +53,8 @@ public interface SopNodeExecutor {
es
.
getInitMap
().
put
(
"instId"
,
sop
.
getInst
().
getInstId
());
es
.
getInitMap
().
put
(
"instId"
,
sop
.
getInst
().
getInstId
());
SopXxlJobUtil
.
log
(
log
,
"【{}】Sop任务节点,初始化参数:{}"
,
node
.
getNodeName
(),
JacksonUtils
.
nodefaultMapper
.
toJson
(
es
.
getInitMap
()));
// 当前节点需要的参数
// 当前节点需要的参数
if
(
StrUtil
.
isNotEmpty
(
node
.
getNodeParam
()))
{
if
(
StrUtil
.
isNotEmpty
(
node
.
getNodeParam
()))
{
// 节点入参按freemarker语法替换
// 节点入参按freemarker语法替换
...
@@ -65,6 +68,8 @@ public interface SopNodeExecutor {
...
@@ -65,6 +68,8 @@ public interface SopNodeExecutor {
}
}
}
}
SopXxlJobUtil
.
log
(
log
,
"【{}】Sop任务节点,节点参数:{}"
,
node
.
getNodeName
(),
JacksonUtils
.
nodefaultMapper
.
toJson
(
es
.
getParamMap
()));
return
es
;
return
es
;
}
}
...
@@ -88,6 +93,9 @@ public interface SopNodeExecutor {
...
@@ -88,6 +93,9 @@ public interface SopNodeExecutor {
* @return
* @return
*/
*/
default
SnapshotStruct
handleResult
(
SopStruct
sop
,
SopInstNode
node
,
SnapshotStruct
es
,
Object
result
)
{
default
SnapshotStruct
handleResult
(
SopStruct
sop
,
SopInstNode
node
,
SnapshotStruct
es
,
Object
result
)
{
SopXxlJobUtil
.
log
(
log
,
"【{}】Sop任务节点,节点执行结果:{}"
,
node
.
getNodeName
(),
JacksonUtils
.
nodefaultMapper
.
toJson
(
result
));
if
(
result
==
null
)
{
if
(
result
==
null
)
{
return
es
;
return
es
;
}
}
...
@@ -98,6 +106,7 @@ public interface SopNodeExecutor {
...
@@ -98,6 +106,7 @@ public interface SopNodeExecutor {
}
else
{
}
else
{
log
.
warn
(
"【{}】nodeKey 为空!!!"
,
node
.
getInstId
()
+
"-"
+
node
.
getNodeId
());
log
.
warn
(
"【{}】nodeKey 为空!!!"
,
node
.
getInstId
()
+
"-"
+
node
.
getNodeId
());
}
}
return
es
;
return
es
;
}
}
}
}
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