You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Chris Ma <cm...@ipm.edu.mo> on 2009/02/09 05:05:33 UTC

Problem in compensation instances group

Hi all,

    I am doing a survey on BPEL's compensation instances group and I found
some strange nature which is not specific in the BPEL specification 2.0, I
am not sure if it is normal or not in all BPEL server, or anyone has the
practical example to support the strange nature?

As the following program, a while loop count x from 0 to 5, it contains a
scope, the scope increase X by 1, the compensation of the scope decrease X
by 1. 

the strange is, if a throw inside the while loop is called(e.g. throw_1),
the last compensation instance is executed. X will finally be 2. on the
other hand, if a throw outside the while loop is called(throw_2), all
compensation instances are invoked and X will finally be 0. It is strange
that the throw_1 can not call all the compenstion instances...Please
comment. Thanks!


X=0
While X < 5

   { A  ?  C  , F }  where A has activity X= X + 1, C is compensation X=X
-1, F is the fault handler.

   if x >2 then (throw_1-> compensate)

loop

(throw_2 -> compensate)


Chris Ma.

-- 
View this message in context: http://www.nabble.com/Problem-in-compensation-instances-group-tp21906836p21906836.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Problem in compensation instances group

Posted by Chris Ma <cm...@ipm.edu.mo>.
Dear all,

       Where can I identify if it is a nature of BPEL in Apache or it is an
error?

thanks a lot!

Chris Ma



Bill McCusker wrote:
> 
> Sorry for the false alarm. Closer inspection of the text file I now see 
> that the throw is outside the looped scope.
> 
> Bill McCusker wrote:
>> From inspecting the bpel process the reason not all scopes are 
>> compensated when the throw is inside the while loops is because an 
>> exception is now being thrown from inside a scope intended to be 
>> compensated. According to section 12.4.3 in the BPEL 2.0 specification 
>> a compensation handler is only available when a scope completes 
>> successfully. This is why moving the throw out of the loops results in 
>> expected compensation since all of scopes now complete successfully.
>>
>> Bill McCusker
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-in-compensation-instances-group-tp21906836p22031638.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Problem in compensation instances group

Posted by Bill McCusker <wm...@parasoft.com>.
Sorry for the false alarm. Closer inspection of the text file I now see 
that the throw is outside the looped scope.

Bill McCusker wrote:
> From inspecting the bpel process the reason not all scopes are 
> compensated when the throw is inside the while loops is because an 
> exception is now being thrown from inside a scope intended to be 
> compensated. According to section 12.4.3 in the BPEL 2.0 specification 
> a compensation handler is only available when a scope completes 
> successfully. This is why moving the throw out of the loops results in 
> expected compensation since all of scopes now complete successfully.
>
> Bill McCusker
>

Re: Problem in compensation instances group

Posted by Bill McCusker <wm...@parasoft.com>.
 From inspecting the bpel process the reason not all scopes are 
compensated when the throw is inside the while loops is because an 
exception is now being thrown from inside a scope intended to be 
compensated. According to section 12.4.3 in the BPEL 2.0 specification a 
compensation handler is only available when a scope completes 
successfully. This is why moving the throw out of the loops results in 
expected compensation since all of scopes now complete successfully.

Bill McCusker

Chris Ma wrote:
> I upload the BPEL  http://www.nabble.com/file/p21928772/instance_group.txt
> program . Thanks a lot..
>
> Chris Ma
>
>
>
> mriou wrote:
>   
>> On Sun, Feb 8, 2009 at 8:05 PM, Chris Ma <cm...@ipm.edu.mo> wrote:
>>
>>     
>>> Hi all,
>>>
>>>    I am doing a survey on BPEL's compensation instances group and I found
>>> some strange nature which is not specific in the BPEL specification 2.0,
>>> I
>>> am not sure if it is normal or not in all BPEL server, or anyone has the
>>> practical example to support the strange nature?
>>>
>>> As the following program, a while loop count x from 0 to 5, it contains a
>>> scope, the scope increase X by 1, the compensation of the scope decrease
>>> X
>>> by 1.
>>>
>>> the strange is, if a throw inside the while loop is called(e.g. throw_1),
>>> the last compensation instance is executed. X will finally be 2. on the
>>> other hand, if a throw outside the while loop is called(throw_2), all
>>> compensation instances are invoked and X will finally be 0. It is strange
>>> that the throw_1 can not call all the compenstion instances...Please
>>> comment. Thanks!
>>>
>>>       
>> Interesting. Do you have the BPEL process implementing this? I like
>> pseudo-code but to comment on such a specific behavior, I'd like to see
>> the
>> exact code.
>>
>> Thanks,
>> Matthieu
>>
>>
>>     
>>> X=0
>>> While X < 5
>>>
>>>   { A  ?  C  , F }  where A has activity X= X + 1, C is compensation X=X
>>> -1, F is the fault handler.
>>>
>>>   if x >2 then (throw_1-> compensate)
>>>
>>> loop
>>>
>>> (throw_2 -> compensate)
>>>
>>>
>>> Chris Ma.
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Problem-in-compensation-instances-group-tp21906836p21906836.html
>>> Sent from the Apache Ode User mailing list archive at Nabble.com.
>>>
>>>
>>>       
>>     
>
>   


