cancel
Showing results for 
Search instead for 
Did you mean: 

Where all the Process Execution Variable gets stored?

monika_b
Champ in-the-making
Champ in-the-making
After referring to your example I have a Java service task as below. please tell me where can I expect the "var1" with Value to be stored with this particular process instance? My project requirement needs to get this variable with value stored somewhere in activiti DB and later we can update this value which will trigger a conditional sequence flow. Is this possible first?  Also, I was expecting this variable to be stored in ACT_RU_VARIABLE. I am new to activiti. Please help.


public class JavaServiceTask2 implements JavaDelegate
{
   private Expression text1;
   
   @Override
   public void execute(DelegateExecution execution) throws Exception {
      
      String value1 = (String) text1.getValue(execution);
       execution.setVariable("var1", new StringBuffer(value1).reverse().toString());      
   }
}

Many thanks for any help.
2 REPLIES 2

trademak
Star Contributor
Star Contributor
It's stored in the ACT_RU_VARIABLE table if the process instance is still running. Otherwise you'll have to look in the history tables. Isn't it easier to use the Activiti API to access the variable value, instead of going directly to the database?

Best regards,

monika_b
Champ in-the-making
Champ in-the-making
Thanks lot for help.

Yes I figured out it gets saved in ACT_HI_VARINST.  And Yes I am using the activiti Query API (HistoricVariableInstance etc) to fetch the process variables.