{"record":{"id":"4a8f82d77ec45c94","repo":"apache/dolphinscheduler","slug":"50020","errorCode":"50020","errorMessage":"workflow node {0} parameter invalid","messagePattern":"workflow node (.+?) parameter invalid","errorType":"validation","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowDefinitionServiceImpl.java","lineNumber":379,"sourceCode":"                log.error(\"Generate task definition list failed, the given taskDefinitionJson is invalided: {}\",\n                        taskDefinitionJson);\n                throw new ServiceException(Status.DATA_IS_NOT_VALID, taskDefinitionJson);\n            }\n\n            Set<String> taskNameSet = new HashSet<>();\n            for (TaskDefinitionLog taskDefinitionLog : taskDefinitionLogs) {\n                if (!taskNameSet.add(taskDefinitionLog.getName())) {\n                    log.error(\n                            \"Generate task definition list failed, the given task definition name is duplicate, taskName: {}, taskDefinition: {}\",\n                            taskDefinitionLog.getName(), taskDefinitionLog);\n                    throw new ServiceException(Status.TASK_NAME_DUPLICATE_ERROR, taskDefinitionLog.getName());\n                }\n\n                if (!checkTaskParameters(taskDefinitionLog.getTaskType(), taskDefinitionLog.getTaskParams())) {\n                    log.error(\n                            \"Generate task definition list failed, the given task definition parameter is invalided, taskName: {}, taskDefinition: {}\",\n                            taskDefinitionLog.getName(), taskDefinitionLog);\n                    throw new ServiceException(Status.WORKFLOW_NODE_S_PARAMETER_INVALID, taskDefinitionLog.getName());\n                }\n            }\n            return taskDefinitionLogs;\n        } catch (ServiceException ex) {\n            throw ex;\n        } catch (Exception e) {\n            log.error(\"Generate task definition list failed, meet an unknown exception\", e);\n            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR);\n        }\n    }\n\n    private List<WorkflowTaskRelationLog> generateTaskRelationList(String taskRelationJson,\n                                                                   List<TaskDefinitionLog> taskDefinitionLogs) {\n        try {\n            List<WorkflowTaskRelationLog> taskRelationList =\n                    JSONUtils.toList(taskRelationJson, WorkflowTaskRelationLog.class);\n            if (CollectionUtils.isEmpty(taskRelationList)) {\n                log.error(\"Generate task relation list failed the taskRelation list is empty, taskRelationJson: {}\",","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowDefinitionServiceImpl.java#L361-L397","documentation":"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.","triggerScenarios":"updateWorkflowDefinition/importWorkflowDefinition with a task whose taskParams is missing required keys, has wrong-typed values, or whose taskType has no registered parameter checker.","commonSituations":"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).","solutions":["Log the failing task name from the exception message and check its taskParams against the task type's documented parameter schema","Open the workflow in the UI designer and re-save the task so the UI fills/validates required params","Verify the taskType string is correct and supported in this DolphinScheduler version","Check plugin jar availability if using a custom task type"],"exampleFix":"// before\n{\"name\":\"sql1\",\"taskType\":\"SQL\",\"taskParams\":{\"sql\":\"select 1\"}}\n// after\n{\"name\":\"sql1\",\"taskType\":\"SQL\",\"taskParams\":{\"type\":\"MYSQL\",\"datasource\":1,\"sql\":\"select 1\",\"preStatements\":[],\"postStatements\":[]}}","handlingStrategy":"validation","validationCode":"for (TaskDefinitionLog d : defs) { if (!TaskPluginManager.checkTaskParameters(d.getTaskType(), d.getTaskParams())) throw new IllegalArgumentException(\"invalid params for \" + d.getName()); }","typeGuard":null,"tryCatchPattern":"try { ... } catch (ServiceException e) { if (e.getCode() == 50020) { /* inspect task named in e.getMessage() and fix taskParams */ } }","preventionTips":["Match params to the task type's documented schema","Re-save tasks through the UI so required params are filled","After upgrades, re-validate all task params against new schemas"],"tags":["api","validation","parameters","dolphinscheduler"],"backgroundTag":"schema-validation-failed","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}