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.