{"record":{"id":"9519f622fb99a7eb","repo":"flowable/flowable-engine","slug":"there-is-no-correlation-parameter-with-name-cor","errorCode":null,"errorMessage":"There is no correlation parameter with name '${correlationParameterName}' defined in event model with key '${eventModel.getKey()}'. You can only subscribe for an event with a combination of valid correlation parameters.","messagePattern":"There is no correlation parameter with name '(.+?)' defined in event model with key '(.+?)'\\. You can only subscribe for an event with a combination of valid correlation parameters\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/AbstractCaseStartEventSubscriptionCmd.java","lineNumber":65,"sourceCode":"        EventModel eventModel = getEventModel(eventDefinitionKey, tenantId, commandContext);\n        Map<String, Object> correlationParameters = new HashMap<>();\n        for (Map.Entry<String, Object> correlationValue : correlationParameterValues.entrySet()) {\n            // make sure the correlation parameter value is based on a valid, defined correlation parameter within the event model\n            checkEventModelCorrelationParameter(eventModel, correlationValue.getKey());\n            correlationParameters.put(correlationValue.getKey(), correlationValue.getValue());\n        }\n\n        return CommandContextUtil.getEventRegistry().generateKey(correlationParameters);\n    }\n\n    protected void checkEventModelCorrelationParameter(EventModel eventModel, String correlationParameterName) {\n        Collection<EventPayload> correlationParameters = eventModel.getCorrelationParameters();\n        for (EventPayload correlationParameter : correlationParameters) {\n            if (correlationParameter.getName().equals(correlationParameterName)) {\n                return;\n            }\n        }\n        throw new FlowableIllegalArgumentException(\"There is no correlation parameter with name '\" + correlationParameterName + \"' defined in event model \"\n            + \"with key '\" + eventModel.getKey() + \"'. You can only subscribe for an event with a combination of valid correlation parameters.\");\n    }\n\n    protected CaseDefinition getLatestCaseDefinitionByKey(String caseDefinitionKey, String tenantId, CommandContext commandContext) {\n        CaseDefinitionEntityManager caseDefinitionEntityManager = CommandContextUtil.getCaseDefinitionEntityManager(commandContext);\n        CaseDefinition caseDefinition = null;\n        if (caseDefinitionKey != null && (tenantId == null || CmmnEngineConfiguration.NO_TENANT_ID.equals(tenantId))) {\n            caseDefinition = caseDefinitionEntityManager.findLatestCaseDefinitionByKey(caseDefinitionKey);\n\n            if (caseDefinition == null) {\n                throw new FlowableObjectNotFoundException(\"No case definition found for key '\" + caseDefinitionKey + \"'\", CaseDefinition.class);\n            }\n\n        } else if (caseDefinitionKey != null && tenantId != null && !CmmnEngineConfiguration.NO_TENANT_ID.equals(tenantId)) {\n\n            caseDefinition = caseDefinitionEntityManager.findLatestCaseDefinitionByKeyAndTenantId(caseDefinitionKey, tenantId);\n\n            if (caseDefinition == null) {","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/AbstractCaseStartEventSubscriptionCmd.java#L47-L83","documentation":"Thrown by AbstractCaseStartEventSubscriptionCmd when subscribing a case to a start event: the correlation parameter name given in the subscription request does not match any EventPayload declared in the event model's correlationParameters. Flowable validates that only correlation parameters actually defined on the event model are used, so subscriptions with unknown parameter names are rejected.","triggerScenarios":"Calling CaseRuntimeService (or the start-event subscription command path) with a correlation parameter name that is not declared in the referenced event model, typically after renaming a parameter in the event model JSON while case subscriptions still use the old name.","commonSituations":"Event model was redeployed with renamed/removed correlation parameters while case definitions or clients still pass old names; typo in parameter name; subscribing with a generic 'businessKey' style parameter the event model never declared.","solutions":["Inspect the event model JSON for the given eventModel key and use exactly the correlation parameter names declared under correlationParameters.","Redeploy an updated event model that declares the missing correlation parameter, or update the subscription code to the new names.","Log/echo the available correlation parameters for the event model key and compare against the requested name to find typos."],"exampleFix":"// before\neventSubscriptionBuilder.correlationParamValue(\"orderId\", orderId); // event model defines 'order-id'\n// after\neventSubscriptionBuilder.correlationParamValue(\"order-id\", orderId);","handlingStrategy":"validation","validationCode":"List<String> valid = eventRepositoryService.getEventModelByKey(eventKey, tenantId)\n    .getCorrelationParameters().stream().map(EventPayload::getName).collect(toList());\nif (!valid.contains(paramName)) throw new IllegalArgumentException(\"unknown correlation param \" + paramName);","typeGuard":null,"tryCatchPattern":"try { subscriptionBuilder.correlationParamValue(name, value).create(); }\ncatch (FlowableIllegalArgumentException e) { if (e.getMessage().contains(\"correlation parameter\")) { refreshEventModelDefinitions(); throw e; } }","preventionTips":["Keep event model correlation parameters in a shared constant class referenced by both event and case deployments","Version event models together with case definitions that subscribe to them"],"tags":["cmmn","event-subscription","validation"],"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-14T05:17:10.506Z"}