ruanwenjun commented on code in PR #12881:
URL: 
https://github.com/apache/dolphinscheduler/pull/12881#discussion_r1020895911


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java:
##########
@@ -235,36 +236,19 @@ public class WorkflowExecuteRunnable implements 
Callable<WorkflowSubmitStatue> {
 
     /**
      * @param processInstance         processInstance
-     * @param processService          processService
-     * @param processInstanceDao      processInstanceDao
-     * @param nettyExecutorManager    nettyExecutorManager
-     * @param processAlertManager     processAlertManager
-     * @param masterConfig            masterConfig
-     * @param stateWheelExecuteThread stateWheelExecuteThread
      */
-    public WorkflowExecuteRunnable(
-                                   @NonNull ProcessInstance processInstance,
-                                   @NonNull CommandService commandService,
-                                   @NonNull ProcessService processService,
-                                   @NonNull ProcessInstanceDao 
processInstanceDao,
-                                   @NonNull NettyExecutorManager 
nettyExecutorManager,
-                                   @NonNull ProcessAlertManager 
processAlertManager,
-                                   @NonNull MasterConfig masterConfig,
-                                   @NonNull StateWheelExecuteThread 
stateWheelExecuteThread,
-                                   @NonNull CuringParamsService 
curingParamsService,
-                                   @NonNull TaskInstanceDao taskInstanceDao,
-                                   @NonNull TaskDefinitionLogDao 
taskDefinitionLogDao) {
-        this.processService = processService;
-        this.commandService = commandService;
-        this.processInstanceDao = processInstanceDao;
+    public WorkflowExecuteRunnable(@NonNull ProcessInstance processInstance) {
+        this.processService = 
SpringApplicationContext.getBean(ProcessService.class);

Review Comment:
   This is not a good idea to do this change, `WorkflowExecuteRunnable` is not 
a spring bean, it shouldn't rely spring.



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