{"record":{"id":"70a688bc2fae7fbe","repo":"flowable/flowable-engine","slug":"no-process-definition-found-for-id-processdefin-70a688","errorCode":null,"errorMessage":"No process definition found for id '${processDefinitionId}'","messagePattern":"No process definition found for id '(.+?)'","errorType":"exception","errorClass":"ActivitiObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/event/SignalEventHandler.java","lineNumber":55,"sourceCode":"    @Override\r\n    public String getEventHandlerType() {\r\n        return EVENT_HANDLER_TYPE;\r\n    }\r\n\r\n    @Override\r\n    public void handleEvent(EventSubscriptionEntity eventSubscription, Object payload, CommandContext commandContext) {\r\n        if (eventSubscription.getExecutionId() != null) {\r\n            super.handleEvent(eventSubscription, payload, commandContext);\r\n        } else if (eventSubscription.getProcessDefinitionId() != null) {\r\n            // Start event\r\n            String processDefinitionId = eventSubscription.getProcessDefinitionId();\r\n            DeploymentManager deploymentCache = Context\r\n                    .getProcessEngineConfiguration()\r\n                    .getDeploymentManager();\r\n\r\n            ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) deploymentCache.findDeployedProcessDefinitionById(processDefinitionId);\r\n            if (processDefinition == null) {\r\n                throw new ActivitiObjectNotFoundException(\"No process definition found for id '\" + processDefinitionId + \"'\", ProcessDefinition.class);\r\n            }\r\n\r\n            ActivityImpl startActivity = processDefinition.findActivity(eventSubscription.getActivityId());\r\n            if (startActivity == null) {\r\n                throw new ActivitiException(\"Could no handle signal: no start activity found with id \" + eventSubscription.getActivityId());\r\n            }\r\n            ExecutionEntity processInstance = processDefinition.createProcessInstance(null, startActivity);\r\n            if (processInstance == null) {\r\n                throw new ActivitiException(\"Could not handle signal: no process instance started\");\r\n            }\r\n\r\n            if (payload != null) {\r\n                if (payload instanceof Map) {\r\n                    Map<String, Object> variables = (Map<String, Object>) payload;\r\n                    processInstance.setVariables(variables);\r\n                }\r\n            }\r\n\r","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/event/SignalEventHandler.java#L37-L73","documentation":"Thrown by SignalEventHandler.handleEvent when a signal event subscription carries a process definition id that is not present in the deployment cache, i.e. no deployed process definition with that id exists. It is an ActivitiObjectNotFoundException with ProcessDefinition.class. Signals targeting a process-definition-level start subscription require the definition to still be deployed.","triggerScenarios":"RuntimeSignalEventReceived (or runtimeService.signalEventReceived) resolves an event subscription whose processDefinitionId no longer resolves via DeploymentManager.findDeployedProcessDefinitionById — typically after the process definition was deleted or the deployment cache lost it.","commonSituations":"Redeploying a new version of a process and deleting the old definition while signal subscriptions on the old definition remain in ACT_RU_EVENT_SUBSCRIBER; manually purging deployments; running against a different database than the one holding the deployment.","solutions":["Ensure the referenced process definition is still deployed (check ACT_RE_PROCDEF for the id); redeploy it if it was removed.","Delete stale signal event subscriptions pointing to the removed definition (ACT_RU_EVENT_SUBSCRIBER) instead of signaling them.","Deploy a new process version rather than deleting old definitions that still have live signal subscriptions.","Check that the engine connects to the database where the deployment actually exists."],"exampleFix":"// before: deleting the old definition that still has signal subscriptions\nrepositoryService.deleteDeployment(oldDeploymentId, true);\n// after: keep it, or cascade-delete subscriptions first\nList<Execution> subs = runtimeService.createExecutionQuery().signalEventSubscriptionName(\"mySignal\").list();\nif (subs.isEmpty()) {\n    repositoryService.deleteDeployment(oldDeploymentId, true);\n} else {\n    repositoryService.suspendProcessDefinitionById(oldDefinitionId);\n}","handlingStrategy":"validation","validationCode":"ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()\n    .processDefinitionId(processDefinitionId).singleResult();\nif (pd == null) throw new IllegalStateException(\"Definition not deployed: \" + processDefinitionId);","typeGuard":null,"tryCatchPattern":"try {\n    runtimeService.signalEventReceived(signalName);\n} catch (org.activiti.engine.ActivitiObjectNotFoundException e) {\n    LOGGER.warn(\"Signal targets missing definition: {}\", e.getMessage());\n}","preventionTips":["Deploy new versions instead of deleting old definitions with live subscriptions.","Query process definitions before signaling start-type subscriptions.","Keep deployments and runtime DB in sync (same database).","Periodically purge orphaned event subscriptions."],"tags":["bpmn","signal","process-definition","not-found"],"backgroundTag":"entity-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"}