Re: Problem in compensation instances group

Posted by Chris Ma <cm...@ipm.edu.mo>.
I upload the BPEL  http://www.nabble.com/file/p21928772/instance_group.txt
program . Thanks a lot..

Chris Ma



mriou wrote:
> 
> On Sun, Feb 8, 2009 at 8:05 PM, Chris Ma <cm...@ipm.edu.mo> wrote:
> 
>>
>> Hi all,
>>
>>    I am doing a survey on BPEL's compensation instances group and I found
>> some strange nature which is not specific in the BPEL specification 2.0,
>> I
>> am not sure if it is normal or not in all BPEL server, or anyone has the
>> practical example to support the strange nature?
>>
>> As the following program, a while loop count x from 0 to 5, it contains a
>> scope, the scope increase X by 1, the compensation of the scope decrease
>> X
>> by 1.
>>
>> the strange is, if a throw inside the while loop is called(e.g. throw_1),
>> the last compensation instance is executed. X will finally be 2. on the
>> other hand, if a throw outside the while loop is called(throw_2), all
>> compensation instances are invoked and X will finally be 0. It is strange
>> that the throw_1 can not call all the compenstion instances...Please
>> comment. Thanks!
>>
> 
> Interesting. Do you have the BPEL process implementing this? I like
> pseudo-code but to comment on such a specific behavior, I'd like to see
> the
> exact code.
> 
> Thanks,
> Matthieu
> 
> 
>>
>>
>> X=0
>> While X < 5
>>
>>   { A  ?  C  , F }  where A has activity X= X + 1, C is compensation X=X
>> -1, F is the fault handler.
>>
>>   if x >2 then (throw_1-> compensate)
>>
>> loop
>>
>> (throw_2 -> compensate)
>>
>>
>> Chris Ma.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-in-compensation-instances-group-tp21906836p21906836.html
>> Sent from the Apache Ode User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-in-compensation-instances-group-tp21906836p21928772.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Problem in compensation instances group

Posted by Matthieu Riou <ma...@gmail.com>.
On Sun, Feb 8, 2009 at 8:05 PM, Chris Ma <cm...@ipm.edu.mo> wrote:

>
> Hi all,
>
>    I am doing a survey on BPEL's compensation instances group and I found
> some strange nature which is not specific in the BPEL specification 2.0, I
> am not sure if it is normal or not in all BPEL server, or anyone has the
> practical example to support the strange nature?
>
> As the following program, a while loop count x from 0 to 5, it contains a
> scope, the scope increase X by 1, the compensation of the scope decrease X
> by 1.
>
> the strange is, if a throw inside the while loop is called(e.g. throw_1),
> the last compensation instance is executed. X will finally be 2. on the
> other hand, if a throw outside the while loop is called(throw_2), all
> compensation instances are invoked and X will finally be 0. It is strange
> that the throw_1 can not call all the compenstion instances...Please
> comment. Thanks!
>

Interesting. Do you have the BPEL process implementing this? I like
pseudo-code but to comment on such a specific behavior, I'd like to see the
exact code.

Thanks,
Matthieu


>
>
> X=0
> While X < 5
>
>   { A  ?  C  , F }  where A has activity X= X + 1, C is compensation X=X
> -1, F is the fault handler.
>
>   if x >2 then (throw_1-> compensate)
>
> loop
>
> (throw_2 -> compensate)
>
>
> Chris Ma.
>
> --
> View this message in context:
> http://www.nabble.com/Problem-in-compensation-instances-group-tp21906836p21906836.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>