{"record":{"id":"52a93daef9bca1ea","repo":"flowable/flowable-engine","slug":"no-deployed-process-definition-found-for-id-proc","errorCode":null,"errorMessage":"No deployed process definition found for id '{processDefinitionId}'.","messagePattern":"No deployed process definition found for id '(.+?)'\\.","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/AbstractProcessStartEventSubscriptionCmd.java","lineNumber":119,"sourceCode":"\n        }\n        \n        if (processDefinition == null) {\n            throw new FlowableIllegalArgumentException(\"No deployed process definition found for key '\" + processDefinitionKey + \"'.\");\n        }\n        \n        return processDefinition;\n    }\n\n    protected ProcessDefinition getProcessDefinitionById(String processDefinitionId, CommandContext commandContext) {\n        RepositoryService repositoryService = CommandContextUtil.getProcessEngineConfiguration(commandContext).getRepositoryService();\n\n        ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()\n            .processDefinitionId(processDefinitionId)\n            .singleResult();\n\n        if (processDefinition == null) {\n            throw new FlowableIllegalArgumentException(\"No deployed process definition found for id '\" + processDefinitionId + \"'.\");\n        }\n        return processDefinition;\n    }\n\n    protected Process getProcess(String processDefinitionId, CommandContext commandContext) {\n        RepositoryService repositoryService = CommandContextUtil.getProcessEngineConfiguration(commandContext).getRepositoryService();\n        BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId);\n        return bpmnModel.getMainProcess();\n    }\n\n    protected EventModel getEventModel(String eventDefinitionKey, String tenantId, CommandContext commandContext) {\n        EventModel eventModel = CommandContextUtil.getEventRepositoryService(commandContext).getEventModelByKey(eventDefinitionKey, tenantId);\n        if (eventModel == null) {\n            throw new FlowableIllegalArgumentException(\"Could not find event model with key '\" + eventDefinitionKey + \"'.\");\n        }\n        return eventModel;\n    }\n","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/AbstractProcessStartEventSubscriptionCmd.java#L101-L137","documentation":"getProcessDefinitionById queried the repository service by exact process definition id and got null, so this FlowableIllegalArgumentException is thrown. A definition id is the key plus version (e.g. 'orderProcess:3:1201'), so it must match an existing row exactly.","triggerScenarios":"Passing a processDefinitionId to a set-process-definition-state / start-event command that does not exist, or a malformed id built by string concatenation.","commonSituations":"Hardcoding an id captured from another database/environment; id format changed between Flowable versions; using the process key where an id is expected.","solutions":["Look up the current id dynamically: repositoryService.createProcessDefinitionQuery().processDefinitionKey(key).latestVersion().singleResult().getId()","Verify the id exists via createProcessDefinitionQuery().processDefinitionId(id).singleResult()","Replace hand-built ids ('key:version:dbid') with ids returned by the API","Suspend/migrate by key instead of by id when the version is unknown"],"exampleFix":"// before\nsetStateCmd.processDefinitionId(\"orderProcess:1:4\"); // stale id\n// after\nProcessDefinition pd = repositoryService.createProcessDefinitionQuery().processDefinitionKey(\"orderProcess\").latestVersion().singleResult();\nsetStateCmd.processDefinitionId(pd.getId());","handlingStrategy":"validation","validationCode":"ProcessDefinition pd = repositoryService.createProcessDefinitionQuery().processDefinitionId(id).singleResult();\nif (pd == null) throw new IllegalStateException(\"Unknown process definition id: \" + id);","typeGuard":null,"tryCatchPattern":"try {\n    // byId operation\n} catch (FlowableIllegalArgumentException e) {\n    // re-resolve id by key/latestVersion and retry once\n}","preventionTips":["Never hardcode or persist definition ids; resolve by key at runtime","Never construct ids as key:version:dbid strings manually","When migrating environments, re-resolve ids rather than copying them"],"tags":["flowable","process-definition-id","not-found"],"backgroundTag":"record-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}