{"record":{"id":"d609a8cfaaaa4299","repo":"flowable/flowable-engine","slug":"invalid-query-usage-cannot-set-both-taskassigneei-d609a8","errorCode":null,"errorMessage":"Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLikeIgnoreCase","messagePattern":"Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLikeIgnoreCase","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java","lineNumber":487,"sourceCode":"            throw new FlowableIllegalArgumentException(\"Task assignee list is null\");\n        }\n        if (assigneeIds.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"Task assignee list is empty\");\n        }\n        for (String assignee : assigneeIds) {\n            if (assignee == null) {\n                throw new FlowableIllegalArgumentException(\"None of the given task assignees can be null\");\n            }\n        }\n\n        if (assignee != null) {\n            throw new FlowableIllegalArgumentException(\"Invalid query usage: cannot set both taskAssigneeIds and taskAssignee\");\n        }\n        if (assigneeLike != null) {\n            throw new FlowableIllegalArgumentException(\"Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLike\");\n        }\n        if (assigneeLikeIgnoreCase != null) {\n            throw new FlowableIllegalArgumentException(\"Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLikeIgnoreCase\");\n        }\n\n        if (orActive) {\n            currentOrQueryObject.assigneeIds = assigneeIds;\n        } else {\n            this.assigneeIds = assigneeIds;\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQueryImpl taskOwner(String owner) {\n        if (owner == null) {\n            throw new FlowableIllegalArgumentException(\"Owner is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.owner = owner;\n        } else {","sourceCodeStart":469,"sourceCodeEnd":505,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java#L469-L505","documentation":"taskAssigneeIds cannot be combined with taskAssigneeLikeIgnoreCase(String) on the same query. Like the other assignee filters, the case-insensitive LIKE variant is mutually exclusive with explicit assignee-ID matching, and Flowable throws this error to prevent contradictory criteria.","triggerScenarios":"Calling taskQuery.taskAssigneeLikeIgnoreCase(\"team-%\").taskAssigneeIds(ids) (either order) on the same TaskQuery instance.","commonSituations":"A case-insensitive search UI adding an ignore-case filter while another component sets assignee IDs; dynamic query assembly applying every set criterion without checking for conflicts.","solutions":["Remove the taskAssigneeLikeIgnoreCase(...) call when using taskAssigneeIds.","Centralize assignee filtering in one place so only a single style is applied.","Normalize assignee IDs to one case and use taskAssigneeIds, dropping the ignore-case filter."],"exampleFix":"// before\ntaskQuery.taskAssigneeLikeIgnoreCase(\"team-%\");\ntaskQuery.taskAssigneeIds(ids);\n\n// after\nif (ids != null && !ids.isEmpty()) {\n    taskQuery.taskAssigneeIds(ids);\n} else {\n    taskQuery.taskAssigneeLikeIgnoreCase(\"team-%\");\n}","handlingStrategy":"validation","validationCode":"if (assigneeIds != null && !assigneeIds.isEmpty() && assigneeLikeIgnoreCase != null) { throw new IllegalStateException(\"choose assigneeIds or assigneeLikeIgnoreCase, not both\"); }","typeGuard":"boolean conflict = assigneeLikeIgnoreCase != null && assigneeIds != null && !assigneeIds.isEmpty();","tryCatchPattern":"try {\n    applyAssigneeFilters(taskQuery, assigneeLikeIgnoreCase, assigneeIds);\n} catch (FlowableIllegalArgumentException e) {\n    if (!e.getMessage().contains(\"cannot set both taskAssigneeIds and taskAssigneeLikeIgnoreCase\")) throw e;\n    logger.error(\"Conflicting case-insensitive assignee filters\", e);\n}","preventionTips":["Normalize assignee IDs once (e.g. lowercase) and use taskAssigneeIds instead of ignore-case LIKE.","Keep a single assignee-filter code path with an explicit mode parameter.","Test queries assembled from multiple optional filter sources."],"tags":["flowable","task-query","mutually-exclusive","query-usage"],"backgroundTag":"mutually-exclusive-options","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"}