Red Hat Bugzilla – Bug 1008824
Avoid task duplicates when querying for tasks
Last modified: 2014-04-15 20:45:23 EDT
Description of problem:
JBPM-3866 has been addressed by 'group by' at first (commit: e8fbea998621608f02cac6f8963a41a18bb80b36) but now addressed by 'distinct' (commit: 11743329deb101bbb7e26a11f7ae49afa0f24086)
Steps to Reproduce:
1. Create a process with a User Task which has both actorId (="john") and groupId (="PM")
2. Start a process and let it create a Task
3. call getTasksAssignedAsPotentialOwner with userId and groupIds
List<String> groupIds = new ArrayList<String>();
List<TaskSummary> list = localTaskService.getTasksAssignedAsPotentialOwner("john", groupIds, "en-UK");
System.out.println("list.size() = " + list.size());
list.size() = 2
list.size() = 1
Created attachment 798674 [details]
Just adding 'distinct' fails in Oracle because Oracle doesn't accept CLOB columns (name.text, subject.text, description.text) for distinct.
Need to use I18NText.shortText like implemented in master as well.
If you fix this BZ with 'distinct' + I18NText.shortText, you also need to backport BZ1018173 to BRMS 5.3.x branch because I18NText.shortText has a defect which is decribed in the BZ.
backported to 5.2.x branch:
this includes usage of distinct and change of text to shortText to all I18NText fields used in the queries.
Verified with BRMS-5.3.1-P05