cancel
Showing results for 
Search instead for 
Did you mean: 

loopCounter in Callactivity??

tanxu1213
Champ in-the-making
Champ in-the-making
Hi.
   I have a question like this:
   There is a callactivity and there is a userTask in the callactivity.And,i have a taskListener on this userTask .
   why can not i get the variable 'loopCounter' in the taskListener?

   Thanks for your support.
  
   taskListener:
   public void notify(DelegateTask delegateTask) {
      Integer loopCounter = (Integer)delegateTask.getVariable("loopCounter");
   }
2 REPLIES 2

jaiwo99
Champ in-the-making
Champ in-the-making
I have the same problem, can someone help with that?

i can a call-activity, which is a multi-instance subprocess, I cannot get the variable 'loopCounter' in the callactiviti.

@Override
public void notify(DelegateExecution execution) throws Exception {
  System.out.println("Listener fired!");
  int i = (Integer) execution.getVariable("loopCounter");
  System.out.println("LOOP Counter fired: "+ i);
}

edgarjoao
Champ in-the-making
Champ in-the-making
Hi guys,
I dont see multi-instance notation in your process image. This link might help you
http://www.activiti.org/userguide/?_ga=1.55399981.707569032.1428782984#bpmnMultiInstance

Regards