{"record":{"id":"bb390c826c4c61e0","repo":"apache/dolphinscheduler","slug":"dinky-task-params-is-not-valid","errorCode":null,"errorMessage":"dinky task params is not valid","messagePattern":"dinky task params is not valid","errorType":"validation","errorClass":"DinkyTaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-dinky/src/main/java/org/apache/dolphinscheduler/plugin/task/dinky/DinkyTask.java","lineNumber":85,"sourceCode":"    private String dinkyVersion;\n\n    protected DinkyTask(TaskExecutionContext taskExecutionContext) {\n        super(taskExecutionContext);\n        this.taskExecutionContext = taskExecutionContext;\n    }\n\n    @Override\n    public List<String> getApplicationIds() throws TaskException {\n        return Collections.emptyList();\n    }\n\n    @Override\n    public void init() {\n        final String taskParams = taskExecutionContext.getTaskParams();\n        this.dinkyParameters = JSONUtils.parseObject(taskParams, DinkyParameters.class);\n        log.info(\"Initialize dinky task params: {}\", JSONUtils.toPrettyJsonString(dinkyParameters));\n        if (this.dinkyParameters == null || !this.dinkyParameters.checkParameters()) {\n            throw new DinkyTaskException(\"dinky task params is not valid\");\n        }\n    }\n\n    @Override\n    public void handle(TaskCallBack taskCallBack) throws TaskException {\n        // Get dinky version\n        dinkyVersion = getDinkyVersion(this.dinkyParameters.getAddress());\n        super.handle(taskCallBack);\n    }\n\n    @Override\n    public void submitApplication() throws TaskException {\n        if (dinkyVersion.startsWith(\"0\")) {\n            submitApplicationV0();\n        } else {\n            submitApplicationV1();\n        }\n    }","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-dinky/src/main/java/org/apache/dolphinscheduler/plugin/task/dinky/DinkyTask.java#L67-L103","documentation":"DinkyTask.init() parses the task params JSON into DinkyParameters and validates them via checkParameters(). If parsing yields null (params null or malformed JSON) or checkParameters() fails (required fields like address or taskId missing/blank), a DinkyTaskException with 'dinky task params is not valid' is thrown before execution starts.","triggerScenarios":"Task params JSON missing, unparseable, or DinkyParameters.checkParameters() returning false — typically blank address or taskId in the Dinky task definition.","commonSituations":"Saving a Dinky task without filling the Dinky address or task id; upgrading DolphinScheduler so older param shapes no longer parse; hand-edited workflow JSON missing fields.","solutions":["Open the Dinky task in the UI and set both the Dinky address (URL) and the Dinky task id.","Validate the taskParams JSON is well-formed and includes all fields checked by DinkyParameters.checkParameters().","Confirm the Dinky task plugin version matches your workflow definition schema.","Re-save and rerun the workflow after correcting params."],"exampleFix":"// before: incomplete params\n{\"localParams\":[],\"address\":\"\"}\n// after\n{\"localParams\":[],\"address\":\"http://dinky-host:8888\",\"taskId\":12}","handlingStrategy":"validation","validationCode":"DinkyParameters p = JSONUtils.parseObject(taskParams, DinkyParameters.class);\nboolean valid = p != null && p.checkParameters(); // address and taskId set","typeGuard":"boolean validDinkyParams(DinkyParameters p) {\n    return p != null && p.getAddress() != null && !p.getAddress().isEmpty() && p.getTaskId() != null;\n}","tryCatchPattern":"try {\n    task.init();\n} catch (DinkyTaskException e) {\n    log.error(\"Dinky params invalid: check address and taskId in task definition\");\n}","preventionTips":["Fill both Dinky address and task id in the UI form.","Lint workflow JSON after manual edits or version upgrades.","Keep Dinky plugin and workflow schema versions aligned."],"tags":["dinky","validation","missing-config"],"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"}