Tasklist Filter with OR criteria?

145 views
Skip to first unread message

Melissa Palmer

unread,
Apr 14, 2015, 6:12:37 AM4/14/15
to camunda-...@googlegroups.com
Hi 

I want to create a filter in the TaskList application for "My Tasks" which will include results where the currentUser is within the "assignee and candidateUsers field" 
How is this possible? If I add both as Criteria I am getting no results... I am guessing its using AND and not OR. 

Is it possible for me to get the Criteria to be an OR? I am setting this filter up programatically in the following way:
TaskQuery query = taskService.createTaskQuery().taskAssigneeExpression(CURRENT_USER_EXPRESSION).taskCandidateUserExpression(CURRENT_USER_EXPRESSION);

Thanks in advance
Melissa

hassan....@gmail.com

unread,
Apr 15, 2015, 1:11:42 AM4/15/15
to camunda-...@googlegroups.com
Yes Melissa, 'AND' operator is used.

I hope 'OR' operator will be supported soon as it is really needed to construct many requested filters.

Sebastian Menski

unread,
Apr 15, 2015, 4:23:27 AM4/15/15
to camunda-...@googlegroups.com, hassan....@gmail.com
Hi Hassan and Melissa,

the queries are AND queries and OR isn't supported currently. Also this feature isn't planned for the future as it is quite complex and cannot simple add to the current API.

@Melissa: I'm currently reviewing which allows to include assigned tasks to candidateUsers queries [1]. So if the assigned user is also part of the candidate users it could solve your use case.

Cheers,
Sebastian

Melissa Palmer

unread,
Apr 15, 2015, 5:03:55 AM4/15/15
to camunda-...@googlegroups.com
Hi Sebastian, 

I see that Jira is actually already resolved and only talks about groups .... will the changes also work for users? 

Does this mean that there is no way in Camunda 7.2 that I will be able to achieve this? 

Thanks
Melissa

Sebastian Menski

unread,
Apr 15, 2015, 5:34:34 AM4/15/15
to camunda-...@googlegroups.com
Hi Melissa,

you are correct the ticket content is quite misleading I will update it.

Currently if you create a task query with candidateUser or candidateGroup[s] only task which are not assigned are returned. This new feature will allow you to specify that the query also should
return assigned tasks.

I'm not aware of a solution how to accomplish this with 7.2.

Cheers,
Sebastian
Reply all
Reply to author
Forward
0 new messages