-
1. Re: How to handle rollback due to runtime errors
kukeltje Feb 23, 2010 4:30 PM (in response to swiderski.maciej)Yes there has been ideas in this area... In fact jBPM 2.0 had some functionality for 'compensating' actions. It was not in the next release since it was way to difficult to fully support all kinds of compensations and have the right information available. E.g. the jBPM task that was to be rolled back should have the 'previous' data, but if, like you say, e.g. the relevant DB is not available, how can that be accessed?And this is just one of a multitude of problems.
That is specifically the reason I would not, (really not) use plain webservices in enterprise grade systems other than simply querying e.g. a usermanagement system. All other kinds of access to external/different systems should either go through transaction aware protocols or should be capable to receive the same data twice if e.g. the activity is executed again.
All these things are 'good habits' in designing systems and one of the reasons webservices did not really take off (have you seen a webservice library that could participate in a JTA transaction? (e.g. as a JCA module) And if you have, could the receiving party handle ws-transactions?
So your question is a valid and understandable one, but the solution is not within jBPM but e.g. http://jboss.org/jbosstm (but that is JBoss specific)
Cheers,
Ronald
-
2. Re: How to handle rollback due to runtime errors
swiderski.maciej Feb 24, 2010 3:07 AM (in response to kukeltje)I agree with you that it would be best to enclose all executions in transaction aware protocols but that is not always the case. For Web Service calls there are more and more implementations that supports various WS-* extensions and as you mentioned JBoss Transaction has support for that as well.
My example was more to illustrate that there could be a case where we would like to call another process on another machine using completely different process engine/framework so we cannot have a transaction over it. What I would like to have is a minimal notification for user code in case of transaction rollback to be able to gracefully handle that, for instance to suspend/cancel process running somewhere else.
From what you said, I assume that there won't be any solution for that?!
Cheers,
Maciej
-
3. Re: How to handle rollback due to runtime errors
kukeltje Feb 24, 2010 2:49 PM (in response to swiderski.maciej)I understand your usecase, functionality wise. On the other hand, I'm almost 100% sure that the separate WS-hell will not become realy major in complex B2B things. Other protocols are better suited for that
If we would provide something 'simple' for that, people most likely want more, but.... BPMN has an explicit ERROR event, not sure how that is to be used (see the specs for that http://www.omg.org/spec/BPMN/2.0/) and when in jBPM will have support for it.
Regarding transaction-rollback, intercepting those in a process somewhere when things happen low level and acting on it is (I think, am not into that low level stuff) rather difficult. Otoh, jBPM can already be used with some interceptors, so maybe you can do something on that level.
Personally, I've never really missed it (just did not use basic webservices )
Ronald
-
4. Re: How to handle rollback due to runtime errors
swiderski.maciej Feb 25, 2010 11:14 AM (in response to kukeltje)Error events in BPMN 2.0 seems more like activity specific but I found something about boundary error events so that could be what I am looking for but as you mentioned there is not time frame for that to be implemented at the moment.
Interceptors sounds quite nice, I must admit. Could you please provide some more details about it?
Are they configurable or does it require to modify jBPM code?
Thanks
Maciej
-
5. Re: How to handle rollback due to runtime errors
kukeltje Feb 25, 2010 11:50 AM (in response to swiderski.maciej)Interceptors sounds quite nice, I must admit. Could you please provide some more details about it?
Are they configurable or does it require to modify jBPM code?
I have no real knowledge of this, nor the time to find out, sorry. Best is to look in the source on how things are done...
Ronald
-
6. Re: How to handle rollback due to runtime errors
swiderski.maciej Feb 25, 2010 2:10 PM (in response to kukeltje)No problem Ronald, thanks a lot for all the help with this issue. Will look into the source and if I find something will post it back here.
Cheers,
Maciej