AnsweredAssumed Answered

multiInstanceLoopCharacteristics and taskVariableValueEquals

Question asked by luisalves00 on Jul 6, 2011
Latest reply on Jul 6, 2011 by luisalves00
I got some tasks with multiInstanceLoopCharacteristics that I want to query with taskVariableValueEquals( … ).

<multiInstanceLoopCharacteristics isSequential="false">
   <inputDataItem name="ppItem" />

Is it possibel to do something like:

List<Task> tasks = getActivitiEngine().getTaskService().createTaskQuery().taskVariableValueEquals("", pp.getId()).list();

(return 0 results…)

or I can't "navigate" a custom object? On the task name I can do ${}

if not how can I do what I want?


<activiti:taskListener event="create" class="" />

public class SetPostoProgramacaoIdTaskListener  implements TaskListener {

    public void notify(DelegateTask dt) {
        PPTaskModel ppModel = (PPTaskModel)dt.getVariable("ppItem");
        dt.setVariableLocal("ppId", String.valueOf(ppModel.getPp().getId()));

the variable is set….but the query return 0 results:

List<Task> tasks = getActivitiEngine().getTaskService().createTaskQuery().taskVariableValueEquals("ppId", String.valueOf(pp.getId())).list();