iflytek/astron-agent · error · BusinessException
WORKFLOW_VERSION_GET_NAME_FAILED
WORKFLOW_VERSION_GET_NAME_FAILED
Error message
WORKFLOW_VERSION_GET_NAME_FAILED
What it means
WORKFLOW_VERSION_GET_NAME_FAILED is thrown by ReleaseManageClientServiceImpl.getVersionNameByBotId when no workflow flowId can be found for the given botId. The bot-to-flow binding lookup (userLangChainDataService.findFlowIdByBotId) returned blank.
Solutions
- Verify the bot is actually bound to a workflow (check the bot-flow binding data used by userLangChainDataService)
- Confirm the botId is correct and belongs to the expected space
- Re-create the workflow binding for the bot, then retry the release
- Check findFlowIdByBotId's numeric conversion (botId.intValue()) isn't overflowing/truncating large ids
Example fix
// before
String name = releaseManageClientService.getVersionNameByBotId(botId, spaceId, request);
// after
String flowId = userLangChainDataService.findFlowIdByBotId(botId.intValue());
if (StrUtil.isBlank(flowId)) {
throw new BusinessException(ResponseEnum.PARAMETER_ERROR); // clearer client-facing error
}
String name = releaseManageClientService.getVersionNameByBotId(botId, spaceId, request); Defensive patterns
Strategy: validation
Validate before calling
String flowId = userLangChainDataService.findFlowIdByBotId(botId.intValue()); if (StrUtil.isBlank(flowId)) { /* block release: bot has no bound workflow */ } Try / catch
try { name = client.getVersionNameByBotId(botId, spaceId, req); } catch (BusinessException e) { ui.show("Bind this bot to a workflow before releasing"); } Prevention
- Enforce bot-to-workflow binding as a prerequisite step in the publish wizard
- Validate the binding exists before showing the release button
- Watch for Long-to-int truncation on large botIds
When it happens
Trigger: getVersionNameByBotId called with a botId that has no bound workflow flowId (findFlowIdByBotId returns null/empty).
Common situations: Publishing a bot that was never linked to a workflow; binding row missing or deleted; botId passed is wrong or from another space; data migration dropped the bot-flow mapping.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/d2b6ae9baf98d5a5.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/publish/impl/ReleaseManageClientServiceImpl.java:37
/**
* @author yun-zhi-ztl
*/
@Service
@Slf4j
@RequiredArgsConstructor
public class ReleaseManageClientServiceImpl implements ReleaseManageClientService {
private final UserLangChainDataService userLangChainDataService;
private final VersionService versionService;
private static final String RELEASE_SUCCESS = WorkflowConst.PublishResult.SUCCESS;
@Override
public String getVersionNameByBotId(Long botId, Long spaceId, HttpServletRequest request) {
String flowId = userLangChainDataService.findFlowIdByBotId(botId.intValue());
if (StrUtil.isBlank(flowId)) {
log.error("getVersionNameByBotId - Failed to get flowId by botId, botId={}", botId);
throw new BusinessException(ResponseEnum.WORKFLOW_VERSION_GET_NAME_FAILED);
}
WorkflowVersion query = new WorkflowVersion();
query.setFlowId(flowId);
ApiResult<JSONObject> response = versionService.getVersionNameForBoundBotPublish(query);
JSONObject data = response == null ? null : response.data();
String versionName = data == null ? null : data.getString("workflowVersionName");
if (response == null || response.code() != 0 || StrUtil.isBlank(versionName)) {
log.error("getVersionNameByBotId - Failed to get version name, botId={}, flowId={}, spaceId={}",
botId, flowId, spaceId);
throw new BusinessException(ResponseEnum.WORKFLOW_VERSION_GET_NAME_FAILED);
}
return versionName;
}
@Override
public void releaseBotApi(Integer botId, String flowId, String versionName, String executionUid,
Long spaceId, HttpServletRequest request) {View on GitHub (pinned to 5e758547a8)