AnsweredAssumed Answered

Problem with CreateTaskQuery with multiple taskVariables

Question asked by omkarrege on Jan 8, 2014
Latest reply on Jan 17, 2014 by jbarrez
hi,

My task contains certain local variables (String)

Its getting stored in ACT_RU_VARIABLES table in DB.

e.g.

Name_                | Text_                | task_id_
CustName1        | CustVal1           | 101
CustName2        | CustVal2           | 101
CustName3        | CustVal3           | 101
CustName1        | CustVal1           | 102
CustName2        | CustVal2           | 102


I want to retrieve the tasks based on following criteria
Tasks having Name_ as CustName1  and value as CustVal1  and  Name_ as CustName2  and value as CustVal2  
     
I am using  createTaskQuery but it is not retrieving tasks. I am expecting task_ids 101, 102 to be retrieved..

Statement in JAVA code is as below
List<Task> myTask_1 = taskService.createTaskQuery().taskVariableValueEquals("CustName1", "CustVal1").taskVariableValueEquals("CustName2", "CustVal2").list();


I am not able to form the native query for this which i feel would become complex.

Can you suggest what can be done in this case?
Is something wrong with the code i have written?  why its not retrieving the tasks?
Please advise.

Omkar

Outcomes