What is the Relations between the tables where we are storing camunda meta data

Hi @Thanuja_Vadlamudi,

the first statement returns a list of process instances and the second one returns a list of variables.

Hope that helps, Ingo

Hi @Ingo_Richtsmeier,

I need list of process instances which are having the parentProcessInstanceId value XXXX.
Is there anything wrong in the below call or order of calling the methods. It is giving the empty list.

runtimeService.createProcessInstanceQuery().matchVariableNamesIgnoreCase().variableValueLike(ā€œparentProcessInstanceIdā€, XXXX).list();

Regards,
Thanuja.

Hi @Ingo_Richtsmeier,

Kindly ignore the above message.

It is mentioned that At least historicProcessInstanceIds or historicProcessInstanceQuery has to be provided. If both are provided, all instances matching query criterion and instances from the list will be updated with a removal time.
https://docs.camunda.org/manual/7.14/reference/rest/history/process-instance/post-process-instance-set-removal-time/

If I donā€™t pass historicProcessInstanceQuery, It is giving the error that historicProcessInstances is empty. I am facing the same issue in the below call.

execution.getProcessEngineServices().getHistoryService().setRemovalTimeToHistoricProcessInstances().absoluteRemovalTime(calendar.getTime()).byIds(processInstanceIds.toString()).executeAsync();

Do I need to include .byQuery( historyService.createHistoricBatchQuery()) in the above code. If I include, All instances matching query criterion and instances from the list will be updated. we just need only instances from the list will be updated

Kindly clarify this scenario.

HI @Ingo_Richtsmeier,

Could you clarify the above query.

execution.getProcessEngineServices().getHistoryService().setRemovalTimeToHistoricProcessInstances().absoluteRemovalTime(calendar.getTime()).byIds(processInstanceIds.toString()).executeAsync();

If I donā€™t include .byQuery( execution.getProcessEngineServices().getHistoryService().createHistoricProcessInstanceQuery()) in the above call, It is throwing an error - historicProcessInstances is empty. If I include .byQuery( execution.getProcessEngineServices().getHistoryService().createHistoricProcessInstanceQuery()), It is taking lot of time to execute this call to fetch all process instances because getHistoryService().createHistoricProcessInstanceQuery() is trying to fetch all the process instances.

Can I use in the below way
execution.getProcessEngineServices().getHistoryService().setRemovalTimeToHistoricProcessInstances()
.absoluteRemovalTime(calendar.getTime()).byQuery(execution.getProcessEngineServices()
.getHistoryService().createHistoricProcessInstanceQuery().processInstanceIds(processInstanceIdsSet)).byIds(processInstanceIds.toString()).executeAsync();
}
Regards,
Thanuja.