[jboss-user] [jBPM] - How to use ProcessInstance without accessing db
honzag
do-not-reply at jboss.com
Mon Feb 7 16:34:32 EST 2011
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&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110207/a9992298/attachment-0001.html
More information about the jboss-user
mailing list