apache/dolphinscheduler · error · ServiceException

WORKFLOW_NODE_S_PARAMETER_INVALID

WORKFLOW_NODE_S_PARAMETER_INVALID

Error message

WORKFLOW_NODE_S_PARAMETER_INVALID: workflow node {0} parameter is invalid

What it means

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}.

Source

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

                    JSONUtils.toList(workflowTaskRelationJson, WorkflowTaskRelation.class);
            // Check whether the task node is normal
            List<TaskNode> taskNodes = processService.transformTask(taskRelationList, taskDefinitionLogsList);

            if (CollectionUtils.isEmpty(taskNodes)) {
                log.error("Task node data is empty.");
                throw new ServiceException(Status.WORKFLOW_DAG_IS_EMPTY);
            }

            // check has cycle
            if (graphHasCycle(taskNodes)) {
                log.error("workflow DAG has cycle.");
                throw new ServiceException(Status.WORKFLOW_NODE_HAS_CYCLE);
            }

            // check whether the workflow definition json is normal
            for (TaskNode taskNode : taskNodes) {
                if (!checkTaskParameters(taskNode.getType(), taskNode.getParams())) {
                    throw new ServiceException(Status.WORKFLOW_NODE_S_PARAMETER_INVALID, taskNode.getName());
                }

                // check extra params
                CheckUtils.checkOtherParams(taskNode.getExtras());
            }
        } catch (ServiceException e) {
            throw e;
        } catch (Exception e) {
            log.error(Status.INTERNAL_SERVER_ERROR_ARGS.getMsg(), e);
            throw new ServiceException(Status.INTERNAL_SERVER_ERROR_ARGS, e.getMessage());
        }
    }

    /**
     * get task node details based on workflow definition
     *
     * @param loginUser   loginUser
     * @param projectCode project code

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Read the message to get the failing node name, then fix that node's params/localParams to match the required schema for its taskType.
  2. Check taskType is registered on this server version (install matching task plugins or change the type).
  3. Re-create the task in the UI designer so params are generated by the supported form.
  4. If importing across versions, upgrade the target DolphinScheduler to match the export version.

Example fix

// before
params.put("rawScript", null); // SHELL task with no script
// after
params.put("rawScript", "echo hello");
Defensive patterns

Strategy: validation

Validate before calling

for (TaskDefinitionLog t : taskDefinitionList) {
    AbstractTaskParameters p = TaskParametersUtils.getParameters(t.getTaskType(), t.getTaskParams());
    if (p == null) throw new IllegalArgumentException("unknown taskType " + t.getTaskType());
    try { p.checkParameters(); } catch (Exception ex) {
        throw new IllegalArgumentException("invalid params for node " + t.getName()); }
}

Type guard

boolean taskParamsValid(TaskDefinitionLog t) {
  AbstractTaskParameters p = TaskParametersUtils.getParameters(t.getTaskType(), t.getTaskParams());
  return p != null && p.checkParameters();
}

Try / catch

try {
    saveWorkflow(json);
} catch (ServiceException e) {
    if (e.getCode() == Status.WORKFLOW_NODE_S_PARAMETER_INVALID.getCode()) {
        String badNode = e.getMessage(); // fix this node's params
    } else throw e;
}

Prevention

When it happens

Trigger: 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.

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

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/40b02acc367b8a0a. Report an issue: GitHub.