-
1. Re: Compensation catching event for Script Task
marco.rietveld Apr 29, 2014 5:56 AM (in response to marcj)1 of 1 people found this helpfulHi Marc,
Yes, it is possible to associate a compensation catch even with a Script Task: a Script Task is a sort of task, and thus is allowed as the Activity part of a Compensation Handler.
I've written up everything that I understand about Compensation here: Compensation wiki page
(Unfortunately, human tasks and other tasks that "pause" won't work yet with Compensation in 6.0.x. I'm doing my utter best to make sure that functionality is available in 6.1).
-
2. Re: Compensation catching event for Script Task
marcj Apr 29, 2014 6:19 AM (in response to marco.rietveld)Hi Marco,
thx for the link, I will have a look at it and keep you posted.
Is it already clear when 6.1 will be released?
Marc
-
3. Re: Compensation catching event for Script Task
marcj Apr 29, 2014 9:18 AM (in response to marcj)Hi Marco, just read your wiki entry. Yet, there are still some issues here (with jBPM 6.0.1):
- A script task doesn't accept the compensation boundary event to be attached, while for instance a service task gets a green frame and therefore indicates a possible attachment.
- With a "None" task, the CBE can be attached. The strange thing is that it is possible to change the activity type to a script task without complaints.
I want to achieve something like this:
At the moment, I get several errors when trying to build the project:
[-1,-1]: Process 'settlements' [payments.settlements]: Task node 'Book Clearing System' [5] has no work name.
[-1,-1]: Process 'settlements' [payments.settlements]: Action node 'Revert Prebooking Payers Account' [6] has no incoming connection.
[-1,-1]: Process 'settlements' [payments.settlements]: Action node 'Revert Prebooking Payers Account' [6] has no outgoing connection.
[-1,-1]: Process 'settlements' [payments.settlements]: Event node 'Cancel' [7] should specify an event type
[-1,-1]: Process 'settlements' [payments.settlements]: Task node 'Prebook Payers Account' [9] has no work name.
[-1,-1]: Process 'settlements' [payments.settlements]: Event node 'Compensation' [10] should specify an event type
[-1,-1]: Process 'settlements' [payments.settlements]: Event node 'Compensation' [10] has no outgoing connection
I just realized something else:
I used a "Throwing Intermediate Event" for compensation and cancellation. Yet, in Eclipse there is an additional section called "Boundary Events" which is not visible in KIE WB. However, the Boundary Events section does not encompass a "Compensation" event... -
4. Re: Compensation Boundary Event for Script Task
marcj Apr 30, 2014 7:20 AM (in response to marcj)Hey guys,
I just opened the sample process above (created via KIE-WB) in Eclipse - and to my surprise it looked like this:
So it actually looks like the KIE-WB Process Modeler somehow failed to connect the events with the respective activities.
In addition and as mentioned above, Eclipse shows a section "Boundary Events", while KIE-WB doesn't... Does this section have to be enabled manually or is it simply not included? And still, there is no Compensation Boundary Event included...
Looking forward to your replies!
MarcJ
-
5. Re: Compensation Boundary Event for Script Task
swiderski.maciej May 2, 2014 1:48 AM (in response to marcj)boundary events in general should be only attached to state based nodes, meaning those that will wait for completion and are not automatic activities e.g. script task. Reason for it is that for automatic activities there is no way that boundary event will be triggered as it is active as long as the activity it is attached to. Compensation events are bit different and currently they are not fully supported as mentioned by Marco.
When it comes to designer, there is not separate section of boundary events instead of designer allows to attach intermediate catch events to some of activities - these that are state based. So to properly attach it it needs to show green rectangle on the activity you're trying to attach event to.
HTH
-
6. Re: Compensation Boundary Event for Script Task
marcj May 5, 2014 4:38 AM (in response to swiderski.maciej)Hi Maciej,
thank you very much for your reply. I'm not entirely convinced that only state-based nodes require compensation boundary events. Imagine a business transaction composed of several activities (e.g. interactions with web service calls or message queues, human interactions, or script tasks), which in case of an error have to be handled with individual compensation logic. Based on the processing progress at the time the error occurred, a script task may also require compensation logic in order to revert the outcome of the partially executed process. A simple "backward" compensation flow in my opinion would not solve the entire problem, as the process progress has not been considered.
How would you model the example above?
Thx,
MarcJ
-
7. Re: Compensation Boundary Event for Script Task
swiderski.maciej May 6, 2014 1:23 AM (in response to marcj)1 of 1 people found this helpfulMarc, I meant that currently supported boundary events in general apply to state based activities. Compensation events are actually bit different as they are sort of post processing steps meaning that activity needs to be completed to be compensated. So when we provide full support for compensation we need to ensure that all activities will be taken into consideration.
HTH
-
8. Re: Compensation Boundary Event for Script Task
marcj Jun 5, 2014 9:38 AM (in response to swiderski.maciej)Hi Maciej,
I totally forgot this thread and stumbled upon it again. Thx for the clarification.
I'd like to come back to the original problem though and would like to clarify one last thing regarding those two error messages:
[-1,-1]: Process 'settlements' [payments.settlements]: Action node 'Revert Prebooking Payers Account' [6] has no incoming connection.
[-1,-1]: Process 'settlements' [payments.settlements]: Action node 'Revert Prebooking Payers Account' [6] has no outgoing connection.
What is the reason for these messages? The usage of an association between a compensation boundary event and a single compensation acitivity in my opinion is in accordance with the BPMN specification, right?
Are they related to the current implementation state of the compensation boundary event within jBPM?
Hope you're able to clarify that =)
Cheers