Community

[jbpm 4.2] Finding a Process Instance

reply from Teofilo Copa in jBPM - View the full discussion

Hi at all when iam trying this:

 

ProcessInstanceQuery query = new ProcessInstanceQueryImpl();
List<ProcessInstance> list = query.processDefinitionId("procesDefinitionId").list();

 

i get this exception:

org.jbpm.api.JbpmException: no environment to get org.hibernate.Session
     org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:197)
     org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:190)
     org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:70)
     org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl.list(ProcessInstanceQueryImpl.java:48)
     org.uajms.dtic.epersonal.web.controllers.PruebaController.doInicializarVentana(PruebaController.java:67)
     org.uajms.dtic.epersonal.web.controllers.PruebaController.afterCompose(PruebaController.java:78)
     org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:620)

 

this is my jbpm.cfg.xml

 

<jbpm-configuration>
    <import resource="jbpm.default.cfg.xml" />
    <import resource="jbpm.tx.hibernate.cfg.xml" />
    <import resource="jbpm.jpdl.cfg.xml" />
    <import resource="jbpm.bpmn.cfg.xml" />
    <import resource="jbpm.identity.cfg.xml" />
    <import resource="jbpm.businesscalendar.cfg.xml" />
    <import resource="jbpm.console.cfg.xml" />
    <import resource="jbpm.jobexecutor.cfg.xml" />
</jbpm-configuration>

 

am using jbpm-4.3 why i can fix this thanks so.

Reply to this message by going to Community

Start a new discussion in jBPM at Community