<?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: I am trying to write a taskquery which has the condition like assignee==null OR (taskUnassigned() AND taskCandidateGroupIn(list)). Can anyone help me with this. It would be a great help in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/i-am-trying-to-write-a-taskquery-which-has-the-condition-like/m-p/33946#M14349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kaustubh,&lt;/P&gt;&lt;P&gt;It does not seem appear that &lt;EM&gt;.taskAssigned(name)&amp;nbsp;&lt;/EM&gt;is a valid API to call; it appears that what you're looking for, in order for the first query to work is&amp;nbsp;&lt;A href="https://www.activiti.org/javadocs/org/activiti/engine/task/TaskQuery.html#taskCandidateOrAssigned-java.lang.String-" rel="nofollow noopener noreferrer"&gt;taskCandidateOrAssigned&lt;/A&gt;&amp;nbsp;- which selects tasks that have been claimed or assigned to user or waiting to be claimed by user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way you're utilizing&amp;nbsp;&lt;EM&gt;.or() / .endOr()&lt;/EM&gt; is correct;&amp;nbsp;&lt;EM&gt;.or()&lt;/EM&gt; is the opening for things that you're trying to&amp;nbsp;&lt;STRONG&gt;or&lt;/STRONG&gt; together, and&amp;nbsp;&lt;EM&gt;.endOr()&lt;/EM&gt; is how you close that list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your query:&lt;BR /&gt;&lt;EM&gt;TaskUnassigned&lt;/EM&gt; should cover all tasks that aren't assigned or claimed. And &lt;EM&gt;TaskCandidateGroupIn&amp;nbsp;&lt;/EM&gt;will return&amp;nbsp;&lt;SPAN style="color: #474747; background-color: #ffffff;"&gt;tasks for which the 'candidateGroup' is one of the given groups (or as you've labeled it, 'roles').&lt;BR /&gt;What result does it give you?&lt;BR /&gt;&lt;BR /&gt;-JEarles&lt;BR /&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Mar 2017 16:12:09 GMT</pubDate>
    <dc:creator>jearles</dc:creator>
    <dc:date>2017-03-22T16:12:09Z</dc:date>
    <item>
      <title>I am trying to write a taskquery which has the condition like assignee==null OR (taskUnassigned() AND taskCandidateGroupIn(list)). Can anyone help me with this. It would be a great help</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-am-trying-to-write-a-taskquery-which-has-the-condition-like/m-p/33945#M14348</link>
      <description>taskService.createTaskQuery().or().taskUnassigned().taskAssigned(name).endOr().list();I was just testing the functioning of or(). But it is behaving weird when I try to run above statement it gives me all the task which are assigned to some name and all the unassigned tasks.But when I try to run the</description>
      <pubDate>Tue, 21 Mar 2017 22:59:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-am-trying-to-write-a-taskquery-which-has-the-condition-like/m-p/33945#M14348</guid>
      <dc:creator>kbojewar</dc:creator>
      <dc:date>2017-03-21T22:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a taskquery which has the condition like assignee==null OR (taskUnassigned() AND taskCandidateGroupIn(list)). Can anyone help me with this. It would be a great help</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-am-trying-to-write-a-taskquery-which-has-the-condition-like/m-p/33946#M14349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kaustubh,&lt;/P&gt;&lt;P&gt;It does not seem appear that &lt;EM&gt;.taskAssigned(name)&amp;nbsp;&lt;/EM&gt;is a valid API to call; it appears that what you're looking for, in order for the first query to work is&amp;nbsp;&lt;A href="https://www.activiti.org/javadocs/org/activiti/engine/task/TaskQuery.html#taskCandidateOrAssigned-java.lang.String-" rel="nofollow noopener noreferrer"&gt;taskCandidateOrAssigned&lt;/A&gt;&amp;nbsp;- which selects tasks that have been claimed or assigned to user or waiting to be claimed by user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way you're utilizing&amp;nbsp;&lt;EM&gt;.or() / .endOr()&lt;/EM&gt; is correct;&amp;nbsp;&lt;EM&gt;.or()&lt;/EM&gt; is the opening for things that you're trying to&amp;nbsp;&lt;STRONG&gt;or&lt;/STRONG&gt; together, and&amp;nbsp;&lt;EM&gt;.endOr()&lt;/EM&gt; is how you close that list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your query:&lt;BR /&gt;&lt;EM&gt;TaskUnassigned&lt;/EM&gt; should cover all tasks that aren't assigned or claimed. And &lt;EM&gt;TaskCandidateGroupIn&amp;nbsp;&lt;/EM&gt;will return&amp;nbsp;&lt;SPAN style="color: #474747; background-color: #ffffff;"&gt;tasks for which the 'candidateGroup' is one of the given groups (or as you've labeled it, 'roles').&lt;BR /&gt;What result does it give you?&lt;BR /&gt;&lt;BR /&gt;-JEarles&lt;BR /&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 16:12:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-am-trying-to-write-a-taskquery-which-has-the-condition-like/m-p/33946#M14349</guid>
      <dc:creator>jearles</dc:creator>
      <dc:date>2017-03-22T16:12:09Z</dc:date>
    </item>
  </channel>
</rss>

