Get all the previously stored values for a variable


I want to get the history values for a variable. i understood historicVariableInstance will hold only the latest values but i want to get all the values for a variable. i found the history of values for a variable is being stored in act_hi_details table but i am not able to query based on variableName as there is no methods availble from historyService.createHistoricDetailQuery().

is there any way i can query differently from act_hi_Detail table based on processInstanceId and variableName to get the values?

You have to run the engine with the audit setting set to FULL. Only then all the historic values will be saved. Otherwise only the latest gets saved. Then you can use the appropriate service (history service?) to retrieve all the values.

camunda history level is full only that we have set, still variable instance is storing the variable only for the latest values.