-
1. Re: API to query process instances by variable
swiderski.maciej May 22, 2014 3:52 AM (in response to hugues.bernard)take a look at AuditLogService which might be useful for your case. Here is the default implementation which you need to use to get data from data base.
HTH
-
2. Re: API to query process instances by variable
anindyas79 Jun 17, 2014 5:29 AM (in response to hugues.bernard)As Maciej pointed out check the public List<VariableInstanceLog> findVariableInstancesByNameAndValue(String variableId, String value, boolean onlyActiveProcesses) in JPAAuditLogService
Here you have to just tweak this query to return ProcessInstanceLog instead of VariableInstanceLog
query = em.createQuery(
"SELECT v "
+ "FROM VariableInstanceLog v, ProcessInstanceLog p "
+ "WHERE v.processInstanceId = p.processInstanceId "
+ "AND v.variableId = :variableId "
+ "AND v.value = :value "
+ "AND p.end is null "
+ "ORDER BY v.date");