bulk workflow variable read using rungimeService

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2013 05:15 AM
Hi,
I would like to read all the process variables in one query. Right now, i am using runtimeService.getVariable() which runs a query for each process instance id. This is too expensive for my application's performance.
is there a way i can read a particular variable from a bunch of processes in one query?
Thanks,
Raj
I would like to read all the process variables in one query. Right now, i am using runtimeService.getVariable() which runs a query for each process instance id. This is too expensive for my application's performance.
is there a way i can read a particular variable from a bunch of processes in one query?
Thanks,
Raj
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2013 05:00 AM
For this purpose it's better to use the HistoricVariableInstanceQuery. There you can query on all instances of a variables across tasks and processes.
Best regards,
Best regards,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2013 06:44 AM
Hi,
I would like the runtime variables and not Historic ones. Also, i am using Activiti 5.10 and it does not have this class. Any other alternative?
Thanks,
Raj
I would like the runtime variables and not Historic ones. Also, i am using Activiti 5.10 and it does not have this class. Any other alternative?
Thanks,
Raj

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-05-2013 08:33 AM
Historic variables also contain the runtime variables so that would make no difference. But in 5.10 this wasn't available yet.
Instead you can use the HistoricDetailQuery in a similar way and that should be available in 5.10.
Best regards,
Instead you can use the HistoricDetailQuery in a similar way and that should be available in 5.10.
Best regards,
