{"record":{"id":"a2cea3fa302a6273","repo":"flowable/flowable-engine","slug":"could-not-find-a-dead-letter-job-with-id-jobid","errorCode":null,"errorMessage":"Could not find a dead letter job with id '${jobId}'.","messagePattern":"Could not find a dead letter job with id '(.+?)'\\.","errorType":"http","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/JobResource.java","lineNumber":327,"sourceCode":"                restApiInterceptor.moveDeadLetterJob(deadLetterJob, MOVE_ACTION);\n            }\n            /*\n             * Note that the jobType is checked to know which kind of move that needs to be done.\n             * The MOVE_TO_HISTORY_JOB_ACTION allows to specifically force the move to a history job and trigger the else part below.\n             */\n\n            try {\n                if (HistoryJobEntity.HISTORY_JOB_TYPE.equals(deadLetterJob.getJobType())) {\n                    managementService.moveDeadLetterJobToHistoryJob(deadLetterJob.getId(), cmmnEngineConfiguration.getAsyncExecutorNumberOfRetries());\n\n                } else {\n                    managementService.moveDeadLetterJobToExecutableJob(deadLetterJob.getId(), cmmnEngineConfiguration.getAsyncExecutorNumberOfRetries());\n\n                }\n\n            } catch (FlowableObjectNotFoundException e) {\n                // Re-throw to have consistent error-messaging across REST-API\n                throw new FlowableObjectNotFoundException(\"Could not find a dead letter job with id '\" + jobId + \"'.\", Job.class);\n            }\n\n        } else if (MOVE_TO_HISTORY_JOB_ACTION.equals(actionRequest.getAction())) {\n            if (restApiInterceptor != null) {\n                restApiInterceptor.moveDeadLetterJob(deadLetterJob, MOVE_TO_HISTORY_JOB_ACTION);\n            }\n            try {\n                managementService.moveDeadLetterJobToHistoryJob(deadLetterJob.getId(), cmmnEngineConfiguration.getAsyncHistoryExecutorNumberOfRetries());\n            } catch (FlowableObjectNotFoundException e) {\n                // Re-throw to have consistent error-messaging across REST-api\n                throw new FlowableObjectNotFoundException(\"Could not find a dead letter job with id '\" + jobId + \"'.\", Job.class);\n            }\n\n        }\n\n    }\n}\n","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/JobResource.java#L309-L345","documentation":"Moving a deadletter job back to the executable queue failed because the job id does not exist. The REST layer re-throws FlowableObjectNotFoundException with the standard deadletter message for consistency.","triggerScenarios":"POST /cmmn-management/deadletter-jobs/{jobId} with action 'move' where the deadletter job with that id is gone (already moved/retried) or never existed.","commonSituations":"Double-execution of a move script, id sourced from a different job table (timer/history), wrong engine database.","solutions":["Re-list deadletter jobs to confirm the id is still present","Handle 404 gracefully — the job may already have been moved","Verify you are pointing at the correct CMMN engine configuration"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const job = await get(`/cmmn-management/deadletter-jobs/${jobId}`);\nif (!job) throw new Error(`deadletter job ${jobId} not found`);","typeGuard":null,"tryCatchPattern":"try { await moveDeadLetterJob(jobId); }\ncatch (e) { if (e.status === 404 && /dead letter job/.test(e.message)) { /* idempotent skip: already moved */ } else throw e; }","preventionTips":["Make deadletter moves idempotent — 404 often means already processed","Avoid concurrent workers moving the same job id","Track processed ids in an audit table"],"tags":["rest","not-found","job"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}