{"record":{"id":"c725b6d304852050","repo":"apache/dolphinscheduler","slug":"the-exectype-should-be-start-process-c725b6","errorCode":null,"errorMessage":"The execType should be START_PROCESS","messagePattern":"The execType should be START_PROCESS","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/validator/workflow/TriggerWorkflowDTOValidator.java","lineNumber":47,"sourceCode":"\n@Slf4j\n@Component\npublic class TriggerWorkflowDTOValidator implements IValidator<TriggerWorkflowDTO> {\n\n    private final TenantExistValidator tenantExistValidator;\n\n    private final StartParamListValidator startParamListValidator;\n\n    public TriggerWorkflowDTOValidator(TenantExistValidator tenantExistValidator,\n                                       StartParamListValidator startParamListValidator) {\n        this.tenantExistValidator = tenantExistValidator;\n        this.startParamListValidator = startParamListValidator;\n    }\n\n    @Override\n    public void validate(final TriggerWorkflowDTO triggerWorkflowDTO) {\n        if (triggerWorkflowDTO.getExecType() != CommandType.START_PROCESS) {\n            throw new IllegalArgumentException(\"The execType should be START_PROCESS\");\n        }\n        if (triggerWorkflowDTO.getWorkflowDefinition() == null) {\n            throw new IllegalArgumentException(\"The workflowDefinition should not be null\");\n        }\n        if (triggerWorkflowDTO.getWorkflowDefinition().getReleaseState() != ReleaseState.ONLINE) {\n            throw new IllegalStateException(\"The workflowDefinition should be online\");\n        }\n\n        tenantExistValidator.validate(triggerWorkflowDTO.getTenantCode());\n\n        startParamListValidator.validate(triggerWorkflowDTO.getStartParamList());\n    }\n}\n","sourceCodeStart":29,"sourceCodeEnd":61,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/validator/workflow/TriggerWorkflowDTOValidator.java#L29-L61","documentation":"TriggerWorkflowDTOValidator.validate checks that a manual trigger request carries execType == CommandType.START_PROCESS. Any other execution type makes the validator throw IllegalArgumentException('The execType should be START_PROCESS'). Manual triggering is only valid as a plain START_PROCESS run; complement/scheduler types belong to other endpoints.","triggerScenarios":"Calling the trigger-workflow API with a TriggerWorkflowDTO whose execType is COMPLEMENT_DATA, SCHEDULER, RECOVERY_WAITING_THREAD, or anything other than START_PROCESS.","commonSituations":"Reusing a backfill/complement payload on the trigger endpoint (mirror of error 474); SDK defaulting execType to COMPLEMENT_DATA; copy-pasted request from a backfill example; legacy clients using old command types.","solutions":["Set execType to CommandType.START_PROCESS in the trigger request.","If you intended a complement/backfill run, call the backfill API (which requires COMPLEMENT_DATA) instead.","Fix client/SDK defaults for the trigger endpoint to START_PROCESS.","Validate execType client-side before submission with a clear error message."],"exampleFix":"// before\ndto.setExecType(CommandType.COMPLEMENT_DATA); // used trigger endpoint\n// after\ndto.setExecType(CommandType.START_PROCESS); // required by TriggerWorkflowDTOValidator","handlingStrategy":"validation","validationCode":"if (dto.execType !== 'START_PROCESS') {\n  throw new Error('Trigger requires execType START_PROCESS');\n}","typeGuard":"function isTriggerExecType(dto) {\n  return dto?.execType === 'START_PROCESS';\n}","tryCatchPattern":"try {\n  trigger(dto);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"execType should be START_PROCESS\")) {\n    // set START_PROCESS or switch to the backfill endpoint\n  }\n}","preventionTips":["Use a dedicated trigger wrapper that sets START_PROCESS by default.","Separate request types for trigger vs backfill to prevent payload reuse.","Show execType in request logs to spot wrong-endpoint mistakes.","Keep SDK command-type enums aligned with the server."],"tags":["trigger","exec-type","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}