Hi all Activiti users,
I've some troubles when recovering one process variable set within a Service task.
As I understand from the API, I need the executionId in order to get a variable:
runtimeService.getVariable(execId,"myvar");
However the following code give me a NPE:
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("Process1",params);
Execution exec1 = runtimeService
.createExecutionQuery()
.processInstanceId(processInstance.getId())
.singleResult();
System.out.println(exec1); // Null!
Do you have any hint to solve this issue ???
Thanks
Frank