{"record":{"id":"8de63ebcc452b63c","repo":"flowable/flowable-engine","slug":"referencescopetype-is-empty","errorCode":null,"errorMessage":"referenceScopeType is empty","messagePattern":"referenceScopeType 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":112,"sourceCode":"            throw new FlowableIllegalArgumentException(\"referenceScopeId is empty\");\n        }\n        this.referenceScopeId = referenceScopeId;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> referenceScopeDefinitionId(String referenceScopeDefinitionId) {\n        if (StringUtils.isEmpty(referenceScopeDefinitionId)) {\n            throw new FlowableIllegalArgumentException(\"referenceScopeDefinitionId is empty\");\n        }\n        this.referenceScopeDefinitionId = referenceScopeDefinitionId;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> referenceScopeType(String referenceScopeType) {\n        if (StringUtils.isEmpty(referenceScopeType)) {\n            throw new FlowableIllegalArgumentException(\"referenceScopeType is empty\");\n        }\n        this.referenceScopeType = referenceScopeType;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> rootScopeId(String rootScopeId) {\n        if (StringUtils.isEmpty(rootScopeId)) {\n            throw new FlowableIllegalArgumentException(\"rootScopeId is empty\");\n        }\n        this.rootScopeId = rootScopeId;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> rootScopeType(String rootScopeType) {\n        if (StringUtils.isEmpty(rootScopeType)) {\n            throw new FlowableIllegalArgumentException(\"rootScopeType is empty\");","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-entitylink-service/src/main/java/org/flowable/entitylink/service/impl/InternalEntityLinkQueryImpl.java#L94-L130","documentation":"Fluent-setter validation in InternalEntityLinkQueryImpl.referenceScopeType: the reference scope type filter is null or empty; the builder refuses it because entity-link type discrimination requires a non-blank value.","triggerScenarios":"Calling InternalEntityLinkQuery.referenceScopeType(\"\") or referenceScopeType(null).","commonSituations":"Deriving the type of the referenced entity from data that was absent; passing an empty string default instead of a ScopeTypes constant.","solutions":["Pass a valid constant from org.flowable.common.engine.impl.scope.ScopeTypes.","Validate non-blank before invoking the query builder.","Fix the upstream data/mapping that yields the empty scope type."],"exampleFix":"// before\nquery.referenceScopeType(refType); // empty\n\n// after\nif (StringUtils.isNotBlank(refType)) {\n    query.referenceScopeType(refType).list();\n}","handlingStrategy":"validation","validationCode":"if (StringUtils.isBlank(referenceScopeType)) { throw new IllegalArgumentException(\"referenceScopeType required\"); }","typeGuard":null,"tryCatchPattern":"try {\n    links = entityLinkQuery.referenceScopeType(refType).list();\n} catch (FlowableIllegalArgumentException e) {\n    links = Collections.emptyList();\n}","preventionTips":["Use ScopeTypes constants for reference scope types","Validate inputs in a shared query-builder helper","Ensure data feeding the type field is populated before querying"],"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"}