The following code seems to work for me:
EnvironmentImpl environment = EnvironmentImpl.getCurrent();
if (environment == null) {
environment = ((EnvironmentFactory) processEngine).openEnvironment();
}
Session session = environment.get(Session.class);
But is this the way to go? If so, do I have to care about "closing" the environment?
--Heiko