apache/dolphinscheduler · error · IllegalArgumentException

The execType should be START_PROCESS

Error message

The execType should be START_PROCESS

What it means

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.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/validator/workflow/TriggerWorkflowDTOValidator.java:47

@Slf4j
@Component
public class TriggerWorkflowDTOValidator implements IValidator<TriggerWorkflowDTO> {

    private final TenantExistValidator tenantExistValidator;

    private final StartParamListValidator startParamListValidator;

    public TriggerWorkflowDTOValidator(TenantExistValidator tenantExistValidator,
                                       StartParamListValidator startParamListValidator) {
        this.tenantExistValidator = tenantExistValidator;
        this.startParamListValidator = startParamListValidator;
    }

    @Override
    public void validate(final TriggerWorkflowDTO triggerWorkflowDTO) {
        if (triggerWorkflowDTO.getExecType() != CommandType.START_PROCESS) {
            throw new IllegalArgumentException("The execType should be START_PROCESS");
        }
        if (triggerWorkflowDTO.getWorkflowDefinition() == null) {
            throw new IllegalArgumentException("The workflowDefinition should not be null");
        }
        if (triggerWorkflowDTO.getWorkflowDefinition().getReleaseState() != ReleaseState.ONLINE) {
            throw new IllegalStateException("The workflowDefinition should be online");
        }

        tenantExistValidator.validate(triggerWorkflowDTO.getTenantCode());

        startParamListValidator.validate(triggerWorkflowDTO.getStartParamList());
    }
}

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Set execType to CommandType.START_PROCESS in the trigger request.
  2. If you intended a complement/backfill run, call the backfill API (which requires COMPLEMENT_DATA) instead.
  3. Fix client/SDK defaults for the trigger endpoint to START_PROCESS.
  4. Validate execType client-side before submission with a clear error message.

Example fix

// before
dto.setExecType(CommandType.COMPLEMENT_DATA); // used trigger endpoint
// after
dto.setExecType(CommandType.START_PROCESS); // required by TriggerWorkflowDTOValidator
Defensive patterns

Strategy: validation

Validate before calling

if (dto.execType !== 'START_PROCESS') {
  throw new Error('Trigger requires execType START_PROCESS');
}

Type guard

function isTriggerExecType(dto) {
  return dto?.execType === 'START_PROCESS';
}

Try / catch

try {
  trigger(dto);
} catch (IllegalArgumentException e) {
  if (e.getMessage().contains("execType should be START_PROCESS")) {
    // set START_PROCESS or switch to the backfill endpoint
  }
}

Prevention

When it happens

Trigger: Calling the trigger-workflow API with a TriggerWorkflowDTO whose execType is COMPLEMENT_DATA, SCHEDULER, RECOVERY_WAITING_THREAD, or anything other than START_PROCESS.

Common situations: 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.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/c725b6d304852050. Report an issue: GitHub.