-
1. Re: JBPM 3.0 Documentation
dserodio Aug 1, 2005 12:33 PM (in response to ramirini)Try
JbpmSession jbpmSession = JbpmSession.getCurrentJbpmSession();
-
2. Re: JBPM 3.0 Documentation
ramirini Aug 1, 2005 12:55 PM (in response to ramirini)It doesn't work with
JbpmSession jbpmSession = JbpmSession.getCurrentJbpmSession();
The jbpmSession is null.
I think that the JbpmSession Object should be retrieved from the ExecutionContext.
Thanks! -
3. Re: JBPM 3.0 Documentation
aguizar Aug 1, 2005 5:58 PM (in response to ramirini)In order for JbpmSession.getCurrentJbpmSession() to return a valid session, the current thread should have opened a JbpmSession earlier via JbpmSessionFactory.openJbpmSession(). This is normally achieved by opening a session from the enclosing application, loading a token using that session and then signaling the token, so that the session is available for user-defined actions.
-
4. Re: JBPM 3.0 Documentation
dserodio Aug 2, 2005 2:39 PM (in response to ramirini)Why? What other ways are there to create JbpmSessions besides "new JbpmSession(JbpmSessionFactory, Session)" and "JbpmSessionFactory.openJbpmSession()"?
Or you mean that JbpmSession.getCurrentJbpmSession() will only return null if you never opened a JbpmSession (in the current thread, of course)?