alibaba/spring-ai-alibaba · error · BizException

WORKFLOW_EXECUTE_ERROR

WORKFLOW_EXECUTE_ERROR

Error message

error node id is: 

What it means

WorkflowExecuteManager wraps any exception thrown while executing a single workflow node into a BizException with code WORKFLOW_EXECUTE_ERROR. The message carries the failing node id, and the node result is already marked FAIL with its errorInfo set in the node result map before the throw. It signals that the node-level execution failed, not necessarily that the whole workflow engine is broken.

Source

Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/workflow/runtime/WorkflowExecuteManager.java:623

			processorMap.get(type + "ExecuteProcessor").execute(graph, node, context);
		}
		catch (Exception e) {
			log.error("executeNodeWork error:{}", nodeId, e);
			NodeResult nodeResult = new NodeResult();
			nodeResult.setNodeId(nodeId);
			Optional<Node> any = context.getWorkflowConfig()
				.getNodes()
				.stream()
				.filter(node -> node.getId().equals(nodeId))
				.findFirst();
			nodeResult.setNodeType(any.get().getType());
			nodeResult.setNodeStatus(NodeStatusEnum.FAIL.getCode());
			nodeResult.setErrorInfo(e.getMessage());
			nodeResult.setNodeExecTime((System.currentTimeMillis() - context.getStartTime()) + "ms");
			context.getNodeResultMap().put(nodeId, nodeResult);
			context.setTaskStatus(NodeStatusEnum.FAIL.getCode());
			workflowInnerService.refreshContextCache(context);
			throw new BizException(ErrorCode.WORKFLOW_EXECUTE_ERROR.toError("error node id is: " + nodeId));
		}
	}

	/**
	 * Capitalizes the first letter of a string
	 * @param str The input string
	 * @return The string with first letter capitalized
	 */
	private String capitalizeFirstLetter(String str) {
		if (str == null || str.length() == 0) {
			return str;
		}
		return str.substring(0, 1).toUpperCase() + str.substring(1);
	}

	/**
	 * Constructs a debug configuration for a workflow fragment Adds necessary start and
	 * end nodes for debugging

View on GitHub (pinned to f82da0b50f)

Solutions

  1. Read the actual cause in the node result map / logs: this message only gives the node id, so look up nodeResult.errorInfo for the root exception.
  2. Check the node identified by the id for configuration errors (missing model, tool, or input mappings).
  3. Verify connectivity/credentials for external services the node calls (LLM API, MCP, tools).
  4. Add node-level error handling or retry in the workflow definition if the failure is transient.

Example fix

// before: node exception propagates with only node id
throw new BizException(ErrorCode.WORKFLOW_EXECUTE_ERROR.toError("error node id is: " + nodeId));
// after: preserve root cause for diagnosis
throw new BizException(ErrorCode.WORKFLOW_EXECUTE_ERROR.toError("error node id is: " + nodeId), e);
Defensive patterns

Strategy: try-catch

Validate before calling

// Java: validate node config before executing the workflow
assert nodeId != null && !nodeId.isBlank() : "nodeId required";
// ensure required context state exists
context.getState().forEach((k, v) -> Objects.requireNonNull(v, "missing state: " + k));

Try / catch

try { workflowExecuteManager.syncExecute(request); } catch (BizException e) {
    if ("WORKFLOW_EXECUTE_ERROR".equals(e.getCode())) { log.error("node failed: {} cause: {}", extractNodeId(e.getMessage()), e.getCause(), e); }
    throw e;
}

Prevention

When it happens

Trigger: syncExecute -> executeNodeWork catches any Throwable from running a node (model call failure, tool error, bad node config, downstream exception) and rethrows it as this BizException. Any node in the workflow graph that throws during synchronous execution triggers it.

Common situations: Model/API call inside a node fails (network, auth, rate limit); a code/tool node throws a runtime exception; node configuration is invalid; state variables a node expects are missing from the workflow context.

Related errors


AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09). Data as JSON: /api/errors/d22e2ace5ab7f0d1. Report an issue: GitHub.