iflytek/astron-agent · error · BusinessException
WORKFLOW_IMPORT_DEPENDENCY_UNRESOLVED
WORKFLOW_IMPORT_DEPENDENCY_UNRESOLVED
Error message
ResponseEnum.WORKFLOW_IMPORT_DEPENDENCY_UNRESOLVED
What it means
Thrown after loading the caller's ExecutionScope and all externally bound resources when any node in the imported workflow references a plugin, model, or resource binding that cannot be resolved (hasActiveImportIssue / hasInvalidPluginBinding / hasInvalidResourceBinding). The import is rejected so users never save flows pointing at non-existent dependencies.
Solutions
- Open the imported flow and re-bind each flagged node's plugin/model/database to resources existing in the target space
- Install/enable the missing plugins or create the missing knowledge bases/databases before import
- Re-export the workflow from an environment whose dependency IDs match the target
- Check the unresolved-dependency details in logs to identify which node bindings failed
Defensive patterns
Strategy: validation
Validate before calling
boolean allBound = data.getNodes().stream().allMatch(n -> resolvers.keySet().containsAll(extractBindingIds(n)));
Try / catch
try { workflowService.importWorkflow(req); } catch (BusinessException e) { if ("WORKFLOW_IMPORT_DEPENDENCY_UNRESOLVED".equals(e.getCode().name())) { /* re-bind flagged nodes */ } throw e; } Prevention
- Re-export workflows from environments matching the target's plugins/models
- Install required plugins and create resources before import
- Audit node bindings after cross-environment migration
When it happens
Trigger: Importing a workflow JSON whose nodes reference plugin IDs, model IDs, knowledge bases, or databases that do not exist (or are not executable) in the target space/user scope.
Common situations: Sharing workflow exports across environments where plugin/model IDs differ; deleted plugins referenced by an old export; importing into a space lacking the required knowledge base or database.
Related errors
- 8125
- 8521
- Header mismatch! Expected headers: , Actual headers:
- import workflow rejected, filename=
- 21600
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/dc1a736f4d971e78.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java:2544
SpaceInfoUtil.getSpaceId());
}
void ensureNoUnresolvedImportDependencies(BizWorkflowData workflowData, String uid, Long spaceId) {
if (workflowData == null || workflowData.getNodes() == null) {
return;
}
if (StringUtils.isBlank(uid)) {
throw new BusinessException(ResponseEnum.UNAUTHORIZED);
}
ExecutionScope scope = loadExecutionScope(uid, spaceId);
ImportDependencyResources resources = loadImportDependencyResources(workflowData, scope);
boolean unresolved = workflowData.getNodes()
.stream()
.anyMatch(node -> hasActiveImportIssue(node, resources)
|| hasInvalidPluginBinding(node, resources)
|| hasInvalidResourceBinding(node, resources));
if (unresolved) {
throw new BusinessException(ResponseEnum.WORKFLOW_IMPORT_DEPENDENCY_UNRESOLVED);
}
}
/** Load every bound external resource in bounded authoritative batch queries. */
private ImportDependencyResources loadImportDependencyResources(
BizWorkflowData workflowData, ExecutionScope scope) {
Map<String, List<ToolBox>> executableTools = loadExecutableTools(workflowData);
Set<Long> databaseIds = new LinkedHashSet<>();
Set<String> workflowIds = new LinkedHashSet<>();
Set<String> repositoryIds = new LinkedHashSet<>();
for (BizWorkflowNode node : workflowData.getNodes()) {
collectBoundResourceIds(node, databaseIds, workflowIds, repositoryIds);
}
return new ImportDependencyResources(
executableTools,
loadExecutableDatabaseIds(databaseIds, scope),
loadExecutableWorkflowIds(workflowIds, scope),
loadExecutableRepositoryIds(repositoryIds, scope),View on GitHub (pinned to 5e758547a8)