{"record":{"id":"55fe6387fb3c3b87","repo":"flowable/flowable-engine","slug":"the-process-definition-must-be-provided-using-the-55fe63","errorCode":null,"errorMessage":"The process definition must be provided using the exact id of the version the subscription was registered for.","messagePattern":"The process definition must be provided using the exact id of the version the subscription was registered for\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/runtime/ProcessInstanceStartEventSubscriptionDeletionBuilderImpl.java","lineNumber":87,"sourceCode":"    }\n\n    public boolean hasCorrelationParameterValues() {\n        return correlationParameterValues.size() > 0;\n    }\n\n    public Map<String, Object> getCorrelationParameterValues() {\n        return correlationParameterValues;\n    }\n\n    @Override\n    public void deleteSubscriptions() {\n        checkValidInformation();\n        runtimeService.deleteProcessInstanceStartEventSubscriptions(this);\n    }\n\n    protected void checkValidInformation() {\n        if (StringUtils.isEmpty(processDefinitionId)) {\n            throw new FlowableIllegalArgumentException(\"The process definition must be provided using the exact id of the version the subscription was registered for.\");\n        }\n    }\n}\n","sourceCodeStart":69,"sourceCodeEnd":91,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/runtime/ProcessInstanceStartEventSubscriptionDeletionBuilderImpl.java#L69-L91","documentation":"FlowableIllegalArgumentException thrown by ProcessInstanceStartEventSubscriptionDeletionBuilderImpl.checkValidInformation when deleting process instance start event subscriptions without a processDefinitionId. Subscriptions are bound to a specific process definition version, so the exact id of that version is mandatory to identify which subscriptions to delete.","triggerScenarios":"Calling ProcessInstanceStartEventSubscriptionDeletionBuilder.deleteSubscriptions() (via runtimeService.createProcessInstanceStartEventSubscriptionDeletionBuilder()) without first calling processDefinitionId(String).","commonSituations":"Building the deletion builder dynamically from variables that may be null/empty; passing a process definition KEY instead of the version-specific id; confusing processDefinitionId with processDefinitionKey after a redeployment changed version ids.","solutions":["Call .processDefinitionId(<exact id>) on the deletion builder before invoking deleteSubscriptions().","Fetch the exact id via repositoryService.createProcessDefinitionQuery().processDefinitionKey(key).latestVersion().singleResult().getId().","Guard the id: only build and execute the deletion when the id is non-empty."],"exampleFix":"// before\nruntimeService.createProcessInstanceStartEventSubscriptionDeletionBuilder()\n    .deleteSubscriptions();\n\n// after\nString processDefinitionId = repositoryService.createProcessDefinitionQuery()\n    .processDefinitionKey(\"myProcess\").latestVersion().singleResult().getId();\nruntimeService.createProcessInstanceStartEventSubscriptionDeletionBuilder()\n    .processDefinitionId(processDefinitionId)\n    .deleteSubscriptions();","handlingStrategy":"validation","validationCode":"if (processDefinitionId == null || processDefinitionId.isEmpty()) {\n    throw new IllegalArgumentException(\"processDefinitionId required before deleteSubscriptions()\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    builder.processDefinitionId(id).deleteSubscriptions();\n} catch (FlowableIllegalArgumentException e) {\n    log.error(\"subscription deletion aborted: {}\", e.getMessage());\n}","preventionTips":["Always resolve the id via a ProcessDefinitionQuery, never from user input keys","Validate non-empty before entering the builder chain","Distinguish processDefinitionId vs processDefinitionKey in your service layer API"],"tags":["flowable","validation","process-definition","event-subscription"],"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-18T11:17:12.947Z"}