stalary commented on code in PR #10553:
URL: https://github.com/apache/dolphinscheduler/pull/10553#discussion_r909163254
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -2649,17 +2653,62 @@ public DAG<String, TaskNode, TaskNodeRelation>
genDagGraph(ProcessDefinition pro
return DagHelper.buildDagGraph(processDag);
}
+ private void genSubTaskData(List<ProcessTaskRelation> taskRelations,
List<TaskDefinitionLog> taskDefinitionLogList,
+ List<TaskDefinition> taskDefinitions,
List<TaskDefinition> curTaskDefinitions) {
+ List<TaskDefinition> copyList = new ArrayList<>(curTaskDefinitions);
+ for (TaskDefinition taskDefinition : copyList) {
+ if
(TaskConstants.TASK_TYPE_SUB_PROCESS.equals(taskDefinition.getTaskType())) {
+ JsonNode processDefinitionCode =
JSONUtils.parseObject(taskDefinition.getTaskParams())
+ .findValue("processDefinitionCode");
+ long subProcessId = processDefinitionCode.asLong();
+ ProcessDefinition subProcess =
processDefineMapper.queryByCode(subProcessId);
+ List<ProcessTaskRelation> subTaskRelations =
findRelationByCode(subProcess.getCode(), subProcess.getVersion());
+ // bind to subProcess
+ for (ProcessTaskRelation subTaskRelation : subTaskRelations) {
+ if (subTaskRelation.getPreTaskCode() == 0) {
+
subTaskRelation.setPreTaskCode(taskDefinition.getCode());
Review Comment:
Use to associate a downstream child task with a parent task.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]