Browse Source

fix bug-6208 json parse error in sub process (#6211)

2.0.7-release
OS 3 years ago committed by GitHub
parent
commit
8694b9c8f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
  2. 13
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/TaskNode.java

1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java

@ -755,6 +755,7 @@ public final class Constants {
public static final String PARENT_WORKFLOW_INSTANCE = "parentWorkflowInstance"; public static final String PARENT_WORKFLOW_INSTANCE = "parentWorkflowInstance";
public static final String CONDITION_RESULT = "conditionResult"; public static final String CONDITION_RESULT = "conditionResult";
public static final String SWITCH_RESULT = "switchResult"; public static final String SWITCH_RESULT = "switchResult";
public static final String WAIT_START_TIMEOUT = "waitStartTimeout";
public static final String DEPENDENCE = "dependence"; public static final String DEPENDENCE = "dependence";
public static final String TASK_TYPE = "taskType"; public static final String TASK_TYPE = "taskType";
public static final String TASK_LIST = "taskList"; public static final String TASK_LIST = "taskList";

13
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/TaskNode.java

@ -134,6 +134,10 @@ public class TaskNode {
@JsonSerialize(using = JSONUtils.JsonDataSerializer.class) @JsonSerialize(using = JSONUtils.JsonDataSerializer.class)
private String switchResult; private String switchResult;
@JsonDeserialize(using = JSONUtils.JsonDataDeserializer.class)
@JsonSerialize(using = JSONUtils.JsonDataSerializer.class)
private String waitStartTimeout;
/** /**
* task instance priority * task instance priority
*/ */
@ -396,6 +400,7 @@ public class TaskNode {
taskParams.put(Constants.CONDITION_RESULT, this.conditionResult); taskParams.put(Constants.CONDITION_RESULT, this.conditionResult);
taskParams.put(Constants.DEPENDENCE, this.dependence); taskParams.put(Constants.DEPENDENCE, this.dependence);
taskParams.put(Constants.SWITCH_RESULT, this.switchResult); taskParams.put(Constants.SWITCH_RESULT, this.switchResult);
taskParams.put(Constants.WAIT_START_TIMEOUT, this.waitStartTimeout);
return JSONUtils.toJsonString(taskParams); return JSONUtils.toJsonString(taskParams);
} }
@ -450,4 +455,12 @@ public class TaskNode {
public void setSwitchResult(String switchResult) { public void setSwitchResult(String switchResult) {
this.switchResult = switchResult; this.switchResult = switchResult;
} }
public String getWaitStartTimeout() {
return this.waitStartTimeout;
}
public void setWaitStartTimeout(String waitStartTimeout) {
this.waitStartTimeout = waitStartTimeout;
}
} }

Loading…
Cancel
Save