-
Bug Report
-
Resolution: Unresolved
-
L3 - Default
-
None
-
7.16.0, 7.17.0, 7.15.0
-
None
Environment (Required on creation):
- Camunda Platform CE 7.15.0 ( spring boot )
- linux / windows / docker, does not matter
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
When creating a global filter which filter for by criteria ( canditate groups / ${currentUserGroups()} )
and the filter is permitted for everyone, a user who has logged in just having permission to tasklist but not assigned to any group, get a 500 error on accessing this filter
Steps to reproduce (Required on creation):
- Create a user with tasklist permission
- Create a filter with criteria ( Candidate Groups / ${currentUserGroups()} )
- Assign the filter to all users
- Login with new user and open the filter
Observed Behavior (Required on creation):
ERROR: response code 500 responded and shown in Tasklist.
The following error is shown in the logs:
org.camunda.bpm.engine.ProcessEngineException: Unable to invoke method 'taskCandidateGroupIn' on class 'org.camunda.bpm.engine.impl.TaskQueryImpl' at org.camunda.bpm.engine.impl.AbstractQuery.evaluateExpressions(AbstractQuery.java:292) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.AbstractQuery.evaluateExpressionsAndExecuteList(AbstractQuery.java:218) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.AbstractQuery.executeResult(AbstractQuery.java:168) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.AbstractQuery.listPage(AbstractQuery.java:150) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.cmd.ExecuteFilterListPageCmd.execute(ExecuteFilterListPageCmd.java:51) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.cmd.ExecuteFilterListPageCmd.execute(ExecuteFilterListPageCmd.java:29) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) ~[camunda-engine-7.15.0.jar:7.15.0] ... Caused by: java.lang.reflect.InvocationTargetException: null at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.camunda.bpm.engine.impl.AbstractQuery.evaluateExpressions(AbstractQuery.java:290) ~[camunda-engine-7.15.0.jar:7.15.0] ... 151 common frames omitted Caused by: org.camunda.bpm.engine.ProcessEngineException: Candidate group list is empty at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na] at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[na:na] at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:394) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:126) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:119) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:109) ~[camunda-engine-7.15.0.jar:7.15.0] at org.camunda.bpm.engine.impl.TaskQueryImpl.taskCandidateGroupIn(TaskQueryImpl.java:465) ~[camunda-engine-7.15.0.jar:7.15.0] ... 156 common frames omitted
Expected behavior (Required on creation):
No error, just no entries like for other filters.
Root Cause (Required on prioritization):
There is a ensureNotEmpty validation in the org.camunda.bpm.engine.impl.TaskQueryImpl#taskCandidateGroupIn method (ref). When there are no candidate groups, the ensureNotEmpty validation asserts to false and throws an exception.
Solution Ideas (Optional):
- Remove the ensureNotEmpty validation since it is only present for the TaskQueryImpl#taskCandidateGroupIn method.
- Adjust the task mapping to ensure we are not joining the identity table when the list is empty
- Add a new API for tasklist filters regarding TaskQueryImpl#taskCandidateGroupIn that would allow for empty lists.
Hi schaefer,
Thank you for reporting this. I successfully reproduced the bug and I will forward it for scheduling.
Best,
Nikola