{"record":{"id":"13715acc70e1d383","repo":"flowable/flowable-engine","slug":"at-least-one-correlation-parameter-value-must-be-p-13715a","errorCode":null,"errorMessage":"At least one correlation parameter value must be provided for a dynamic process start event subscription, otherwise the process would get started on all events, regardless their correlation parameter values.","messagePattern":"At least one correlation parameter value must be provided for a dynamic process start event subscription, otherwise the process would get started on all events, regardless their correlation parameter values\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/runtime/ProcessInstanceStartEventSubscriptionBuilderImpl.java","lineNumber":98,"sourceCode":"    }\n\n    public String getTenantId() {\n        return tenantId;\n    }\n\n    @Override\n    public EventSubscription subscribe() {\n        checkValidInformation();\n        return runtimeService.registerProcessInstanceStartEventSubscription(this);\n    }\n\n    protected void checkValidInformation() {\n        if (StringUtils.isEmpty(processDefinitionKey)) {\n            throw new FlowableIllegalArgumentException(\"The process definition must be provided using the key for the subscription to be registered.\");\n        }\n\n        if (correlationParameterValues.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\n                \"At least one correlation parameter value must be provided for a dynamic process start event subscription, \"\n                    + \"otherwise the process would get started on all events, regardless their correlation parameter values.\");\n        }\n    }\n}\n","sourceCodeStart":80,"sourceCodeEnd":104,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/runtime/ProcessInstanceStartEventSubscriptionBuilderImpl.java#L80-L104","documentation":"checkValidInformation also requires at least one correlation parameter value; without one, every incoming start event would trigger a new process instance, which Flowable forbids. It throws FlowableIllegalArgumentException when correlationParameterValues is empty at subscribe() time.","triggerScenarios":"Calling subscribe() without any correlationValue(...) calls; passing an empty map; all correlation values set conditionally and skipped at runtime.","commonSituations":"Event-driven start scenarios where correlation data depends on payload fields that were absent; examples followed incompletely; generic subscription builders parameterized with dynamic (possibly empty) correlation sets.","solutions":["Add at least one .correlationValue(name, value) (or correlation values map) before subscribe().","Validate the correlation map is non-empty at startup and fail fast with a clear message.","Ensure the event payload fields used for correlation are actually populated."],"exampleFix":"// before\nMap<String, Object> corr = extractCorrelations(event); // may be empty\nvar b = runtimeService.createProcessInstanceStartEventSubscriptionBuilder()\n    .processDefinitionKey(\"orderProcess\");\ncorr.forEach(b::correlationValue);\nb.subscribe(); // throws when empty\n// after\nMap<String, Object> corr = extractCorrelations(event);\nif (corr.isEmpty()) {\n    throw new IllegalStateException(\"No correlation values for start subscription\");\n}\nvar b = runtimeService.createProcessInstanceStartEventSubscriptionBuilder()\n    .processDefinitionKey(\"orderProcess\");\ncorr.forEach(b::correlationValue);\nb.subscribe();","handlingStrategy":"validation","validationCode":"if (correlationValues == null || correlationValues.isEmpty()) throw new IllegalArgumentException(\"at least one correlation value required\");","typeGuard":"boolean hasCorrelations(Map<String, Object> m) { return m != null && !m.isEmpty(); }","tryCatchPattern":"try {\n    subscriptionBuilder.subscribe();\n} catch (FlowableIllegalArgumentException e) {\n    log.error(\"Subscription rejected: {}\", e.getMessage());\n    throw e;\n}","preventionTips":["Enforce at least one correlationValue before subscribe().","Validate event payload fields used for correlation are populated.","Guard dynamic correlation maps extracted from external payloads against emptiness.","Test subscriptions with empty-payload events to catch the condition early."],"tags":["java","flowable","event-subscription","correlation","validation"],"backgroundTag":"missing-required-argument","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"}