Hi Dan,
Because jBPM 4 did not implement variable history yet, so there is no api for query HistoryVariable. We have to use hibernate to do these query. like this:
Session session = env.get(Session.class);
List list = session.createQuery("from HistoryVariableImpl").list();