{"record":{"id":"5c211dcee3adb35a","repo":"flowable/flowable-engine","slug":"rootscopetype-is-empty","errorCode":null,"errorMessage":"rootScopeType is empty","messagePattern":"rootScopeType 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":130,"sourceCode":"            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\");\n        }\n        this.rootScopeType = rootScopeType;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> linkType(String linkType) {\n        if (StringUtils.isEmpty(linkType)) {\n            throw new FlowableIllegalArgumentException(\"linkType is empty\");\n        }\n        this.linkType = linkType;\n        return this;\n    }\n\n    @Override\n    public InternalEntityLinkQuery<E> hierarchyType(String hierarchyType) {\n        if (StringUtils.isEmpty(hierarchyType)) {\n            throw new FlowableIllegalArgumentException(\"hierarchyType is empty\");","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-entitylink-service/src/main/java/org/flowable/entitylink/service/impl/InternalEntityLinkQueryImpl.java#L112-L148","documentation":"InternalEntityLinkQueryImpl.rootScopeType sets the root scope type filter (e.g. 'proc', 'cmmn', 'task'). It throws FlowableIllegalArgumentException when passed null or an empty string, since a root-scope-type filter must have a concrete value to be meaningful. This is fail-fast validation on the query builder.","triggerScenarios":"Calling internalEntityLinkQuery.rootScopeType(null) or rootScopeType(\"\") when constructing the query.","commonSituations":"Deriving scope type dynamically from configuration or a variable that is unset, passing the wrong variable to the builder, or a typo where an uninitialized field is fed to the query.","solutions":["Pass a valid scope type constant (e.g. ScopeTypes.PROCESS, 'cmmn', 'task') instead of the empty value.","Check where the scope type value originates and fix the source so it is populated.","Skip the rootScopeType filter entirely if the value is not available rather than passing an empty string."],"exampleFix":"// before\nquery.rootScopeType(scopeType); // scopeType may be \"\"\n// after\nif (StringUtils.isNotEmpty(scopeType)) {\n    query.rootScopeType(scopeType);\n}","handlingStrategy":"validation","validationCode":"if (rootScopeType == null || rootScopeType.isEmpty()) {\n    throw new IllegalArgumentException(\"rootScopeType must be a valid scope type\");\n}\ninternalEntityLinkQuery.rootScopeType(rootScopeType);","typeGuard":"boolean isValidScopeType(String t) { return \"proc\".equals(t) || \"cmmn\".equals(t) || \"task\".equals(t); }","tryCatchPattern":"try {\n    query.rootScopeType(scopeType);\n} catch (FlowableIllegalArgumentException e) {\n    LOG.warn(\"Empty rootScopeType, skipping filter: {}\", e.getMessage());\n}","preventionTips":["Use ScopeTypes constants instead of raw strings.","Never pass config-derived strings without checking they were loaded.","Log the filter values at debug level to spot empty ones early."],"tags":["validation","empty-argument","query-builder"],"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"}