Where all the Process Execution Variable gets stored?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2013 07:46 AM
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.
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.
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2013 08:08 AM
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,
Best regards,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2013 02:44 AM
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.
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.
