3333import org .apache .dolphinscheduler .api .service .UsersService ;
3434import org .apache .dolphinscheduler .api .service .WorkflowDefinitionService ;
3535import org .apache .dolphinscheduler .common .constants .Constants ;
36+ import org .apache .dolphinscheduler .common .enums .CommandType ;
3637import org .apache .dolphinscheduler .common .enums .ComplementDependentMode ;
3738import org .apache .dolphinscheduler .common .enums .ExecutionOrder ;
3839import org .apache .dolphinscheduler .common .enums .FailureStrategy ;
40+ import org .apache .dolphinscheduler .common .enums .Flag ;
3941import org .apache .dolphinscheduler .common .enums .Priority ;
4042import org .apache .dolphinscheduler .common .enums .ReleaseState ;
4143import org .apache .dolphinscheduler .common .enums .RunMode ;
@@ -370,11 +372,9 @@ private void createOrUpdateSchedule(User user,
370372 public void execWorkflowInstance (String userName ,
371373 String projectName ,
372374 String workflowName ,
373- String cronTime ,
374375 String workerGroup ,
375376 String warningType ,
376- Integer warningGroupId ,
377- Integer timeout ) {
377+ Integer warningGroupId ) {
378378 User user = usersService .queryUser (userName );
379379 Project project = projectMapper .queryByName (projectName );
380380 WorkflowDefinition workflowDefinition =
@@ -389,6 +389,10 @@ public void execWorkflowInstance(String userName,
389389 .workerGroup (workerGroup )
390390 .warningType (WarningType .of (warningType ))
391391 .warningGroupId (warningGroupId )
392+ .execType (CommandType .START_PROCESS )
393+ .taskDependType (TaskDependType .TASK_POST )
394+ .dryRun (Flag .NO )
395+ .testFlag (Flag .NO )
392396 .build ();
393397 executorService .triggerWorkflowDefinition (workflowTriggerRequest );
394398 }
0 commit comments