cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get access to execution variables outside of a service task>

sirreginald
Champ in-the-making
Champ in-the-making
I'm new to activiti so apologies if the answer to this is obvious. In a service task I use execution.getVariable().
I need to get execution variables inside a servlet. I tried using:


Execution execution = processEngine.getRuntimeService().createExecutionQuery()
               .processInstanceId(processId)
               .singleResult();

execution.getVariable(propertyId);



But it says that getVariable isn't a method for execution.
1 REPLY 1

martin_grofcik
Confirmed Champ
Confirmed Champ
try to use process instance query with

  /**
   * Include process variables in the process query result
   */
  ProcessInstanceQuery includeProcessVariables();

Regards
Martin