Commit 9c33bda5 by huangfusuper

java参数替换 命令日志信息更新

parent f169f30f
......@@ -45,6 +45,7 @@ import java.util.stream.Collectors;
public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
public static final String JAVA_TYPE = "java";
@Value("${server.port}")
private Integer serverPort;
......@@ -139,6 +140,17 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
//构建参数
node.setRunParam(JSON.toJSONString(runParamWrapped));
}
String runCommand = node.getRunCommand();
if(StringUtils.isNoneBlank(runCommand)){
if(runCommand.startsWith(JAVA_TYPE) && CollectionUtil.isNotEmpty(publicParam)){
publicParam.forEach((k,v) ->{
String keyName = String.format("${%s}",k);
runCommand.replace(keyName, v);
});
node.setRunCommand(runCommand);
}
}
});
}
if (CollectionUtil.isNotEmpty(nodeRelyDtoSet)) {
......
......@@ -269,6 +269,8 @@ public class ScriptExecutorJobTask implements TimerTask {
jobTaskRunLog.setRunType(RunTypeEnum.EXECUTIVE_MACHINE_RUN.getCode());
jobTaskRunLog.setJobType(mythJobTaskSchedule.getJobType());
jobTaskRunLog.setHandlerName(mythJobTaskSchedule.getHandlerName());
jobTaskRunLog.setRunCommand(mythJobTaskSchedule.getRunCommand());
jobTaskRunLog.setRunParams(mythJobTaskSchedule.getRunParam());
jobTaskRunLog.setTriggerTime(new Date());
String code = RunResultEnum.TRIGGER_SUCCESS.getCode();
//放置调度码 调度失败 那么执行肯定也失败
......
......@@ -45,7 +45,8 @@ public class JobUtils {
/**
* 根据运行标识查询工作流的状态
*/
private static final String FIND_RUNRECORDING_STATUS_BY_RUNID = "/api/find/runRecording/findRunRecordingStatusByRunId";/**
private static final String FIND_RUNRECORDING_STATUS_BY_RUNID = "/api/find/runRecording/findRunRecordingStatusByRunId";
/**
* 根据工作流名称和工作空间名称查询工作流的状态
*/
private static final String FIND_RUNRECORDING_STATUS_BY_FLOWNAME_AND_WORKSPACENAME = "/api/find/runRecording/findRunRecordingStatusByFlowNameAndWorkspaceName";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment