{"record":{"id":"11625c6d92ac35f9","repo":"flowable/flowable-engine","slug":"execution-executionid-has-not-subscribed-to-a","errorCode":null,"errorMessage":"Execution '<executionId>' has not subscribed to a signal event with name '<eventName>'.","messagePattern":"Execution '<executionId>' has not subscribed to a signal event with name '<eventName>'\\.","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/cmd/SignalEventReceivedCmd.java","lineNumber":89,"sourceCode":"            signalEvents = commandContext.getEventSubscriptionEntityManager().findSignalEventSubscriptionsByEventName(eventName, tenantId);\r\n\r\n        } else {\r\n\r\n            ExecutionEntity execution = commandContext.getExecutionEntityManager().findExecutionById(executionId);\r\n\r\n            if (execution == null) {\r\n                throw new ActivitiObjectNotFoundException(\"Cannot find execution with id '\" + executionId + \"'\", Execution.class);\r\n            }\r\n\r\n            if (execution.isSuspended()) {\r\n                throw new ActivitiException(\"Cannot throw signal event '\" + eventName\r\n                        + \"' because execution '\" + executionId + \"' is suspended\");\r\n            }\r\n\r\n            signalEvents = commandContext.getEventSubscriptionEntityManager().findSignalEventSubscriptionsByNameAndExecution(eventName, executionId);\r\n\r\n            if (signalEvents.isEmpty()) {\r\n                throw new ActivitiException(\"Execution '\" + executionId + \"' has not subscribed to a signal event with name '\" + eventName + \"'.\");\r\n            }\r\n        }\r\n\r\n        for (SignalEventSubscriptionEntity signalEventSubscriptionEntity : signalEvents) {\r\n            // We only throw the event to globally scoped signals.\r\n            // Process instance scoped signals must be thrown within the process itself\r\n            if (signalEventSubscriptionEntity.isGlobalScoped()) {\r\n                signalEventSubscriptionEntity.eventReceived(payload, async);\r\n            }\r\n        }\r\n\r\n        return null;\r\n    }\r\n\r\n}\r\n","sourceCodeStart":71,"sourceCodeEnd":105,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/cmd/SignalEventReceivedCmd.java#L71-L105","documentation":"SignalEventReceivedCmd throws ActivitiException when the execution has no signal event subscription matching the given event name. Signals are deliverable only to executions currently waiting at a signal-catching intermediate or boundary event with that name. Note the targeted delivery also only routes globally scoped signals; process-instance-scoped subscriptions are invisible to this API.","triggerScenarios":"Calling runtimeService.signalEventReceived(eventName, executionId) where the execution is not waiting on a signal named eventName, or is waiting only on a process-instance-scoped signal.","commonSituations":"Typo in the signal name differing from the bpmn:signal name; execution already passed the catch event; subscription deleted by boundary-event interruption; attempting to throw an instance-scoped signal from outside the process.","solutions":["Verify the subscription: runtimeService.createEventSubscriptionQuery().eventName(eventName).executionId(executionId).list() should be non-empty.","Correct the signal name to match the BPMN definition exactly.","For process-instance-scoped signals, trigger them from within the process (e.g. a service task) instead of the external API."],"exampleFix":"// before\nruntimeService.signalEventReceived(\"Order Approved\", executionId);\n// after\nif (!runtimeService.createEventSubscriptionQuery().eventName(\"order-approved\").executionId(executionId).list().isEmpty()) {\n    runtimeService.signalEventReceived(\"order-approved\", executionId);\n}","handlingStrategy":"validation","validationCode":"boolean subscribed = !runtimeService.createEventSubscriptionQuery()\n        .eventName(eventName).executionId(executionId).list().isEmpty();\nif (subscribed) runtimeService.signalEventReceived(eventName, executionId);","typeGuard":null,"tryCatchPattern":"try {\n    runtimeService.signalEventReceived(eventName, executionId);\n} catch (ActivitiException e) {\n    logger.warn(\"Execution {} not waiting on signal '{}'\", executionId, eventName, e);\n}","preventionTips":["Copy signal names from the BPMN file into constants; never free-type them.","Check EventSubscriptionQuery before signaling.","Remember process-instance-scoped signals must be thrown inside the process itself."],"tags":["signal-event","subscription","workflow"],"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"}