Hi,
I Get the following error when I call the following source
DEBUG [Services] executing default save operations
DEBUG [HibernateSaveOperation] saving process instance
DEBUG [SaveLogsOperation] ignoring logs. no logging service available.
DEBUG [CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@4c03d4'
DEBUG [JbpmContext] closing JbpmContext
DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@1011f1f
ERROR [STDERR] org.jbpm.JbpmException: no jbpm tx service configured
[...]
ERROR [Services] problem closing service 'persistence'
org.jbpm.JbpmException: no jbpm tx service configured
org.jbpm.JbpmConfiguration jbpmConfiguration = org.jbpm.JbpmConfiguration.parseXmlString(
"<jbpm-configuration>" +
// A jbpm-context mechanism separates the jbpm core
// engine from the services that jbpm uses from
// the environment.
" <jbpm-context>" +
" <service name='persistence' " +
" factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />" +
" </jbpm-context>" +
// Also all the resource files that are used by jbpm are
// referenced from the jbpm.cfg.xml
" <string name='resource.hibernate.cfg.xml' " +
" value='config/hibernate.cfg.xml' />" +
"</jbpm-configuration>"
);
org.jbpm.JbpmContext jbpmcontext =jbpmConfiguration.createJbpmContext();
try {
org.jbpm.graph.exe.ProcessInstance pi = jbpmcontext.newProcessInstance(processname);
pi.getRootToken().signal();
jbpmcontext.save(pi);
} catch (Exception ex) {
ex.printStackTrace();
} finally {
jbpmcontext.close();
}
P.S.: I call this code from a messagedriven bean...