Query Tasks withoutCandidateGroups=true doesn't work when process definitions with CandidateStarterGroups exists

Hello,
getting tasks with filter withoutCandidateGroups=true does not work as soon there’s a process definition using CandidateStarterGroups.
This is because the query results in:
( RES.ASSIGNEE_ is null
and RES.ID_ not in (
select
TASK_ID_
from
ACT_RU_IDENTITYLINK ARIEL
WHERE ARIEL.TYPE_ = ‘candidate’
and ARIEL.GROUP_ID_ is not null
) )

Having process definitions with CandidateStarterGroups, there are entries in ACT_RU_IDENTITYLINK
without TASK_ID, but PROC_DEF_ID.
using “not in (select {nullvalue}…)” is resulting in an empty resultset always.

I’m using 7.10, REST-Engine, Tomcat, Microsoft SQL Server.

Regards,
Bernd

Hi @Benutzername,

this is expected behavior. If you define a Candidate Starter Group on process definition level, each task belonging to this process has a candidate group.

What do you want to achieve? Could you elaborate more about your use case?

Cheers,
Tassilo

Hi Tassilo,
are you sure? Documentation says on candidateStarterGroups:The attribute specifies which group(s) will be able to start the process.
I don’t see any effect on belonging tasks, they have their own candidateGroups…and this is working as expected…

Regarding my problem, the tasks do not need to belong to the process having a CandidateStarterGroup, I think it’s a wrong sql-query, it’s the way mssql handles null-values in " not in () " statements,
maybe using “not exists”, “ISNULL(TASK_ID_,’ ')” , “WHERE TASK_ID_ IS NOT NULL” or “PROC_DEF_ID_ IS NULL” might help.

again, it’s no special use case, it’s just querying for tasks “withoutCandidateGroups=true”,
I don’t understand why the red-marked rows affect my query for tasks:


([ACT_RU_IDENTITYLINK])
There are several Tasks with id’s different than the ones in the green rectangle, so I expect to retrieve these Tasks when querying. And these Tasks do not belong to the process definitions in the red rectangle. As soon the process definition is removed, the task query works as expected.

Thanks,
Bernd

Hi @Benutzername,

I face this behavior not exclusively with Microsoft SQL Server. For instance, with H2 it behaves the same.

Cheers,
Tassilo

Hi Tassilo,
ok, but is it still expected behavior?
If yes, what’s the deal with “withoutCandidateStarterGroups”? when/how to use it?
How do I filter Tasks without any candidate groups using REST?

Thanks,
Bernd