alibaba/spring-ai-alibaba · error · BizException

WORKFLOW_CONFIG_ILLEGAL

WORKFLOW_CONFIG_ILLEGAL

Error message

Node【%s】have a configuration error:
%s

What it means

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.

Source

Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/AppController.java:190

			throw new BizException(ErrorCode.MISSING_PARAMS.toError("appId"));
		}
		Application app = appService.getApp(appId);
		if (app.getType() == AppType.WORKFLOW) {
			ApplicationVersion applicationVersion = appService.getAppVersion(appId, "latest");
			WorkflowConfig appOrchestraConfig = JsonUtils.fromJson(applicationVersion.getConfig(),
					WorkflowConfig.class);
			ExecuteProcessor.CheckFlowParamResult checkFlowParamResult = workflowExecuteManager
				.checkWorkflowConfig(appOrchestraConfig);
			if (!checkFlowParamResult.isSuccess()) {
				StringBuilder stringBuilder = new StringBuilder();
				checkFlowParamResult.getCheckNodeParamResults()
					.forEach(nodeParamResult -> stringBuilder.append("Node【")
						.append(nodeParamResult.getNodeName())
						.append("】")
						.append("have a configuration error:\n")
						.append(String.join(";\n", nodeParamResult.getErrorInfos()))
						.append("\n"));
				throw new BizException(ErrorCode.WORKFLOW_CONFIG_ILLEGAL.toError(stringBuilder.toString()));
			}
		}

		appService.publishApp(appId);
		return Result.success(context.getRequestId(), null);
	}

	/**
	 * Lists application versions
	 * @param appId Application ID
	 * @param query Query parameters
	 * @return Paginated list of versions
	 */
	@GetMapping("/{appId}/versions")
	public Result<PagingList<ApplicationVersion>> listAppVersions(@PathVariable("appId") String appId,
			@ApiModelAttribute AppQuery query) {

		RequestContext context = RequestContextHolder.getRequestContext();

View on GitHub (pinned to f82da0b50f)

Solutions

  1. Read the message: it names each failing Node and its specific error infos; open the workflow in Studio/Admin and fix those nodes.
  2. Fill required node parameters (model, inputs/outputs, prompt variables) shown in the error list, then republish.
  3. If configs were hand-edited, re-export or re-create the node from the current schema to remove stale fields.
  4. Publish a newer app version whose config passes validation instead of republishing a stale 'latest' version.

Example fix

// before (workflow config)
{"nodes":[{"name":"llm-node","params":{"model":null}}]}
// after
{"nodes":[{"name":"llm-node","params":{"model":"qwen-max","temperature":0.7}}]}
Defensive patterns

Strategy: try-catch

Validate before calling

Application app = api.getApp(appId); ApplicationVersion v = api.getAppVersion(appId, "latest"); // parse WorkflowConfig and check each node's required params before calling publish

Type guard

boolean nodeParamsValid(WorkflowConfig cfg) { return cfg != null && cfg.getNodes().stream().allMatch(n -> n.getParams() != null && !n.getParams().isEmpty()); }

Try / catch

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 */ } }

Prevention

When it happens

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

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

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 alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09). Data as JSON: /api/errors/3b94cabbd2d8a29f. Report an issue: GitHub.