{"record":{"id":"85d67a8606333f2a","repo":"alibaba/spring-ai-alibaba","slug":"workflow-execute-error-85d67a","errorCode":"WORKFLOW_EXECUTE_ERROR","errorMessage":"plugin execute failed","messagePattern":"plugin execute failed","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/processor/impl/PluginExecuteProcessor.java","lineNumber":82,"sourceCode":"\t\tsuper(redisManager, workflowInnerService, conversationChatMemory, commonConfig);\n\t\tthis.toolExecutionService = toolExecutionService;\n\t}\n\n\t@Override\n\tpublic NodeResult innerExecute(DirectedAcyclicGraph<String, Edge> graph, Node node, WorkflowContext context) {\n\t\tlong start = System.currentTimeMillis();\n\t\tToolExecutionResult result;\n\t\tNodeResult nodeResult = new NodeResult();\n\t\tnodeResult.setNodeId(node.getId());\n\t\tnodeResult.setNodeName(node.getName());\n\t\tnodeResult.setNodeType(node.getType());\n\t\tnodeResult.setInput(JsonUtils.toJson(constructInputParamsMap(node, context)));\n\t\tToolExecutionRequest toolExecutionRequest = buildToolRequest(node, context);\n\t\ttry {\n\t\t\tresult = toolExecutionService.executeTool(toolExecutionRequest);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new BizException(ErrorCode.WORKFLOW_EXECUTE_ERROR.toError(\"plugin execute failed\"), e);\n\t\t}\n\t\tfinally {\n\t\t\tlog.info(\"plugin execute cost: {}ms, requestId:{}\", System.currentTimeMillis() - start,\n\t\t\t\t\tcontext.getRequestId());\n\t\t}\n\t\tif (result == null || !result.isSuccess()) {\n\t\t\tnodeResult.setOutput(null);\n\t\t\tError error = result.getError();\n\t\t\tnodeResult.setErrorInfo(error == null ? null : error.getMessage());\n\t\t\tnodeResult.setError(error);\n\t\t\tnodeResult.setNodeStatus(NodeStatusEnum.FAIL.getCode());\n\t\t\treturn nodeResult;\n\t\t}\n\t\tnodeResult.setOutput(result.getOutput());\n\t\tnodeResult.setNodeStatus(NodeStatusEnum.SUCCESS.getCode());\n\t\tnodeResult.setUsages(null);\n\t\treturn nodeResult;\n\t}","sourceCodeStart":64,"sourceCodeEnd":100,"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/processor/impl/PluginExecuteProcessor.java#L64-L100","documentation":"PluginExecuteProcessor.innerExecute wraps any exception thrown by toolExecutionService.executeTool for a plugin node and rethrows it as a BizException with WORKFLOW_EXECUTE_ERROR and message 'plugin execute failed'. The original cause is attached as the nested exception.","triggerScenarios":"The plugin/tool backing a workflow plugin node throws during execution — e.g. HTTP call failure, auth error, invalid input parameters deserialized into the tool request, or plugin runtime crash.","commonSituations":"Third-party plugin endpoint down or unreachable; expired plugin credentials; tool schema changed after the workflow was authored so built inputs no longer match; network/DNS issues in the deployment environment.","solutions":["Inspect the nested cause (BizException getCause()) and the plugin execute logs to find the real failure.","Test the plugin standalone (outside the workflow) with the same inputs to reproduce.","Validate the plugin node's input parameter mappings against the tool's current schema.","Check plugin credentials/endpoint availability and network egress from the admin-server host.","Catch WORKFLOW_EXECUTE_ERROR on plugin nodes and configure a fallback/error branch in the workflow."],"exampleFix":"// before\nString result = (String) pluginInput; // schema changed, now expects object\n// after\nMap<String,Object> result = JsonUtils.parseMap(pluginInput);","handlingStrategy":"try-catch","validationCode":"// validate plugin inputs against the tool schema before running the workflow\nJsonSchema validator = JsonSchema.of(tool.getInputSchema());\nvalidator.assertValid(nodeInputParams);","typeGuard":null,"tryCatchPattern":"try {\n    workflowExecutor.run(request);\n} catch (BizException e) {\n    Throwable cause = e.getCause(); // original plugin exception\n    log.error(\"plugin failed\", cause);\n}","preventionTips":["Health-check plugin endpoints and credentials as part of deployment.","Re-validate plugin input mappings after any plugin schema update.","Add a workflow error/fallback branch on plugin nodes for graceful degradation.","Monitor nested causes of WORKFLOW_EXECUTE_ERROR to catch recurring plugin failures early."],"tags":["workflow","plugin","tool-execution","propagated-error"],"backgroundTag":"upstream-api-error","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"}