-
1. Re: Problems understanding Seam's jBPM support
arussel Nov 14, 2007 3:29 AM (in response to mschmidke)What about JbpmContext lifecycle? May I hold it in a SFSB Seam component field? (Can it be passivated?)
Could you tell me if that worked ?
For what I understand jbpm context delimit the transaction, and can use a transaction if one is active.
So from creating jbpmcontext to closing it, it should stay on the same thread. I don't think this will happen if you keep it in a sfsb.
alex -
2. Re: Problems understanding Seam's jBPM support
mschmidke Nov 14, 2007 4:22 AM (in response to mschmidke)Indeed, keeping the context open for several transactions does not seem to work at all. It's a pity.
But I continued my experiments and found that it seems not to be very bad to save a ProcessInstance to another JbpmContext than it was loaded from.
So, for the moment, my workaround is to load ProcessInstances not forUpdate. In the action method which successfully ends the conversation, I open a new JbpmContext, save the ProcessInstance to that context and flush the hibernate session:@End public String actionButton() { JbpmContext ctx = JbpmConfiguration.getInstance().createJbpmContext(); try { ctx.setSession(session); ctx.save(processInstance); } finally { ctx.close(); } session.flush(); return "startseite"; }
-
3. Re: Problems understanding Seam's jBPM support
jcruise Nov 14, 2007 6:49 AM (in response to mschmidke)Just use injection to get the context:
@In private JbpmContext jbpmContext;
-
4. Re: Problems understanding Seam's jBPM support
mschmidke Nov 16, 2007 1:58 AM (in response to mschmidke)"jcruise" wrote:
Just use injection to get the context:
This was my hope ... but unfortunately it does not work:
org.jboss.seam.RequiredException: In attribute requires non-null value: versionBearbeiten.jbpmContext
Does jBPM in Seam need some kind of special configuration?
I have in components.xml:<core:jbpm> <core:process-definitions> <value>Argos3Freigabeprozess/processdefinition.xml</value> </core:process-definitions> </core:jbpm>
, but I don't know if it's read because I found nothing about it in the logs. -
5. Re: Problems understanding Seam's jBPM support
mschmidke Nov 16, 2007 3:24 AM (in response to mschmidke)Ok,
perhaps there is an error in chapter 7.4.1 of Seam documentation. I found out that the correct components.xml tag to install jBPM is bpm_jbpm, not core:jbpm.
This seems to bootstrap Seam's jBPM support.
For me, I'm facing other problems now, but I think it's worth opening a new thread.
Marcus. -
6. Re: Problems understanding Seam's jBPM support
mschmidke Nov 16, 2007 3:25 AM (in response to mschmidke)There was another typo ... bpm:jbpm, not bpm_jbpm.
For example:<bpm:jbpm> <bpm:process-definitions> <value>Argos3Freigabeprozess/processdefinition.xml</value> </bpm:process-definitions> </bpm:jbpm>
-
7. Re: Problems understanding Seam's jBPM support
pmuir Nov 16, 2007 4:50 AM (in response to mschmidke)This is correct in the GA manual