-
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.
This is the controller panel for Smart Panels app
[CAM-14388] Server error on filtering by user groups
Assignee | New: Nikola Koevski [ nikola.koevski ] |
Description |
Original:
h3. Environment (Required on creation):
camunda ce 7.15.0 ( sprng boot ) linux / windows / docker, does not matter h3. 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 !image-2022-02-21-14-20-11-611.png! h3. Steps to reproduce (Required on creation): * create user with tasklist permission * create filter with criteria ( Candidate Groups / ${currentUserGroups()} ) * assign fgilter to all usesrs * login with new user and open the filet * ERROR: 500 error responded and shown in tasklist * proposed: no error, just no entries like for other filters with info box h3. Observed Behavior (Required on creation): page shows an error in the tasklist ( 500 error on server response ) h3. Expected behavior (Required on creation): no error, just no entries like for other filters with info box h3. Root Cause (Required on prioritization): the filter criteria on evaluation fetch all groups of a user which is 0 for the user but the funtion "org.camunda.bpm.engine.impl.TaskQueryImpl#taskCandidateGroupIn" check if the input list of groups is not empty due to the user has no groups, it assert to false and throws an exception h3. Solution Ideas (Optional): propose to return an empty list instead ( but no idea where in the code at the moment :) ) h3. Hints (optional): 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 |
New:
h3. Environment (Required on creation):
camunda ce 7.15.0 ( sprng boot ) linux / windows / docker, does not matter h3. 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 !image-2022-02-21-14-20-11-611.png! h3. Steps to reproduce (Required on creation): * create user with tasklist permission * create filter with criteria ( Candidate Groups / ${currentUserGroups()} ) * assign fgilter to all usesrs * login with new user and open the filet * ERROR: 500 error responded and shown in tasklist * proposed: no error, just no entries like for other filters with info box h3. Observed Behavior (Required on creation): page shows an error in the tasklist ( 500 error on server response ) h3. Expected behavior (Required on creation): no error, just no entries like for other filters with info box h3. Root Cause (Required on prioritization): the filter criteria on evaluation fetch all groups of a user which is 0 for the user but the funtion "org.camunda.bpm.engine.impl.TaskQueryImpl#taskCandidateGroupIn" check if the input list of groups is not empty due to the user has no groups, it assert to false and throws an exception h3. Solution Ideas (Optional): propose to return an empty list instead ( but no idea where in the code at the moment :) ) h3. Hints (optional): {code} 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 {code} |
Mentioned Roles |
Mentioned Groups |
Mentioned Roles |
Mentioned Groups |
Mentioned Roles |
Mentioned Groups |
Hi schaefer,
Thank you for reporting this. I successfully reproduced the bug and I will forward it for scheduling.
Best,
Nikola