In old JBPM, we were able to run SQL queries using the below code.
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
org.hibernate.Session session = jbpmContext.getSession();
org.hibernate.Query queryParent = session.createSQLQuery(QUERY.toString());
In JBPM 6.0.1, using RemoteRuntimeEngine, how can we run custom queries to query JBPM tables?