Hope you are looking for the API for retrieving the history data. If you want to access the histry log provided by the JBPM you can use the below code
//Enabling the history Service JPAWorkingMemoryDbLogger workingMemoryDbLogger = new JPAWorkingMemoryDbLogger(knowledgeSession);// Get the JPA interface for History service JPAProcessInstanceDbLog historyService = new JPAProcessInstanceDbLog(knowledgeSession.getEnvironment());
The JPAProcessInstanceDbLog
gives the API for retrieving the available history related data
Another way to implement your on history log is to implement the ProcessEventListener , check the documentation for more details.
Cheers :)