{"record":{"id":"d22e2ace5ab7f0d1","repo":"alibaba/spring-ai-alibaba","slug":"workflow-execute-error-d22e2a","errorCode":"WORKFLOW_EXECUTE_ERROR","errorMessage":"error node id is: ","messagePattern":"error node id is: ","errorType":"error_code","errorClass":"BizException","httpStatus":null,"severity":"error","filePath":"spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/workflow/runtime/WorkflowExecuteManager.java","lineNumber":623,"sourceCode":"\t\t\tprocessorMap.get(type + \"ExecuteProcessor\").execute(graph, node, context);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"executeNodeWork error:{}\", nodeId, e);\n\t\t\tNodeResult nodeResult = new NodeResult();\n\t\t\tnodeResult.setNodeId(nodeId);\n\t\t\tOptional<Node> any = context.getWorkflowConfig()\n\t\t\t\t.getNodes()\n\t\t\t\t.stream()\n\t\t\t\t.filter(node -> node.getId().equals(nodeId))\n\t\t\t\t.findFirst();\n\t\t\tnodeResult.setNodeType(any.get().getType());\n\t\t\tnodeResult.setNodeStatus(NodeStatusEnum.FAIL.getCode());\n\t\t\tnodeResult.setErrorInfo(e.getMessage());\n\t\t\tnodeResult.setNodeExecTime((System.currentTimeMillis() - context.getStartTime()) + \"ms\");\n\t\t\tcontext.getNodeResultMap().put(nodeId, nodeResult);\n\t\t\tcontext.setTaskStatus(NodeStatusEnum.FAIL.getCode());\n\t\t\tworkflowInnerService.refreshContextCache(context);\n\t\t\tthrow new BizException(ErrorCode.WORKFLOW_EXECUTE_ERROR.toError(\"error node id is: \" + nodeId));\n\t\t}\n\t}\n\n\t/**\n\t * Capitalizes the first letter of a string\n\t * @param str The input string\n\t * @return The string with first letter capitalized\n\t */\n\tprivate String capitalizeFirstLetter(String str) {\n\t\tif (str == null || str.length() == 0) {\n\t\t\treturn str;\n\t\t}\n\t\treturn str.substring(0, 1).toUpperCase() + str.substring(1);\n\t}\n\n\t/**\n\t * Constructs a debug configuration for a workflow fragment Adds necessary start and\n\t * end nodes for debugging","sourceCodeStart":605,"sourceCodeEnd":641,"githubUrl":"https://github.com/alibaba/spring-ai-alibaba/blob/f82da0b50f35744c13968191be2b1cd2452ef550/spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/workflow/runtime/WorkflowExecuteManager.java#L605-L641","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.","Check the node identified by the id for configuration errors (missing model, tool, or input mappings).","Verify connectivity/credentials for external services the node calls (LLM API, MCP, tools).","Add node-level error handling or retry in the workflow definition if the failure is transient."],"exampleFix":"// before: node exception propagates with only node id\nthrow new BizException(ErrorCode.WORKFLOW_EXECUTE_ERROR.toError(\"error node id is: \" + nodeId));\n// after: preserve root cause for diagnosis\nthrow new BizException(ErrorCode.WORKFLOW_EXECUTE_ERROR.toError(\"error node id is: \" + nodeId), e);","handlingStrategy":"try-catch","validationCode":"// Java: validate node config before executing the workflow\nassert nodeId != null && !nodeId.isBlank() : \"nodeId required\";\n// ensure required context state exists\ncontext.getState().forEach((k, v) -> Objects.requireNonNull(v, \"missing state: \" + k));","typeGuard":null,"tryCatchPattern":"try { workflowExecuteManager.syncExecute(request); } catch (BizException e) {\n    if (\"WORKFLOW_EXECUTE_ERROR\".equals(e.getCode())) { log.error(\"node failed: {} cause: {}\", extractNodeId(e.getMessage()), e.getCause(), e); }\n    throw e;\n}","preventionTips":["Always capture and log the root cause (nodeResult.errorInfo / e.getCause()), not just the node id.","Test each node type in isolation before composing the workflow.","Add circuit breakers/retries for external calls made inside nodes.","Validate node configuration at workflow definition save time."],"tags":["workflow","node-execution","biz-exception"],"backgroundTag":"node-execution-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"}