{"record":{"id":"44e6533479df02c7","repo":"flowable/flowable-engine","slug":"keylike-is-null-44e653","errorCode":null,"errorMessage":"keyLike is null","messagePattern":"keyLike is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnDeploymentQueryImpl.java","lineNumber":157,"sourceCode":"            throw new FlowableIllegalArgumentException(\"parentDeploymentIdLike is null\");\n        }\n        this.parentDeploymentIdLike = parentDeploymentIdLike;\n        return this;\n    }\n\n    @Override\n    public DmnDeploymentQueryImpl decisionKey(String key) {\n        if (key == null) {\n            throw new FlowableIllegalArgumentException(\"key is null\");\n        }\n        this.decisionKey = key;\n        return this;\n    }\n\n    @Override\n    public DmnDeploymentQueryImpl decisionKeyLike(String keyLike) {\n        if (keyLike == null) {\n            throw new FlowableIllegalArgumentException(\"keyLike is null\");\n        }\n        this.decisionKeyLike = keyLike;\n        return this;\n    }\n\n    // sorting ////////////////////////////////////////////////////////\n\n    @Override\n    public DmnDeploymentQuery orderByDeploymentId() {\n        return orderBy(DeploymentQueryProperty.DEPLOYMENT_ID);\n    }\n\n    @Override\n    public DmnDeploymentQuery orderByDeploymentTime() {\n        return orderBy(DeploymentQueryProperty.DEPLOY_TIME);\n    }\n\n    @Override","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnDeploymentQueryImpl.java#L139-L175","documentation":"DmnDeploymentQueryImpl.decisionKeyLike(String) throws FlowableIllegalArgumentException when the like-pattern argument is null. The value is inserted into a SQL LIKE clause, so Flowable requires a non-null string pattern and fails fast at the builder call.","triggerScenarios":"Calling dmnRepositoryService.createDeploymentQuery().decisionKeyLike(null), commonly when the pattern is composed from optional user filter input that was never populated.","commonSituations":"Wildcard search screens where the user did not enter a decision-key filter; dynamically assembled patterns where an intermediate variable was null; porting queries from process-engine code that allowed null like-criteria.","solutions":["Pass a non-null LIKE pattern such as \"prefix%\" or \"%suffix%\"","Skip the decisionKeyLike(...) call when no filter is intended","Normalize empty user input to null-and-skip semantics before building the query"],"exampleFix":"// before\nString pattern = searchForm.getDecisionKeyPattern();\nquery.decisionKeyLike(pattern);\n// after\nString pattern = searchForm.getDecisionKeyPattern();\nif (pattern != null && !pattern.isEmpty()) {\n    query.decisionKeyLike(pattern);\n}","handlingStrategy":"validation","validationCode":"if (decisionKeyLike == null || decisionKeyLike.isEmpty()) { throw new IllegalArgumentException(\"decisionKeyLike pattern required\"); }","typeGuard":"boolean isUsablePattern(String p) { return p != null && !p.isEmpty(); }","tryCatchPattern":"try { query.decisionKeyLike(pattern); } catch (FlowableIllegalArgumentException e) { log.debug(\"decisionKeyLike not applied: {}\", e.getMessage()); }","preventionTips":["Treat empty search inputs as 'omit filter', not as null passed to the builder","Centralize pattern-building logic in one helper that guarantees non-null output or skips the filter"],"tags":["flowable","dmn","query","like-pattern","null-check"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}