Hi,
i am trying to get inside startEvent Listener get process Historic Instance. As i understood it doesn't insert in historic table until Process instances completes. historicProcessInstance returns null.
ExecutionEntity executionEntity = (ExecutionEntity) execution;
ExecutionEntity processInstance = executionEntity.getProcessInstance();
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
HistoryService historyService = processEngine.getHistoryService();
String processInstanceId = processInstance.getProcessInstanceId();
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();