{"record":{"id":"060a2cb3dd99c0a4","repo":"flowable/flowable-engine","slug":"invalid-query-usage-cannot-set-both-tasknamein-an-060a2c","errorCode":null,"errorMessage":"Invalid query usage: cannot set both taskNameIn and taskNameLikeIgnoreCase","messagePattern":"Invalid query usage: cannot set both taskNameIn and taskNameLikeIgnoreCase","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java","lineNumber":752,"sourceCode":"    }\n\n    @Override\n    public HistoricTaskInstanceQuery taskNameIn(Collection<String> taskNameList) {\n        if (taskNameList == null) {\n            throw new FlowableIllegalArgumentException(\"Task name list is null\");\n        }\n        if (taskNameList.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"Task name list is empty\");\n        }\n\n        if (taskName != null) {\n            throw new FlowableIllegalArgumentException(\"Invalid query usage: cannot set both taskNameIn and taskName\");\n        }\n        if (taskNameLike != null) {\n            throw new FlowableIllegalArgumentException(\"Invalid query usage: cannot set both taskNameIn and taskNameLike\");\n        }\n        if (taskNameLikeIgnoreCase != null) {\n            throw new FlowableIllegalArgumentException(\"Invalid query usage: cannot set both taskNameIn and taskNameLikeIgnoreCase\");\n        }\n\n        if (inOrStatement) {\n            currentOrQueryObject.taskNameList = taskNameList;\n        } else {\n            this.taskNameList = taskNameList;\n        }\n        return this;\n    }\n\n    @Override\n    public HistoricTaskInstanceQuery taskNameInIgnoreCase(Collection<String> taskNameList) {\n        if (taskNameList == null) {\n            throw new FlowableIllegalArgumentException(\"Task name list is null\");\n        }\n        if (taskNameList.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"Task name list is empty\");\n        }","sourceCodeStart":734,"sourceCodeEnd":770,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java#L734-L770","documentation":"Query usage conflict in HistoricTaskInstanceQuery.taskNameIn: the taskNameLikeIgnoreCase criterion is already set on the same query, and combining it with an IN-list of names would be ambiguous, so the call is rejected.","triggerScenarios":"Thrown at modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java:752 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only one task-name filter per query","Reset or rebuild the query instead of stacking name filters","Combine alternatives with or() if an inclusive match is intended"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}