You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "CallMeKingsley97 (via GitHub)" <gi...@apache.org> on 2023/07/20 09:24:48 UTC
[GitHub] [dolphinscheduler] CallMeKingsley97 commented on a diff in pull request #14606: [Fix-14566][master] Fix serial_wait command_params does not replace global_params
CallMeKingsley97 commented on code in PR #14606:
URL: https://github.com/apache/dolphinscheduler/pull/14606#discussion_r1269194338
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java:
##########
@@ -784,6 +785,16 @@ public void checkSerialProcess(ProcessDefinition processDefinition) {
return;
}
Map<String, Object> cmdParam = new HashMap<>();
+ // write the parameters of the nextProcessInstance to command
+ if (StringUtils.isNotEmpty(nextProcessInstance.getCommandParam())) {
+ Map<String, String> commandStartParamsMap = JSONUtils.toMap(nextProcessInstance.getCommandParam());
+ if (MapUtils.isNotEmpty(commandStartParamsMap)) {
+ Map<String, String> paramsMap = JSONUtils.toMap(commandStartParamsMap.get(CMD_PARAM_START_PARAMS));
+ if (MapUtils.isNotEmpty(paramsMap)) {
+ cmdParam.put(CMD_PARAM_START_PARAMS, JSONUtils.toJsonString(paramsMap));
+ }
+ }
+ }
Review Comment:
The next process instance to be awakened will create a new command, and The new command needs to keep the original "StartParams" fields
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org