fuchanghai commented on code in PR #15277:
URL:
https://github.com/apache/dolphinscheduler/pull/15277#discussion_r1421765653
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/subworkflow/SubWorkflowLogicTask.java:
##########
@@ -133,6 +147,43 @@ public void kill() {
}
}
+ @Override
+ public List<Property> getVarPool() {
+ List<Property> taskInstanceProps = getTaskParameters().getVarPool();
+ ProcessInstanceMap processInstanceMap =
processInstanceMapDao.queryWorkProcessMapByParent(
+ taskExecutionContext.getProcessInstanceId(),
taskExecutionContext.getTaskInstanceId());
+ ProcessInstance childProcessInstance =
processInstanceDao.queryById(processInstanceMap.getProcessInstanceId());
+ if (!StringUtils.isBlank(childProcessInstance.getVarPool())) {
Review Comment:
<img width="1126" alt="image"
src="https://github.com/apache/dolphinscheduler/assets/33984497/e61c87af-e168-4959-850c-942a5d0586fe">
hi @ruanwenjun If it is empty, it will be returned in the last line of the
method。
Maybe it would be more readable if you wrote it the way you did?
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/subworkflow/SubWorkflowLogicTask.java:
##########
@@ -133,6 +147,43 @@ public void kill() {
}
}
+ @Override
+ public List<Property> getVarPool() {
+ List<Property> taskInstanceProps = getTaskParameters().getVarPool();
+ ProcessInstanceMap processInstanceMap =
processInstanceMapDao.queryWorkProcessMapByParent(
+ taskExecutionContext.getProcessInstanceId(),
taskExecutionContext.getTaskInstanceId());
+ ProcessInstance childProcessInstance =
processInstanceDao.queryById(processInstanceMap.getProcessInstanceId());
+ if (!StringUtils.isBlank(childProcessInstance.getVarPool())) {
Review Comment:
<img width="1126" alt="image"
src="https://github.com/apache/dolphinscheduler/assets/33984497/e61c87af-e168-4959-850c-942a5d0586fe">
hi @ruanwenjun If it is empty, it will be returned in the last line of the
method。
Maybe it would be more readable if you wrote it the way you did?
--
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]