[jboss-user] [jBPM] - Obtain a handle to ExecutionImpl from unit tests

Al Nadein do-not-reply at jboss.com
Fri Sep 17 10:29:16 EDT 2010


Al Nadein [http://community.jboss.org/people/matrixpooh] created the discussion

"Obtain a handle to ExecutionImpl from unit tests"

To view the discussion, visit: http://community.jboss.org/message/562433#562433

--------------------------------------------------------------
Hi,

I need to be able to switch between in-memory and physical databases. In order to do so, I have two cfg files: jbpm.cfg.xml and jbpm.test.cfg.xml and depending on the database, use

Configuration.getProcessEngine() 


or

new Configuration().setResource("jbpm.test.cfg.xml").buildProcessEngine()


After that, I'd like to obtain the corresponding ProcessEngine from anywhere in my code including the unit tests. EnvironmentImpl.getFromCurrent(ProcessEngine.class) fails with something along the lines of "environment is not set".

Any help will be greatly appreciated.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/562433#562433]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100917/4d0cdddc/attachment.html 


More information about the jboss-user mailing list