Hi Santanu

Thanks for your respnse.

When i use this statement in my code, i am getting the below exception.

org.jbpm.api.JbpmException: no environment to get org.hibernate.Session
        at 
org.jbpm.pvm.internal.env.Environment.getFromCurrent(Environment.java:196)
        at 
org.jbpm.pvm.internal.env.Environment.getFromCurrent(Environment.java:189)
        at 
org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:63)
        at 
org.jbpm.pvm.internal.query.AbstractQuery.untypedUniqueResult(AbstractQuery.java:68)
        at 
org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl.uniqueResult(ProcessInstanceQueryImpl.java:43)
        at 
com.kenexa.core.workflow.CoreWorkflowExecutionService.getCurrentActiveStepName(CoreWorkflowExecutionService.java:228)
        at 
com.kenexa.core.workflow.CoreWorkflowExecutionService.initiateWorkflow(CoreWorkflowExecutionService.java:71)
        at 
com.kenexa.perform.web.actions.goals.ManageGoalActionImpl.save(ManageGoalActionImpl.java:130)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)

Then changed the statment from
ProcessInstanceQuery query = new ProcessInstanceQueryImpl(); to
ProcessInstanceQueryImpl lProcessInstanceQuery  = (ProcessInstanceQueryImpl) 
WorkflowUtil.getExecutionService().createProcessInstanceQuery();

I am not sure, is it the correct way of getting ProcessInstanceQuery?

Also once the ProcessInstance is started, i want to get the current activity 
name from process instance. Is there any method avaialble in ProcessInstance?

Please suggest me.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268859#4268859

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268859
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to