apache/dolphinscheduler · error · ServiceException

50020

50020

Error message

workflow node {0} parameter invalid

What it means

Thrown when a task definition in taskDefinitionJson has taskParams that fail validation for its declared taskType. checkTaskParameters delegates to the task plugin's parameter checker, so the params do not conform to that task type's schema.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowDefinitionServiceImpl.java:379

                log.error("Generate task definition list failed, the given taskDefinitionJson is invalided: {}",
                        taskDefinitionJson);
                throw new ServiceException(Status.DATA_IS_NOT_VALID, taskDefinitionJson);
            }

            Set<String> taskNameSet = new HashSet<>();
            for (TaskDefinitionLog taskDefinitionLog : taskDefinitionLogs) {
                if (!taskNameSet.add(taskDefinitionLog.getName())) {
                    log.error(
                            "Generate task definition list failed, the given task definition name is duplicate, taskName: {}, taskDefinition: {}",
                            taskDefinitionLog.getName(), taskDefinitionLog);
                    throw new ServiceException(Status.TASK_NAME_DUPLICATE_ERROR, taskDefinitionLog.getName());
                }

                if (!checkTaskParameters(taskDefinitionLog.getTaskType(), taskDefinitionLog.getTaskParams())) {
                    log.error(
                            "Generate task definition list failed, the given task definition parameter is invalided, taskName: {}, taskDefinition: {}",
                            taskDefinitionLog.getName(), taskDefinitionLog);
                    throw new ServiceException(Status.WORKFLOW_NODE_S_PARAMETER_INVALID, taskDefinitionLog.getName());
                }
            }
            return taskDefinitionLogs;
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception e) {
            log.error("Generate task definition list failed, meet an unknown exception", e);
            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR);
        }
    }

    private List<WorkflowTaskRelationLog> generateTaskRelationList(String taskRelationJson,
                                                                   List<TaskDefinitionLog> taskDefinitionLogs) {
        try {
            List<WorkflowTaskRelationLog> taskRelationList =
                    JSONUtils.toList(taskRelationJson, WorkflowTaskRelationLog.class);
            if (CollectionUtils.isEmpty(taskRelationList)) {
                log.error("Generate task relation list failed the taskRelation list is empty, taskRelationJson: {}",

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Log the failing task name from the exception message and check its taskParams against the task type's documented parameter schema
  2. Open the workflow in the UI designer and re-save the task so the UI fills/validates required params
  3. Verify the taskType string is correct and supported in this DolphinScheduler version
  4. Check plugin jar availability if using a custom task type

Example fix

// before
{"name":"sql1","taskType":"SQL","taskParams":{"sql":"select 1"}}
// after
{"name":"sql1","taskType":"SQL","taskParams":{"type":"MYSQL","datasource":1,"sql":"select 1","preStatements":[],"postStatements":[]}}
Defensive patterns

Strategy: validation

Validate before calling

for (TaskDefinitionLog d : defs) { if (!TaskPluginManager.checkTaskParameters(d.getTaskType(), d.getTaskParams())) throw new IllegalArgumentException("invalid params for " + d.getName()); }

Try / catch

try { ... } catch (ServiceException e) { if (e.getCode() == 50020) { /* inspect task named in e.getMessage() and fix taskParams */ } }

Prevention

When it happens

Trigger: updateWorkflowDefinition/importWorkflowDefinition with a task whose taskParams is missing required keys, has wrong-typed values, or whose taskType has no registered parameter checker.

Common situations: Hand-editing taskParams and typo-ing a required field; upgrading DolphinScheduler where a task type's parameter schema changed; copy-pasting params between different task types (e.g. Shell params into SQL task).

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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