<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: All tasks belonging to group A and B in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35698#M18769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Torak,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently there is no way of querying this in a single query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps you can try to combine 2 queries (remove the duplicates):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;Task&amp;gt; groupATasks = taskService.createTaskQuery().candidateGroup("A").list();&lt;BR /&gt;List&amp;lt;Task&amp;gt; groupBTasks = taskService.createTaskQuery().candidateGroup("B").list();&lt;BR /&gt;&lt;BR /&gt;List&amp;lt;Task&amp;gt; tasks = mergeLists(groupATasks, groupBTasks);&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jan 2011 09:27:23 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2011-01-06T09:27:23Z</dc:date>
    <item>
      <title>All tasks belonging to group A and B</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35697#M18768</link>
      <description>Hello!I wish to find all tasks that have candidate groups A and B. In other others tasks that belongs to both groups (intersection), and not only one of them.I have tried different ways, but can't find a solution, any tips?ThanksEdit - to clarify: &amp;lt;userTask id=1 activiti:candidateGroups="A"/&amp;gt;</description>
      <pubDate>Thu, 06 Jan 2011 09:16:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35697#M18768</guid>
      <dc:creator>torak</dc:creator>
      <dc:date>2011-01-06T09:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: All tasks belonging to group A and B</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35698#M18769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Torak,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently there is no way of querying this in a single query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps you can try to combine 2 queries (remove the duplicates):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;Task&amp;gt; groupATasks = taskService.createTaskQuery().candidateGroup("A").list();&lt;BR /&gt;List&amp;lt;Task&amp;gt; groupBTasks = taskService.createTaskQuery().candidateGroup("B").list();&lt;BR /&gt;&lt;BR /&gt;List&amp;lt;Task&amp;gt; tasks = mergeLists(groupATasks, groupBTasks);&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 09:27:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35698#M18769</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-01-06T09:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: All tasks belonging to group A and B</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35699#M18770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Fredrik, thanks for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would give me the union of the tasks. However, my criteria for being a candidate is to be member of all the candidate groups for the task. Do you think it's possible to get such a list?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the following code should give such a list (if there had been a getCandidateGroups method in the task class.. &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;Task&amp;gt; candiateTaskList = new ArrayList&amp;lt;Task&amp;gt;();&lt;BR /&gt;&lt;BR /&gt;for(Task task: processEngine.getTaskService().createTaskQuery().taskUnnassigned().list()){&lt;BR /&gt;&amp;nbsp; boolean memberOfAllGroups = true;&lt;BR /&gt;&amp;nbsp; for(String canidateGroup: task.getCandidateGroups()){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!userGroups.contains(canidateGroup)){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memberOfAllGroups = false;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; if(memberOfAllGroups){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; candiateTaskList.add(task);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt; }&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there way to get the candidate groups for a task?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 09:55:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35699#M18770</guid>
      <dc:creator>torak</dc:creator>
      <dc:date>2011-01-06T09:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: All tasks belonging to group A and B</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35700#M18771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Instead of creating the union of lists groupATasks and groupBTasks, creating the intersection should work… &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Querying all tasks, and running trough them to check which candidate groups the task has, can introduce performance/memory issues when a lot of tasks are present. Limiting the query by groupA and groupB limits the tasks returned…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 10:07:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35700#M18771</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-01-06T10:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: All tasks belonging to group A and B</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35701#M18772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey, you are right. I get the intersection like that. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, it would have been great if there was first-class support for OR(union) and AND(intersection) in the query framework! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Jan 2011 10:19:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/all-tasks-belonging-to-group-a-and-b/m-p/35701#M18772</guid>
      <dc:creator>torak</dc:creator>
      <dc:date>2011-01-08T10:19:35Z</dc:date>
    </item>
  </channel>
</rss>

