cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a variable while sending a signal to a ReceiveTask !

meditel
Champ in-the-making
Champ in-the-making
Hi,

Is it possible to add a new variable to the execution while sending a signal to a ReceiveTask ? and how ?


ProcessInstanceQuery piq = runtimeService.createProcessInstanceQuery().processInstanceBusinessKey("bkey2");
ProcessInstance pi = piq.singleResult();
        Execution execution = runtimeService.createExecutionQuery().processInstanceId(pi.getId())
              .activityId("myReceiveTask")
              .singleResult();
       
        runtimeService.signal(execution.getId());

Till here the signal is working well, but we need to add a variable 'result' to the execution ! and can't find how to do it !

Any hints are welcome !

BR,
Meditel
1 REPLY 1

meditel
Champ in-the-making
Champ in-the-making
My question was a stupid one :

runtimeService.setVariable(execution.getId(), "result", "OK");

BR,
Meditel