{"record":{"id":"b01cacfe62b78ebe","repo":"conductor-oss/conductor","slug":"no-such-workflow-found-by-id-s","errorCode":null,"errorMessage":"No such workflow found by id: %s","messagePattern":"No such workflow found by id: (.+?)","errorType":"http","errorClass":"NotFoundException","httpStatus":404,"severity":"error","filePath":"core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java","lineNumber":156,"sourceCode":"        populateWorkflowAndTaskPayloadData(workflowModel);\n        return workflowModel;\n    }\n\n    /**\n     * Fetches the {@link WorkflowModel} from the primary execution store only.\n     *\n     * <p>Unlike {@link #getWorkflowModel(String, boolean)}, this method does not fall back to\n     * {@link IndexDAO}. Use it for control-flow decisions that must rely on the source of truth.\n     *\n     * @param workflowId the id of the workflow to be fetched\n     * @param includeTasks if true, fetches the {@link Task} data in the workflow.\n     * @return the {@link WorkflowModel} object from {@link ExecutionDAO}\n     * @throws NotFoundException no such {@link WorkflowModel} is found in {@link ExecutionDAO}.\n     */\n    public WorkflowModel getWorkflowModelFromExecutionDAO(String workflowId, boolean includeTasks) {\n        WorkflowModel workflow = executionDAO.getWorkflow(workflowId, includeTasks);\n        if (workflow == null) {\n            throw new NotFoundException(\"No such workflow found by id: %s\", workflowId);\n        }\n        populateWorkflowAndTaskPayloadData(workflow);\n        return workflow;\n    }\n\n    /**\n     * Fetches the {@link Workflow} object from the data store given the id. Attempts to fetch from\n     * {@link ExecutionDAO} first, if not found, attempts to fetch from {@link IndexDAO}.\n     *\n     * @param workflowId the id of the workflow to be fetched\n     * @param includeTasks if true, fetches the {@link Task} data in the workflow.\n     * @return the {@link Workflow} object\n     * @throws NotFoundException no such {@link Workflow} is found.\n     * @throws TransientException parsing the {@link Workflow} object fails.\n     */\n    public Workflow getWorkflow(String workflowId, boolean includeTasks) {\n        return getWorkflowModelFromDataStore(workflowId, includeTasks).toWorkflow();\n    }","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java#L138-L174","documentation":"Thrown by getWorkflowModelFromExecutionDAO when executionDAO.getWorkflow(workflowId, includeTasks) returns null. This method deliberately reads ONLY the primary ExecutionDAO (the source of truth) and never falls back to the IndexDAO, so it is used for control-flow decisions that must not rely on eventually-consistent index data. A null result means the workflow is genuinely absent from the primary store.","triggerScenarios":"Calling getWorkflowModelFromExecutionDAO with a workflowId that was never created, was already removed/purged from the ExecutionDAO, or whose ID is malformed. Also fires during a race where the workflow has been deleted but a pending decider/sweeper call still references it.","commonSituations":"A client sends a stale or fabricated workflow id. A retry/queue message references a workflow that has already been archived and removed. A split-brain or replica-lag in a distributed ExecutionDAO (e.g. Cassandra/DynamoDB) momentarily returns null before the write is visible.","solutions":["Confirm the workflowId is correct and was created (check metadata/ExecutionDAO directly, not just the index).","If the workflow should exist, verify it was not removed by the sweeper, an explicit removeWorkflow call, or a TTL expiry.","If reading for display/search (not control flow), use getWorkflow/getWorkflowModel instead, which falls back to the IndexDAO.","Guard the caller: treat NotFoundException as a terminal 'workflow not present' signal rather than retrying blindly."],"exampleFix":"// before - control-flow read that needs source of truth\nWorkflowModel wf = executionDAOFacade.getWorkflowModelFromExecutionDAO(id, true);\n// after - tolerate missing workflow in control flow\nWorkflowModel wf;\ntry {\n    wf = executionDAOFacade.getWorkflowModelFromExecutionDAO(id, true);\n} catch (NotFoundException e) {\n    LOGGER.warn(\"Workflow {} no longer in primary store, skipping\", id);\n    return;\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    WorkflowModel wf = executionDAOFacade.getWorkflowModelFromExecutionDAO(workflowId, includeTasks);\n} catch (NotFoundException e) {\n    // workflow absent from source of truth; treat as terminal for this control-flow branch\n    LOGGER.warn(\"Workflow {} not in primary store\", workflowId);\n}","preventionTips":["Use this method only when you need the authoritative ExecutionDAO read; prefer getWorkflow for display.","Always handle NotFoundException as a normal 'not present' outcome in callers of the primary-store read.","Avoid passing user-supplied ids without first confirming they exist."],"tags":["workflow","execution-dao","not-found","control-flow"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}