iflytek/astron-agent · warning

No flowId found for botId=

Error message

No flowId found for botId={}

What it means

A warn log emitted when no workflow flowId can be resolved for the given botId in getBotVersions. The service cannot query the workflow_version table without a flowId, so it returns an empty page instead of throwing. It indicates the bot has no linked LangChain workflow record.

Solutions

  1. Verify the bot has a linked workflow: check user_lang_chain_info table for the botId and confirm flow_id is non-null and non-blank
  2. If the mapping is missing, recreate or repair the bot-workflow association before querying versions
  3. Confirm the botId parameter passed to getBotVersions is the correct one (no ID mix-ups between bot and flow IDs)

Example fix

// before
String flowId = userLangChainDataService.findFlowIdByBotId(botId);
// after
String flowId = userLangChainDataService.findFlowIdByBotId(botId);
if (flowId == null || flowId.trim().isEmpty()) {
    throw new EntityNotFoundException("No workflow linked to botId=" + botId); // or return empty page intentionally
}
Defensive patterns

Strategy: validation

When it happens

Trigger: Calling getBotVersions with a botId whose user_lang_chain_info record is missing, deleted, or has a null/blank flowId.

Common situations: Bot created without ever being associated with a workflow; workflow linkage deleted during cleanup; whitespace-only flowId stored in DB; querying versions before first publish.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/68b03833b88f2a1e. Report an issue: GitHub.

Appendix: source

Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/publish/impl/BotPublishServiceImpl.java:194

            return maasAppId;
        }
    }


    // ==================== Version Management ====================

    @Override
    public PageResponse<BotVersionVO> getBotVersions(Integer botId, Integer page, Integer size, String uid, Long spaceId) {
        log.info("Query workflow version list: botId={}, page={}, size={}, uid={}, spaceId={}",
                botId, page, size, uid, spaceId);

        // 1. Permission validation - ensure user has permission to access the bot
        validateBotPermission(botId, uid, spaceId);

        // 2. Get flowId from botId
        String flowId = userLangChainDataService.findFlowIdByBotId(botId);
        if (flowId == null || flowId.trim().isEmpty()) {
            log.warn("No flowId found for botId={}", botId);
            return PageResponse.of(page, size, 0L, new ArrayList<>());
        }

        // 3. Pagination query version list - query workflow_version table using flowId
        Page<WorkflowVersion> pageParam = new Page<>(page, size);
        Page<WorkflowVersion> resultPage = workflowVersionMapper.selectPageByCondition(pageParam, flowId);

        // 4. Use MapStruct batch conversion to VO
        List<WorkflowVersion> versions = resultPage.getRecords();
        List<BotVersionVO> versionList = workflowVersionConverter.toVersionVOList(versions);

        log.info("Query workflow version list successful: botId={}, flowId={}, total={}", botId, flowId, resultPage.getTotal());
        return PageResponse.of(page, size, resultPage.getTotal(), versionList);
    }

    // ==================== Statistics Data ====================

    @Override

View on GitHub (pinned to 5e758547a8)