[CAM-9194] When querying for tasks by candidate user a group query is executed multiple times Created: 11/Jul/18  Updated: 02/Aug/18  Resolved: 12/Jul/18

Status: Closed
Project: camunda BPM
Component/s: engine
Affects Version/s: None
Fix Version/s: 7.10.0, 7.8.8, 7.9.2, 7.10.0-alpha2

Type: Bug Report Priority: L3 - Default
Reporter: Smirnov Roman Assignee: Nikola Koevski
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: Not Specified
Original Estimate: 0 minutes

Issue Links:
Depedendency

 Description   

Steps to reproduce:

  1. configure an engine with LDAP
  2. execute a TaskQuery taskService.createTaskQuery().taskCandidateUser("foo").list()

Observed Behavior:
The guards for creating the SQL statements are based on the methods TaskQueryImpl#getCandidateGroups().

The method TaskQueryImpl#getCandidateGroups() calls #getGroupsForCandidateUser(). This method queries the identity provider for the candidate user's groups, in case of LDAP. The result is not cached in the query object, so when the Mybatis mapping calls TaskQueryImpl#getCandidateGroups() a second time, it will ask LDAP a second time and so on.

Expected Behavior:
The identity provider is called only once.


Generated at Sun Jul 21 10:39:38 CEST 2019 using JIRA 6.4.6#64021-sha1:33e5b454af4594f54560ac233c30a6e00459507e.