You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "SbloodyS (via GitHub)" <gi...@apache.org> on 2023/07/18 04:08:03 UTC

[GitHub] [dolphinscheduler] SbloodyS commented on a diff in pull request #14552: [Feature-14545][Master][UI]Cross workflow parameter passing

SbloodyS commented on code in PR #14552:
URL: https://github.com/apache/dolphinscheduler/pull/14552#discussion_r1266185046


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThreadPool.java:
##########
@@ -182,6 +185,18 @@ private void notifyProcessChanged(ProcessInstance finishProcessInstance) {
         }
     }
 
+    private void crossWorkflowParameterPassing(ProcessInstance finishProcessInstance, TaskInstance taskInstance) {
+        try {
+            MasterTaskExecuteRunnable masterTaskExecuteRunnable =
+                    MasterTaskExecuteRunnableHolder.getMasterTaskExecuteRunnable(taskInstance.getId());
+            masterTaskExecuteRunnable.getILogicTask().getTaskParameters()
+                    .setVarPool(finishProcessInstance.getVarPool());
+            log.info("Cross workflow parameter passing success");
+        } catch (Exception ex) {
+            log.info("Cross workflow parameter passing error");

Review Comment:
   ```suggestion
               log.error("Cross workflow parameter passing error: {}", ex);
   ```



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThreadPool.java:
##########
@@ -182,6 +185,18 @@ private void notifyProcessChanged(ProcessInstance finishProcessInstance) {
         }
     }
 
+    private void crossWorkflowParameterPassing(ProcessInstance finishProcessInstance, TaskInstance taskInstance) {
+        try {
+            MasterTaskExecuteRunnable masterTaskExecuteRunnable =
+                    MasterTaskExecuteRunnableHolder.getMasterTaskExecuteRunnable(taskInstance.getId());
+            masterTaskExecuteRunnable.getILogicTask().getTaskParameters()
+                    .setVarPool(finishProcessInstance.getVarPool());
+            log.info("Cross workflow parameter passing success");

Review Comment:
   ```suggestion
               log.info("Cross workflow parameter passing success, processInstanceId: {}, taskInstanceId");
   ```
   
   It's best to add more effective information for troubleshooting purposes.



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