{"record":{"id":"40b02acc367b8a0a","repo":"apache/dolphinscheduler","slug":"workflow-node-s-parameter-invalid","errorCode":"WORKFLOW_NODE_S_PARAMETER_INVALID","errorMessage":"WORKFLOW_NODE_S_PARAMETER_INVALID: workflow node {0} parameter is invalid","messagePattern":"WORKFLOW_NODE_S_PARAMETER_INVALID: workflow node (.+?) parameter is invalid","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowDefinitionServiceImpl.java","lineNumber":961,"sourceCode":"                    JSONUtils.toList(workflowTaskRelationJson, WorkflowTaskRelation.class);\n            // Check whether the task node is normal\n            List<TaskNode> taskNodes = processService.transformTask(taskRelationList, taskDefinitionLogsList);\n\n            if (CollectionUtils.isEmpty(taskNodes)) {\n                log.error(\"Task node data is empty.\");\n                throw new ServiceException(Status.WORKFLOW_DAG_IS_EMPTY);\n            }\n\n            // check has cycle\n            if (graphHasCycle(taskNodes)) {\n                log.error(\"workflow DAG has cycle.\");\n                throw new ServiceException(Status.WORKFLOW_NODE_HAS_CYCLE);\n            }\n\n            // check whether the workflow definition json is normal\n            for (TaskNode taskNode : taskNodes) {\n                if (!checkTaskParameters(taskNode.getType(), taskNode.getParams())) {\n                    throw new ServiceException(Status.WORKFLOW_NODE_S_PARAMETER_INVALID, taskNode.getName());\n                }\n\n                // check extra params\n                CheckUtils.checkOtherParams(taskNode.getExtras());\n            }\n        } catch (ServiceException e) {\n            throw e;\n        } catch (Exception e) {\n            log.error(Status.INTERNAL_SERVER_ERROR_ARGS.getMsg(), e);\n            throw new ServiceException(Status.INTERNAL_SERVER_ERROR_ARGS, e.getMessage());\n        }\n    }\n\n    /**\n     * get task node details based on workflow definition\n     *\n     * @param loginUser   loginUser\n     * @param projectCode project code","sourceCodeStart":943,"sourceCodeEnd":979,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowDefinitionServiceImpl.java#L943-L979","documentation":"Thrown by checkWorkflowJsonValidation when checkTaskParameters rejects a task node's params: the task type's parameter object fails TaskParametersUtils/parameter validation (missing required fields, wrong types, malformed JSON). The message names the offending node via {0}.","triggerScenarios":"Saving/updating a workflow where any task node has invalid localParams/params — e.g. a SHELL task with null rawScript, a DEPENDENT task with bad dependence JSON, or an unknown/unsupported taskType string.","commonSituations":"Hand-crafted workflow JSON with typo'd or missing param fields; UI version mismatch producing params the backend's task plugin doesn't recognize; importing workflows from a newer DolphinScheduler version whose task types/param schema don't exist on this server.","solutions":["Read the message to get the failing node name, then fix that node's params/localParams to match the required schema for its taskType.","Check taskType is registered on this server version (install matching task plugins or change the type).","Re-create the task in the UI designer so params are generated by the supported form.","If importing across versions, upgrade the target DolphinScheduler to match the export version."],"exampleFix":"// before\nparams.put(\"rawScript\", null); // SHELL task with no script\n// after\nparams.put(\"rawScript\", \"echo hello\");","handlingStrategy":"validation","validationCode":"for (TaskDefinitionLog t : taskDefinitionList) {\n    AbstractTaskParameters p = TaskParametersUtils.getParameters(t.getTaskType(), t.getTaskParams());\n    if (p == null) throw new IllegalArgumentException(\"unknown taskType \" + t.getTaskType());\n    try { p.checkParameters(); } catch (Exception ex) {\n        throw new IllegalArgumentException(\"invalid params for node \" + t.getName()); }\n}","typeGuard":"boolean taskParamsValid(TaskDefinitionLog t) {\n  AbstractTaskParameters p = TaskParametersUtils.getParameters(t.getTaskType(), t.getTaskParams());\n  return p != null && p.checkParameters();\n}","tryCatchPattern":"try {\n    saveWorkflow(json);\n} catch (ServiceException e) {\n    if (e.getCode() == Status.WORKFLOW_NODE_S_PARAMETER_INVALID.getCode()) {\n        String badNode = e.getMessage(); // fix this node's params\n    } else throw e;\n}","preventionTips":["Generate task params from the server-matching UI version, not hand-written JSON","Keep exporter and importer on the same DolphinScheduler version","Install task plugins for every taskType your workflows use before importing"],"tags":["workflow-definition","parameter-validation","task-node"],"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"}