{"record":{"id":"e301ba0ab8a4a6d0","repo":"flowable/flowable-engine","slug":"cannot-start-process-instance-by-message-no-subsc","errorCode":null,"errorMessage":"Cannot start process instance by message: no subscription to message with name '${messageName}' found.","messagePattern":"Cannot start process instance by message: no subscription to message with name '(.+?)' found\\.","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/StartProcessInstanceByMessageCmd.java","lineNumber":92,"sourceCode":"        this.callbackType = processInstanceBuilder.getCallbackType();\r\n        this.referenceId = processInstanceBuilder.getReferenceId();\r\n        this.referenceType = processInstanceBuilder.getReferenceType();\r\n        this.businessStatus = processInstanceBuilder.getBusinessStatus();\r\n    }\r\n\r\n    @Override\r\n    public ProcessInstance execute(CommandContext commandContext) {\r\n\r\n        if (messageName == null) {\r\n            throw new FlowableIllegalArgumentException(\"Cannot start process instance by message: message name is null\");\r\n        }\r\n\r\n        ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);\r\n        MessageEventSubscriptionEntity messageEventSubscription = processEngineConfiguration.getEventSubscriptionServiceConfiguration().getEventSubscriptionService()\r\n                .findMessageStartEventSubscriptionByName(messageName, tenantId);\r\n\r\n        if (messageEventSubscription == null) {\r\n            throw new FlowableObjectNotFoundException(\"Cannot start process instance by message: no subscription to message with name '\" + messageName + \"' found.\", MessageEventSubscriptionEntity.class);\r\n        }\r\n\r\n        String processDefinitionId = messageEventSubscription.getConfiguration();\r\n        if (processDefinitionId == null) {\r\n            throw new FlowableException(\"Cannot start process instance by message: subscription to message with name '\" + messageName + \"' is not a message start event.\");\r\n        }\r\n\r\n        DeploymentManager deploymentCache = processEngineConfiguration.getDeploymentManager();\r\n\r\n        ProcessDefinition processDefinition = deploymentCache.findDeployedProcessDefinitionById(processDefinitionId);\r\n        if (processDefinition == null) {\r\n            throw new FlowableObjectNotFoundException(\"No process definition found for id '\" + processDefinitionId + \"'\", ProcessDefinition.class);\r\n        }\r\n\r\n        ProcessInstanceHelper processInstanceHelper = processEngineConfiguration.getProcessInstanceHelper();\r\n        ProcessInstance processInstance = processInstanceHelper.createAndStartProcessInstanceByMessage(processDefinition,\r\n                messageName, businessKey, businessStatus, processVariables, transientVariables, callbackId, callbackType, referenceId, referenceType,\r\n                ownerId, assigneeId);\r","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/StartProcessInstanceByMessageCmd.java#L74-L110","documentation":"No message start event subscription with the given message name (and tenant) exists, so the command cannot correlate the message to any deployable process start. Flowable only registers start subscriptions when a deployed process definition contains a message start event with that name.","triggerScenarios":"Calling runtimeService.startProcessInstanceByMessage(messageName[, tenantId]) when no deployed process has a message start event with that exact name, the process was undeployed, or the tenantId doesn't match the deployment tenant.","commonSituations":"Name mismatch or case difference between BPMN message name and caller; process not (re)deployed before the message arrives; multi-tenant deployments where the message is sent with the wrong tenantId; new-definition deployment removed the old message start event.","solutions":["Verify the BPMN start event is a messageStartEvent and its message name exactly matches (case-sensitive) the name passed to the API.","Confirm the process definition containing the message start event is deployed to the same engine (check via repositoryService).","In multi-tenant setups, pass the correct tenantId used at deployment time.","List candidate subscriptions in the ACT_RU_EVENT_SUBSCR table (or via queries) to see which message names are actually registered."],"exampleFix":"// before\nruntimeService.startProcessInstanceByMessageAndTenantId(\"RecieveOrder\", tenantId);\n// after\n// BPMN: <message id=\"orderMsg\" name=\"ReceiveOrder\"/> on a messageStartEvent\nruntimeService.startProcessInstanceByMessageAndTenantId(\"ReceiveOrder\", tenantId);","handlingStrategy":"validation","validationCode":"ProcessDefinition def = repositoryService.createProcessDefinitionQuery()\n    .messageEventSubscriptionName(messageName)\n    .processDefinitionTenantId(tenantId)\n    .latestVersion().singleResult();\nif (def != null) {\n    runtimeService.startProcessInstanceByMessageAndTenantId(messageName, tenantId);\n}","typeGuard":null,"tryCatchPattern":"try {\n    runtimeService.startProcessInstanceByMessageAndTenantId(messageName, tenantId);\n} catch (FlowableObjectNotFoundException e) {\n    log.error(\"No message start event subscribed for '{}' (tenant {})\", messageName, tenantId, e);\n}","preventionTips":["Keep BPMN message names in constants shared between process models and calling code","Deploy the process containing the message start event before external messages arrive","In multi-tenant setups always pass the tenantId used at deployment time","Inspect ACT_RU_EVENT_SUBSCR to confirm which message names are registered"],"tags":["flowable","message-start-event","not-found","event-subscription"],"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-14T11:17:12.474Z"}