select ahp .business_key_ ,aha.* from act_hi_procinst ahp join act_hi_actinst aha on ahp.proc_inst_id_ = aha.proc_inst_id_ where aha.act_name_ = 'Error'
How to get the above query result through java in my flowable implementation ? I have written below code but i need business key from HistoricProcessInstance. Is there any existing implementation in flowable API by joining HistoricActivityInstance and HistoricProcessInstance ?
private final HistoryService historyService;
public void flowableRerunTask() {
List<HistoricActivityInstance> list = historyService.createHistoricActivityInstanceQuery().activityName("Error").list();
list.forEach(historicActivityInstance -> {
if (historicActivityInstance.getActivityId() == "some") {
// will do some operation based on BusinessKey which i need to get it from HistoricProcessInstance
}
});
}