honzag [
http://community.jboss.org/people/honzag] created the discussion
"How to use ProcessInstance without accessing db"
To view the discussion, visit:
http://community.jboss.org/message/586055#586055
--------------------------------------------------------------
Hi,
I would like to access DB only during the ProcessInstance creation (and in a task node). I
have tried to set a "default-lazy" property in all hbm.xml files to
"false" but still I end with LazyInitializationException.
There is a code of method which I use to retrieve ProcessInstance. I want to keep this
instance in memory between process wait states.
JbpmContext context = JbpmConfiguration.getInstance().createJbpmContext();
try {
ProcessDefinition definition =
context.getGraphSession().findLatestProcessDefinition(definitionName);
return definition.createProcessInstance(variables) ;
} finally {
context.close();
}
In process wait state I want to use in memory kept ProcessInstance and call signal
method.
If I create definition by parsing xml then this works. But is this approach possible in
case of loading from db? I use jbpm 3.2.9.
Thank you in advance for your reply?
Honza
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/586055#586055]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]