{"record":{"id":"25dcff3824433a67","repo":"flowable/flowable-engine","slug":"cannot-find-execution-with-id-executionid","errorCode":null,"errorMessage":"Cannot find execution with id '${executionId}'","messagePattern":"Cannot find execution with id '(.+?)'","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/SignalEventReceivedCmd.java","lineNumber":83,"sourceCode":"        this.payload = null;\r\n        this.tenantId = tenantId;\r\n    }\r\n\r\n    @Override\r\n    public Void execute(CommandContext commandContext) {\r\n\r\n        List<SignalEventSubscriptionEntity> signalEvents = null;\r\n\r\n        ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);\r\n        EventSubscriptionService eventSubscriptionService = processEngineConfiguration.getEventSubscriptionServiceConfiguration().getEventSubscriptionService();\r\n        if (executionId == null) {\r\n            signalEvents = eventSubscriptionService.findSignalEventSubscriptionsByEventName(eventName, tenantId);\r\n        } else {\r\n\r\n            ExecutionEntity execution = CommandContextUtil.getExecutionEntityManager(commandContext).findById(executionId);\r\n\r\n            if (execution == null) {\r\n                throw new FlowableObjectNotFoundException(\"Cannot find execution with id '\" + executionId + \"'\", Execution.class);\r\n            }\r\n\r\n            if (execution.isSuspended()) {\r\n                throw new FlowableException(\"Cannot throw signal event '\" + eventName + \"' because \" + execution + \" is suspended\");\r\n            }\r\n\r\n            if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) {\r\n                Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityHandler();\r\n                compatibilityHandler.signalEventReceived(eventName, executionId, payload, async, tenantId);\r\n                return null;\r\n            }\r\n\r\n            signalEvents = eventSubscriptionService.findSignalEventSubscriptionsByNameAndExecution(eventName, executionId);\r\n\r\n            if (signalEvents.isEmpty()) {\r\n                throw new FlowableException(execution + \" has not subscribed to a signal event with name '\" + eventName + \"'.\");\r\n            }\r\n        }\r","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/SignalEventReceivedCmd.java#L65-L101","documentation":"Lookup failure in SignalEventReceivedCmd.execute: the command was given a specific executionId to deliver a signal to, but no execution with that id exists (finished, deleted, or wrong id), so the signal event subscription cannot be triggered.","triggerScenarios":"Calling runtimeService.signalEventReceived(signalName, executionId) with an executionId that was deleted, already ended, or never existed.","commonSituations":"Signals delivered from external systems after the waiting process step already completed or was terminated; stale execution ids persisted by the caller; racing deliveries where the execution ends between query and signal.","solutions":["Verify the execution still exists with runtimeService.createExecutionQuery().executionId(executionId).singleResult() before signaling.","Make signal delivery idempotent: treat 'execution not found' as 'already continued' and skip instead of failing.","Fix the source of the id so a valid, live executionId is captured when the execution starts waiting."],"exampleFix":"// before\nruntimeService.signalEventReceived(\"orderPaid\", executionId);\n// after\nExecution e = runtimeService.createExecutionQuery().executionId(executionId).singleResult();\nif (e != null) runtimeService.signalEventReceived(\"orderPaid\", executionId);","handlingStrategy":"validation","validationCode":"Execution e = runtimeService.createExecutionQuery().executionId(executionId).singleResult();\nif (e != null) runtimeService.signalEventReceived(signalName, executionId);","typeGuard":null,"tryCatchPattern":"try {\n    runtimeService.signalEventReceived(signalName, executionId);\n} catch (FlowableObjectNotFoundException e) {\n    log.info(\"Execution {} already gone; treating signal as consumed\", executionId);\n}","preventionTips":["Make signal delivery idempotent — a missing execution usually means it already moved on","Capture the executionId only while the execution is waiting at the catch event","Avoid delivering signals long after the event was recorded; deliver near-real-time or persist and retry safely"],"tags":["flowable","signal-event","execution","not-found"],"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-18T11:17:12.947Z"}