Commit da8154ed by tiger

增加节点执行日志

1 parent 0f8cf67d
...@@ -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;
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!