zhongjiajie commented on code in PR #14099:
URL: 
https://github.com/apache/dolphinscheduler/pull/14099#discussion_r1193255795


##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/expand/CuringGlobalParams.java:
##########
@@ -49,6 +46,8 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.*;

Review Comment:
   The wildcard import is not allowed in dolphinscheduler source code



##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/expand/CuringGlobalParams.java:
##########
@@ -155,16 +154,20 @@ public Map<String, Property> 
paramParsingPreparation(@NonNull TaskInstance taskI
         // of the process instance complement
         Map<String, String> cmdParam = 
JSONUtils.toMap(processInstance.getCommandParam());
         String timeZone = cmdParam.get(Constants.SCHEDULE_TIMEZONE);
-        Map<String, String> params = 
BusinessTimeUtils.getBusinessTime(commandType, scheduleTime, timeZone);
-
-        if (MapUtils.isNotEmpty(globalParamsMap)) {
-            params.putAll(globalParamsMap);
-        }
 
+        // build-in params

Review Comment:
   Since we have many build param than before, can we separate to new private 
method to handle the build-in param?



##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskConstants.java:
##########
@@ -187,6 +188,25 @@ private TaskConstants() {
      */
     public static final String PARAMETER_TASK_INSTANCE_ID = 
"system.task.instance.id";
 
+    /**
+     * the definition name of current task
+     */
+    public static final String PARAMETER_TASK_DEFINITION_NAME = 
"system.task.definition.name";
+
+    /**
+     * the instance id of the process to which current task belongs
+     */
+    public static final String PARAMETER_PROCESS_INSTANCE_ID = 
"system.process.instance.id";

Review Comment:
   how about use `workflow` as keyword instead of `process`? because our web ui 
use workflow.



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