OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsbpel message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [wsbpel] Issue - 209 - Proposal For Vote


Imagine the following process:

scope name="a"
    ...
    compensationHandler
       sequence
          compensate scope="b"
          compensate scope="b"
    ...
    sequence
       scope name="b"
          faultHandlers
             catchAll
                empty
          ...

In cases where it just so happens that scope "b" faulted and therefore 
never installed a fault handler the code would run just fine with no 
errors in scope a's compensation handler.

In cases where it just so happens that scope "b" did not fault out then 
the code would fail because of the second compensate activity in scope 
a's compensation handler.

What's ironic with the previous behavior is that the whole point of the 
text in section 13.3.3 was to let people not have to test for or 
otherwise worry about how child scopes exited when calling compensate. 
Yet the text in 14.7 explicitly violates the goal of the 13.3.3 text by 
creating completely different behavior for compensate calls based on how 
the called scope exited! We have failed to meet our own requirements.

I personally believe that calling compensate on the same scope two times 
in a row is not something programmers should be doing. Therefore I 
believe we should make it illegal in all cases and thus resolve the 
contradiction between 13.3.3 and 14.7.

If we adopt my proposal then the treatment for the previous example 
would be that the first call to compensate would either be a no-op or a 
call to b's compensation handler depending on how b exited. The second 
call would always be a fault regardless of how b exited.

		Yaron


Alex Yiu wrote:
> Sorry, -1 from me. :-(
> 
> Actually, the current spec behavior is consistent to my eyes.
> A re-wording clarification without real behavior changes should be good enough.
> 
> _Original Text_:
> 
> ------------------------------
> Section 13.3.3 states:
> 
>     "Invoking a compensation handler that has not been installed is equivalent
>     to the empty activity (it is a no-op)—this ensures that fault handlers do
>     not have to rely on state to determine which nested scopes have completed
>     successfully." 
> 
> Section 14.7 states:
> 
>     "If an installed compensation handler is invoked more than once during the
>     execution of a process instance, a compliant implementation MUST throw the
>     standard bpws:repeatedCompensation fault." 
> 
> ------------------------------
> 
> 13.3.3 is talking about the case where  a compensation handler _that has NOT 
> been installed_.
> 14.7 is talking about the case where a compensation handler _that is ALREADY 
> installed_.
> 
> The state used to check whether bpws:repeatedCompensation needs to be thrown is 
> associated with the _installed_ compensationHandler.
> 
> And, <empty> "no-op" should really means no-op: that is no matter how many times 
> it got executed, any parts of states of the process will not get affected.
> 
> 
> Therefore, I would suggest to reword two paragraphs similar to the following:
> _NEW TEXT:_
> 
> ----------------------------------
> Section 13.3.3 states:
> 
>     "Invoking a compensation handler that has not been installed is equivalent
>     to the empty activity (it is a no-op)—this ensures that fault handlers do
>     not have to rely on state to determine which nested scopes have completed
>     successfully. _Invoking a not-yet-installed compensation handler multiple
>     times are allowed and it does not have effect to the state of the process
>     and assocated scopes._" 
> 
> Section 14.7 states:
> 
>     "If an installed compensation handler is invoked more than once during the
>     execution of a process instance, a compliant implementation MUST throw the
>     standard bpws:repeatedCompensation fault. _Note: this repeated compensation
>     fault checking does NOT apply to the invocations of not-yet-installed
>     compensation handlers._ " 
> 
> ----------------------------------
> 
> 
> 
> 
> Regards,
> Alex Yiu
> 
> 
> 
> Yaron Y. Goland wrote:
> 
>> Issue 209 - Inconsistent repeated compensation fault behavior
>>
>> Proposal: Specify that two calls to a compensation handle in all cases causes 
>> a fault.
>>
>> Section 13.3.3
>>
>> From: Invoking a compensation handler that has not been installed is 
>> equivalent to the empty activity (it is a no-op)—this ensures that fault 
>> handlers do not have to rely on state to determine which nested scopes have 
>> completed successfully.
>>
>> To: The first attempt to invoke a compensation handler that has never been 
>> installed is equivalent to the empty activity (it is a no-op)—this ensures 
>> that fault handlers do not have to rely on state to determine which nested 
>> scopes have completed successfully. However any subsequent attempts to invoke 
>> the never installed compensation handler MUST cause a 
>> bpws:repeatedCompensation fault to be thrown.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this mail list, you must leave the OASIS TC that
>> generates this mail.  You may a link to this group and all your TCs in OASIS
>> at:
>> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
> 
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]