{"record":{"id":"319554dd1fde9ae9","repo":"flowable/flowable-engine","slug":"scopedefinitionid-is-empty","errorCode":null,"errorMessage":"scopeDefinitionId is empty","messagePattern":"scopeDefinitionId is empty","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-entitylink-service/src/main/java/org/flowable/entitylink/service/impl/InternalEntityLinkQueryImpl.java","lineNumber":76,"sourceCode":"            throw new FlowableIllegalArgumentException(\"scopeId is empty\");\n        }\n        this.scopeId = scopeId;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> scopeIds(Collection<String> scopeIds) {\n        if (scopeIds == null || scopeIds.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"scopeIds is empty\");\n        }\n        this.scopeIds = scopeIds;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> scopeDefinitionId(String scopeDefinitionId) {\n        if (StringUtils.isEmpty(scopeDefinitionId)) {\n            throw new FlowableIllegalArgumentException(\"scopeDefinitionId is empty\");\n        }\n        this.scopeDefinitionId = scopeDefinitionId;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> scopeType(String scopeType) {\n        if (StringUtils.isEmpty(scopeType)) {\n            throw new FlowableIllegalArgumentException(\"scopeType is empty\");\n        }\n        this.scopeType = scopeType;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> referenceScopeId(String referenceScopeId) {\n        if (StringUtils.isEmpty(referenceScopeId)) {\n            throw new FlowableIllegalArgumentException(\"referenceScopeId is empty\");","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-entitylink-service/src/main/java/org/flowable/entitylink/service/impl/InternalEntityLinkQueryImpl.java#L58-L94","documentation":"FlowableIllegalArgumentException thrown by InternalEntityLinkQueryImpl.scopeDefinitionId when the supplied scope definition id is null or empty. The query requires a non-empty definition id to filter entity links by scope definition.","triggerScenarios":"Calling InternalEntityLinkQuery.scopeDefinitionId(\"\") or scopeDefinitionId(null).","commonSituations":"The process/case definition id was not resolved (e.g. deployment lookup failed) before building the query; passing an empty default value from configuration.","solutions":["Validate the definition id is non-blank before building the query.","Ensure the definition was deployed and its id retrieved via the repository service.","Conditionally apply the filter only when the id exists."],"exampleFix":"// before\nquery.scopeDefinitionId(defId).list();\n\n// after\nif (StringUtils.isNotBlank(defId)) {\n    query.scopeDefinitionId(defId).list();\n}","handlingStrategy":"validation","validationCode":"if (StringUtils.isBlank(scopeDefinitionId)) { throw new IllegalArgumentException(\"scopeDefinitionId required\"); }","typeGuard":null,"tryCatchPattern":"try {\n    links = entityLinkQuery.scopeDefinitionId(defId).list();\n} catch (FlowableIllegalArgumentException e) {\n    links = Collections.emptyList();\n}","preventionTips":["Resolve definition ids from the repository service before querying","Validate non-blank inputs in a shared query-builder helper","Avoid empty-string defaults in configuration"],"tags":["entitylink","query","validation"],"backgroundTag":"empty-required-field","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"}