{"record":{"id":"182a4e8c055f6ec3","repo":"conductor-oss/conductor","slug":"workflowrepairservice-is-disabled","errorCode":null,"errorMessage":"WorkflowRepairService is disabled.","messagePattern":"WorkflowRepairService is disabled\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":500,"severity":"warning","filePath":"core/src/main/java/com/netflix/conductor/service/AdminServiceImpl.java","lineNumber":105,"sourceCode":"     * @param taskType Name of the task\n     * @param start Start index of pagination\n     * @param count Number of entries\n     * @return list of pending {@link Task}\n     */\n    public List<Task> getListOfPendingTask(String taskType, Integer start, Integer count) {\n        List<Task> tasks = executionService.getPendingTasksForTaskType(taskType);\n        int total = start + count;\n        total = Math.min(tasks.size(), total);\n        if (start > tasks.size()) {\n            start = tasks.size();\n        }\n        return tasks.subList(start, total);\n    }\n\n    @Override\n    public boolean verifyAndRepairWorkflowConsistency(String workflowId) {\n        if (workflowRepairService == null) {\n            throw new IllegalStateException(\n                    WorkflowRepairService.class.getSimpleName() + \" is disabled.\");\n        }\n        return workflowRepairService.verifyAndRepairWorkflow(workflowId, true);\n    }\n\n    /**\n     * Queue up the workflow for sweep.\n     *\n     * @param workflowId Id of the workflow\n     * @return the id of the workflow instance that can be use for tracking.\n     */\n    public String requeueSweep(String workflowId) {\n        boolean pushed =\n                queueDAO.pushIfNotExists(\n                        Utils.DECIDER_QUEUE,\n                        workflowId,\n                        properties.getWorkflowOffsetTimeout().getSeconds());\n        return pushed + \".\" + workflowId;","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/service/AdminServiceImpl.java#L87-L123","documentation":"Thrown by AdminServiceImpl.verifyAndRepairWorkflowConsistency when the WorkflowRepairService Spring bean is not present in the application context (injected as Optional and resolved to null). The repair service is an optional component that reconciles inconsistent workflow states. When it's not registered, the admin repair API endpoint cannot function.","triggerScenarios":"Calling the admin API endpoint for workflow repair (POST /api/admin/workflow/{workflowId}/repair or similar) when the WorkflowRepairService bean is not on the classpath or not auto-configured. The bean is injected via Optional<WorkflowRepairService>, so its absence doesn't fail startup.","commonSituations":"Running a minimal Conductor server profile that excludes the reconciliation/sweeper module. The WorkflowRepairService is conditionally loaded (e.g. disabled by a feature flag or property) but an operator or external tool still calls the repair API. Custom server build that omitted the reconciliation module dependency.","solutions":["Ensure the module providing WorkflowRepairService is on the classpath (typically the core or server module's reconciliation package).","Check if there is a property that enables/disables the repair service (e.g. conductor.app.repairServiceEnabled or similar) and set it to true.","If the repair service is intentionally not deployed, stop calling the repair API endpoint from your tooling.","Rebuild the server with the full server profile that includes all reconciliation beans."],"exampleFix":"# before — repair service not loaded, API call fails\ncurl -X POST http://localhost:8080/api/admin/workflow/wf-123/repair\n# 500: WorkflowRepairService is disabled.\n\n# after — enable in application.properties\n# conductor.app.repairServiceEnabled=true  (check exact property name)\n# or ensure the reconciliation module is in the build dependencies","handlingStrategy":"type-guard","validationCode":"// Check if repair service is available before calling the API\npublic boolean isRepairServiceAvailable(AdminService adminService) {\n    // The service throws if null — probe safely\n    try {\n        adminService.verifyAndRepairWorkflowConsistency(\"__probe__\");\n        return true;\n    } catch (IllegalStateException e) {\n        return false;\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    adminService.verifyAndRepairWorkflowConsistency(workflowId);\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"disabled\")) {\n        // Repair service not deployed — inform user or skip\n        LOGGER.warn(\"WorkflowRepairService is not available in this deployment\");\n        return false;\n    }\n    throw e;\n}","preventionTips":["Ensure the reconciliation module providing WorkflowRepairService is in the server build if repair is needed.","Check the feature flag / property that controls repair service loading.","Add a health endpoint that reports which optional services are active."],"tags":["admin","repair-service","configuration","optional-bean"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}