}
@SuppressWarnings("unchecked")
public static List<NodeInstanceLog> findNodeInstances(long processInstanceId, String nodeId) {
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
List<NodeInstanceLog> result = session.createQuery(
"from NodeInstanceLog as log where log.processInstanceId = ? and log.nodeId = ?")
.setLong(0, processInstanceId)
.setString(1, nodeId).list();
session.getTransaction().commit();