Michael Wohlfart [
http://community.jboss.org/people/mwohlf] replied to the discussion
"[Q] JBPM 4.4 JbpmException"
To view the discussion, visit:
http://community.jboss.org/message/554660#554660
--------------------------------------------------------------
The problem is there is a database session needed if you call some of the methods,
especially on the persistent objects like task, execution, process etc.... that's just
the nature of mapping objects to a database, it is not a bug...
you can:
* stick with the methods of the services (RepositoryService, IdentityService, etc)
* open/close an environment that manages the session for you (see developers guide section
6.5):
EnvironmentImpl environment = (EnvironmentImpl)
((EnvironmentFactory)processEngine).openEnvironment();
try {
// do yout stuff here
} finally {
environment.close();
}
* create a command that is executed by the process engine (see developers guide section
6.6):
processEngine.execute(new Command() {
public Object execute(Environment env) {
// do your stuff here
return null;
}
});
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/554660#554660]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]