The HistoricProcessInstanceQuery has a method .includeProcessVariables but no methods like .processVariableEquals(). What's the reason this is not included?
Can I use something else to query only the finished processes which contain a certain process variable?
It's clear to me you can query with the API and native queries. However, in my case the API does not provide what I need and I'm a bit in the dark which native query to write. I did not find any documentation about what each table contains, like: does ACT_RU_VARIABLE hold both task local and proces variables? And how to differentiate them? Which relation do the have to the history tables?
ACT_RU_VARIABLE has task_id_, process_instance_id_, execution_id_ these keys reference task, execution, process_instance. History tables have the same keys. (History tables store only information from the past and runtime tables store current state of the engine)
To get deeper knowledge about activiti DB structures I would suggest to dig into the activiti sources. Regards Martin