wangxj3 commented on a change in pull request #8522:
URL: https://github.com/apache/dolphinscheduler/pull/8522#discussion_r837128888



##########
File path: 
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/SubTaskProcessor.java
##########
@@ -110,9 +119,35 @@ private void updateTaskState() {
         if (subProcessInstance != null && 
subProcessInstance.getState().typeIsFinished()) {
             taskInstance.setState(subProcessInstance.getState());
             taskInstance.setEndTime(new Date());
+            dealFinish();
             processService.saveTaskInstance(taskInstance);
         }
     }
+    private void dealFinish() {
+        String thisTaskInstanceVarPool = taskInstance.getVarPool();
+        if (StringUtils.isNotEmpty(thisTaskInstanceVarPool)) {
+            String subProcessInstanceVarPool = subProcessInstance.getVarPool();
+            if (StringUtils.isNotEmpty(subProcessInstanceVarPool)) {
+                List<Property> varPoolProperties = 
JSONUtils.toList(thisTaskInstanceVarPool, Property.class);
+                Map<String, Object> taskParams = 
JSONUtils.parseObject(taskInstance.getTaskParams(), new 
TypeReference<Map<String, Object>>() {
+                });
+                Object localParams = taskParams.get(LOCAL_PARAMS);

Review comment:
       the globalParam is a static param for the instance ,so i don't think 
it's should be handled here.




-- 
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]


Reply via email to