{"record":{"id":"3b94cabbd2d8a29f","repo":"alibaba/spring-ai-alibaba","slug":"workflow-config-illegal","errorCode":"WORKFLOW_CONFIG_ILLEGAL","errorMessage":"Node【%s】have a configuration error：\n%s","messagePattern":"Node【(.+?)】have a configuration error：\n(.+?)","errorType":"error_code","errorClass":"BizException","httpStatus":null,"severity":"error","filePath":"spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/AppController.java","lineNumber":190,"sourceCode":"\t\t\tthrow new BizException(ErrorCode.MISSING_PARAMS.toError(\"appId\"));\n\t\t}\n\t\tApplication app = appService.getApp(appId);\n\t\tif (app.getType() == AppType.WORKFLOW) {\n\t\t\tApplicationVersion applicationVersion = appService.getAppVersion(appId, \"latest\");\n\t\t\tWorkflowConfig appOrchestraConfig = JsonUtils.fromJson(applicationVersion.getConfig(),\n\t\t\t\t\tWorkflowConfig.class);\n\t\t\tExecuteProcessor.CheckFlowParamResult checkFlowParamResult = workflowExecuteManager\n\t\t\t\t.checkWorkflowConfig(appOrchestraConfig);\n\t\t\tif (!checkFlowParamResult.isSuccess()) {\n\t\t\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\t\t\tcheckFlowParamResult.getCheckNodeParamResults()\n\t\t\t\t\t.forEach(nodeParamResult -> stringBuilder.append(\"Node【\")\n\t\t\t\t\t\t.append(nodeParamResult.getNodeName())\n\t\t\t\t\t\t.append(\"】\")\n\t\t\t\t\t\t.append(\"have a configuration error：\\n\")\n\t\t\t\t\t\t.append(String.join(\";\\n\", nodeParamResult.getErrorInfos()))\n\t\t\t\t\t\t.append(\"\\n\"));\n\t\t\t\tthrow new BizException(ErrorCode.WORKFLOW_CONFIG_ILLEGAL.toError(stringBuilder.toString()));\n\t\t\t}\n\t\t}\n\n\t\tappService.publishApp(appId);\n\t\treturn Result.success(context.getRequestId(), null);\n\t}\n\n\t/**\n\t * Lists application versions\n\t * @param appId Application ID\n\t * @param query Query parameters\n\t * @return Paginated list of versions\n\t */\n\t@GetMapping(\"/{appId}/versions\")\n\tpublic Result<PagingList<ApplicationVersion>> listAppVersions(@PathVariable(\"appId\") String appId,\n\t\t\t@ApiModelAttribute AppQuery query) {\n\n\t\tRequestContext context = RequestContextHolder.getRequestContext();","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/alibaba/spring-ai-alibaba/blob/f82da0b50f35744c13968191be2b1cd2452ef550/spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/AppController.java#L172-L208","documentation":"BizException with ErrorCode.WORKFLOW_CONFIG_ILLEGAL thrown by AppController.publishApp when one or more nodes in a WORKFLOW-type app fail pre-publish validation. The aggregated message lists each failing node (nodeParamResult.getNodeName()) and its error infos joined by ';\\n'. Publishing is blocked until all node configurations are valid.","triggerScenarios":"POST /api/apps/{appId}/publish on an app whose latest version's WorkflowConfig contains nodes with invalid/missing parameters — detected by the node parameter validation pass in publishApp.","commonSituations":"Editing a workflow in Studio and leaving required LLM node fields (model, prompt template variables, API keys) unset; node schema changes after a version upgrade invalidating older configs; manually edited config JSON with malformed node parameters.","solutions":["Read the message: it names each failing Node and its specific error infos; open the workflow in Studio/Admin and fix those nodes.","Fill required node parameters (model, inputs/outputs, prompt variables) shown in the error list, then republish.","If configs were hand-edited, re-export or re-create the node from the current schema to remove stale fields.","Publish a newer app version whose config passes validation instead of republishing a stale 'latest' version."],"exampleFix":"// before (workflow config)\n{\"nodes\":[{\"name\":\"llm-node\",\"params\":{\"model\":null}}]}\n// after\n{\"nodes\":[{\"name\":\"llm-node\",\"params\":{\"model\":\"qwen-max\",\"temperature\":0.7}}]}","handlingStrategy":"try-catch","validationCode":"Application app = api.getApp(appId); ApplicationVersion v = api.getAppVersion(appId, \"latest\"); // parse WorkflowConfig and check each node's required params before calling publish","typeGuard":"boolean nodeParamsValid(WorkflowConfig cfg) { return cfg != null && cfg.getNodes().stream().allMatch(n -> n.getParams() != null && !n.getParams().isEmpty()); }","tryCatchPattern":"try { api.publishApp(appId); } catch (BizException e) { if (e.getMessage().contains(\"WORKFLOW\") || e.getCode().equals(\"WORKFLOW_CONFIG_ILLEGAL\")) { /* parse per-node error list from message, fix in Studio, republish */ } }","preventionTips":["Run workflow validation (draft save / dry-run) in Studio before clicking publish.","After upgrading the framework, re-open and re-save every workflow node to refresh schemas.","Never hand-edit version config JSON; use the editor so required node params stay consistent.","Parse the aggregated message — it lists every failing node and reason in one shot."],"tags":["workflow","validation","configuration","publish"],"backgroundTag":"schema-validation-failed","analyzedSha":"f82da0b50f35744c13968191be2b1cd2452ef550","analyzedAt":"2026-09-09T15:32:42.421Z","contentChangedAt":"2026-09-09T15:32:42.421Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}