cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to query for variable in History

frank41
Champ in-the-making
Champ in-the-making
Hi all !
I'm trying to query for a process variable value- since the process has ended at the time of the Query, I'm using the History Service.
So I guess I'd need first HistoricDetail:

   List<HistoricDetail> details = historyService.createHistoricDetailQuery().processInstanceId(procId).list();

However the details' list is empty. Do you have any idea that brings me in the right direction?
Thanks
Frank
4 REPLIES 4

martin_grofcik
Confirmed Champ
Confirmed Champ
I hope, following snippet from the test could help you:



      List<HistoricProcessInstance> instanceList = historyService.createHistoricProcessInstanceQuery().includeProcessVariables().list();


Martin

frank41
Champ in-the-making
Champ in-the-making
Thanks for your reply, however in the release of Activiti (5.11) I'm using I cannot find the method includeProcessVariables() in the HistoricProcessInstanceQuery() 😞

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Frank,

Can you cherry-pick this feature?

Martin

martin_grofcik
Confirmed Champ
Confirmed Champ
Another possibility is to use native queries. 5.11 supports them.