[jboss-user] [jBPM] - Re: A few jbpm5 architectural/design questions
Maciej Swiderski
do-not-reply at jboss.com
Thu May 3 01:34:32 EDT 2012
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion
"Re: A few jbpm5 architectural/design questions"
To view the discussion, visit: https://community.jboss.org/message/733486#733486
--------------------------------------------------------------
> Kishore Jaladi wrote:
>
> >>There is currently work in progress to ensure that jBPM will work with any JPA provider and hopefully will be released soon, so any help with testing that is more then welcome :)
> I sure can sign up for testing MongoDB with Datanucleus. I am currently using 5.1.1.Final. Is that fine? or should I use another version. let me know.
Great, I have seen your other post about and looks like you're already on it :) maybe it would be better for you to grab 5.3.0-SNAPSHOT for your tests as most likely with 5.2 you will run into hibernate specific annotation issue that was fixed in 5.3.
> Kishore Jaladi wrote:
>
> >>You can control your transactions so I think you could achieve on demand persistence if I got you question right...
> Do you mean that the auto-persistence kicks in just before a transaction begins/ends? if so, is it at the beginning or the end?
I am not sure I understand what is auto persistence, could you please elaborate bit more?
> Kishore Jaladi wrote:
>
> >> Yes, as soon as process goes into a state node (human task, timer, catch events) it will return the thread to main program.
> I C. By State node, do you mean anything that puts the process in the "Wait" mode?
> When the state node changes (receives the event via signal event, human task etc.) does the process continue in a different thread? I mean, lets say I do the following in the main thread with a process that has start->catch-event->...
> ksession.startProcess("test");
> //the main thread returns after entering into catch-event node...will return http response 200 ok here
> ksession.signalEvent("continue", "continue");
> 1. Does the above last statement block the main thread until the "test" proces is complete? or does it start in a differnt thread?
Yes, that is what I meant by state node. Thread that called signalEvent will be used to execute all the logic till the next state node or the end of the process.
> Kishore Jaladi wrote:
>
> 2. Also, slightly tangential, is a Task item with executeWorkItem not including manager.completeWorkItem(.., ..) is also equivalent to a state node, in the sense that does it keep the process in "wait" state. Isnt that how sendTask and receiveTask work? or am I totally off? Can you please point me to any example that uses sendTask and receiveTask?
Exactly, if work tiem handler will not call completeWorkItem it will remain in a wait state until it is completed with that method. Send and receive tasks work item handlers are simple (more for demo purpose) currently, if you like more advanced work item handler take a look at human task handler that can be found in jbpm-human-task module in org.jbpm.process.workitem.wsht package
> Kishore Jaladi wrote:
> >> See above point regarding state nodes or just make you work async after start node using work item handlers - http://docs.jboss.org/jbpm/v5.2/userguide/ch05.html#d0e1811 http://docs.jboss.org/jbpm/v5.2/userguide/ch05.html#d0e1811
> The complete flow on using the Async handlers with a new thread spawned int he executeWorkItem is not clear to me. So, in the example code snippet in that doc, does the process go into"wait" state because the "executeWorkItem" does not completeWorkItem()?...and if so, how is the async thread supposed to mark the work item complete? is there any example?
Yes, this is exactly what happens. You should pass work item manager to the async handler to execure completeWorkItem as soon as you're done with processing.
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/733486#733486]
Start a new discussion in jBPM at Community
[https://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/20120503/95300e65/attachment-0001.html
More information about the jboss-user
mailing list