{"record":{"id":"168099afdca3d8b4","repo":"flowable/flowable-engine","slug":"could-not-handle-signal-process-definition-with-i","errorCode":null,"errorMessage":"Could not handle signal: process definition with id: \" + processDefinitionId + \" is suspended for \" + eventSubscription","messagePattern":"Could not handle signal: process definition with id: \" \\+ processDefinitionId \\+ \" is suspended for \" \\+ eventSubscription","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/event/SignalEventHandler.java","lineNumber":55,"sourceCode":"    public String getEventHandlerType() {\r\n        return EVENT_HANDLER_TYPE;\r\n    }\r\n\r\n    @SuppressWarnings(\"unchecked\")\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\r\n        } else if (eventSubscription.getProcessDefinitionId() != null) {\r\n\r\n            // Find initial flow element matching the signal start event\r\n            String processDefinitionId = eventSubscription.getProcessDefinitionId();\r\n            org.flowable.bpmn.model.Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);\r\n            ProcessDefinition processDefinition = ProcessDefinitionUtil.getProcessDefinition(processDefinitionId);\r\n\r\n            if (processDefinition.isSuspended()) {\r\n                throw new FlowableException(\"Could not handle signal: process definition with id: \" + processDefinitionId + \" is suspended for \" + eventSubscription);\r\n            }\r\n\r\n            // Start process instance via the flow element linked to the event\r\n            FlowElement flowElement = process.getFlowElement(eventSubscription.getActivityId(), true);\r\n            if (flowElement == null) {\r\n                throw new FlowableException(\"Could not find matching FlowElement for \" + eventSubscription);\r\n            }\r\n\r\n            ProcessInstanceHelper processInstanceHelper = CommandContextUtil.getProcessEngineConfiguration(commandContext).getProcessInstanceHelper();\r\n            processInstanceHelper.createAndStartProcessInstanceWithInitialFlowElement(processDefinition, null, null, null, flowElement, process,\r\n                    getPayloadAsMap(payload), null, null, null, true);\r\n\r\n        } else if (eventSubscription.getScopeId() != null && ScopeTypes.CMMN.equals(eventSubscription.getScopeType())) {\r\n            CommandContextUtil.getProcessEngineConfiguration(commandContext).getCaseInstanceService().handleSignalEvent(eventSubscription, getPayloadAsMap(payload));\r\n        \r\n        } else {\r\n            throw new FlowableException(\"Invalid signal handling: no execution nor process definition set for \" + eventSubscription);\r\n        }\r","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/event/SignalEventHandler.java#L37-L73","documentation":"SignalEventHandler routes a signal to a process-definition-level signal start event. If the target process definition is suspended, the signal cannot start a new instance, so Flowable throws this error naming the definition id and subscription. Suspended definitions cannot spawn process instances.","triggerScenarios":"runtimeService.signalEventReceived(signalName, ...) or runtimeService.dispatchEvent for a signal whose EventSubscriptionEntity has a processDefinitionId whose ProcessDefinition.isSuspended() is true.","commonSituations":"A process definition was suspended (e.g. via RepositoryService.suspendProcessDefinitionById or suspendProcessDefinitionByKey including instances) while signal start events still had active subscriptions; scheduling signals during a maintenance suspension window.","solutions":["Resume the definition first: repositoryService.activateProcessDefinitionById(processDefinitionId) (or byKey), then resend the signal.","If the signal should never target this definition, verify the signal name does not collide with a start-event subscription of a suspended process.","Deploy a new active version of the definition if the old version was intentionally suspended.","Catch FlowableException around signalEventReceived and queue the signal for later delivery after activation."],"exampleFix":"// before\nruntimeService.signalEventReceived(\"orderSignal\");\n// after\nProcessDefinition pd = repositoryService.createProcessDefinitionQuery()\n    .processDefinitionKey(\"orderProcess\").latestVersion().singleResult();\nif (pd != null && pd.isSuspended()) {\n    repositoryService.activateProcessDefinitionById(pd.getId(), true, null);\n}\nruntimeService.signalEventReceived(\"orderSignal\");","handlingStrategy":"validation","validationCode":"ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()\n    .processDefinitionKey(key).latestVersion().singleResult();\nif (pd == null || pd.isSuspended()) {\n    throw new IllegalStateException(\"Definition suspended, cannot deliver signal \" + signalName);\n}","typeGuard":null,"tryCatchPattern":"try {\n    runtimeService.signalEventReceived(signalName);\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"is suspended\")) {\n        signalRetryQueue.offer(signalName); // deliver after activation\n    } else { throw e; }\n}","preventionTips":["Check ProcessDefinition.isSuspended() before signaling definition-level events.","Coordinate suspension windows with signal producers (scheduled jobs, integrations).","Prefer suspending by key only when inbound signals are paused too.","Automate re-activation before resuming signal-driven workflows."],"tags":["flowable","bpmn","signal","suspended-process-definition"],"backgroundTag":"invalid-state-transition","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"}