JBoss Community

[Q] JBPM 4.4 JbpmException

created by Ken Hoying in jBPM - View the full discussion

I am trying to use the new JBPM 4.4 API to get the tranistions that are valid for the current process based on the processes current status.  However, I must be doing something wrong or must not understand something correctly.  Any help from the more knowledgeable would be greatly appreciated.

 

I have tried the following:

 

myProcess.findActiveExecutionIn(myState).getActivity();

 

However, it get the following exception:

 

Caused by: org.jbpm.api.JbpmException: no environment to get org.jbpm.pvm.internal.session.RepositorySession
    at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:203)
    at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:196)
    at org.jbpm.pvm.internal.model.ExecutionImpl.getProcessDefinition(ExecutionImpl.java:1182)
    at org.jbpm.pvm.internal.model.ExecutionImpl.getActivity(ExecutionImpl.java:1203)
    at org.jbpm.pvm.internal.model.ExecutionImpl.getActivity(ExecutionImpl.java:86)

 

I have also attempted to get the the list of executions and process them.  However, the list is always empty.

 

I am obviously missing something here with my understanding of the API.  Can someone enlighten me or point me in the right direction?

 

Thank you!

Reply to this message by going to Community

Start a new discussion in jBPM at Community