You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by Thomas Steinmetz <th...@gmx.de> on 2008/03/14 13:27:42 UTC

Runtime: SEQUENCE and ACTIVITYGUARD

Hi all,

i think i found some errors in the source code (trunk) regarding the link
semantic of BPEL 2.0.

1. If a sequence gets executed and the child that is in execution right now
fails, the fault gets propagated. What's missing here is to DPE the
remaining child activities so that those activities outgoing links will be
set to false.

When terminating the sequence activity, the child, that is in execution at
that moment gets terminated as well. All remaining activities are DPEed.
What's missing here is to remove the terminated child from the list of
remaining child activities before the DPE for those activities is realized.

2. If the links transition conditions get evaluated in the class
ACTIVITYGUARD, evaluating a links transition condition may fail.
According to the BPEL 2.0 Specification the following should happen (page
107):
"If an error occurs while evaluating the transition condition of one of an
activity's outgoing links, then all remaining outgoing links with targets
within the source activity's enclosing scope MUST NOT have their ransition
conditions evaluated and remain in the unset state. However, if the target
of a remaining outgoing link is outside the source activity's enclosing
scope then the status of the link MUST be set to false."
In ACTIVITYGUARD, the remaining links are evaluated according to their
transition conditions, while according to the BPEL Specification, these
links should be set to false.

Regards,
Thomas





-- 
View this message in context: http://www.nabble.com/Runtime%3A-SEQUENCE-and-ACTIVITYGUARD-tp16048082p16048082.html
Sent from the Apache Ode Dev mailing list archive at Nabble.com.


Re: Runtime: SEQUENCE and ACTIVITYGUARD

Posted by Thomas Steinmetz <th...@gmx.de>.
Hi,


Matthieu Riou-5 wrote:
> 
>> When terminating the sequence activity, the child, that is in execution
>> at
>> that moment gets terminated as well. All remaining activities are DPEed.
>> What's missing here is to remove the terminated child from the list of
>> remaining child activities before the DPE for those activities is
>> realized.
> 
> I fail to see how that could change anything. The child is terminated
> anyway
> so its outgoing links are set to false already. But it's probably good to
> keep the code sane instead of setting it to false twice, so I'll do the
> change.

If that child is a structured activity, some of the inner activities could
already have been executed successfully, that means, some links were already
set to true.

Also, in ODE, when an activity gets terminated, this activities source links
are set according to their transition conditions. See for example the
termination of a pick activity, that is waiting for an incoming message
(PICK->WAITING->WAITING->onCancel =>  _self.parent.completed(null,
CompensationHandler.emptySet())). There is no differentiation in
ACTIVITYGUARD between successful completion and termination of one activity.
So that may need to be fixed too.


Matthieu Riou-5 wrote:
> 
>> 2. If the links transition conditions get evaluated in the class
>> ACTIVITYGUARD, evaluating a links transition condition may fail.
>> According to the BPEL 2.0 Specification the following should happen (page
>> 107):
>> "If an error occurs while evaluating the transition condition of one of
>> an
>> activity's outgoing links, then all remaining outgoing links with targets
>> within the source activity's enclosing scope MUST NOT have their
>> ransition
>> conditions evaluated and remain in the unset state. However, if the
>> target
>> of a remaining outgoing link is outside the source activity's enclosing
>> scope then the status of the link MUST be set to false."
>> In ACTIVITYGUARD, the remaining links are evaluated according to their
>> transition conditions, while according to the BPEL Specification, these
>> links should be set to false.
>>
> 
> They should be set to false if they don't share the same scope, otherwise
> they should be left unset. Leaving them unset is fairly easy, we just need
> to leave the evaluation loop, but the scope detection would be a bit
> longer.

I think the easiest way would be to just leave those links unset. Instead,
if a scope gets a fault from its child activity, just set the outgoingLinks,
that are not already set, to false.


Matthieu Riou-5 wrote:
> 
> I don't have the bandwidth right now, care to submit a patch?
> 
Unfortunately I don't have much time at hand. Sorry.

Cheers,
Thomas

-- 
View this message in context: http://www.nabble.com/Runtime%3A-SEQUENCE-and-ACTIVITYGUARD-tp16048082p16091072.html
Sent from the Apache Ode Dev mailing list archive at Nabble.com.


Re: Runtime: SEQUENCE and ACTIVITYGUARD

Posted by Matthieu Riou <ma...@offthelip.org>.
On Fri, Mar 14, 2008 at 5:27 AM, Thomas Steinmetz <th...@gmx.de>
wrote:

>
> Hi all,
>
> i think i found some errors in the source code (trunk) regarding the link
> semantic of BPEL 2.0.
>
> 1. If a sequence gets executed and the child that is in execution right
> now
> fails, the fault gets propagated. What's missing here is to DPE the
> remaining child activities so that those activities outgoing links will be
> set to false.
>

Good catch. I've just added the call.


>
> When terminating the sequence activity, the child, that is in execution at
> that moment gets terminated as well. All remaining activities are DPEed.
> What's missing here is to remove the terminated child from the list of
> remaining child activities before the DPE for those activities is
> realized.
>

I fail to see how that could change anything. The child is terminated anyway
so its outgoing links are set to false already. But it's probably good to
keep the code sane instead of setting it to false twice, so I'll do the
change.


>
> 2. If the links transition conditions get evaluated in the class
> ACTIVITYGUARD, evaluating a links transition condition may fail.
> According to the BPEL 2.0 Specification the following should happen (page
> 107):
> "If an error occurs while evaluating the transition condition of one of an
> activity's outgoing links, then all remaining outgoing links with targets
> within the source activity's enclosing scope MUST NOT have their ransition
> conditions evaluated and remain in the unset state. However, if the target
> of a remaining outgoing link is outside the source activity's enclosing
> scope then the status of the link MUST be set to false."
> In ACTIVITYGUARD, the remaining links are evaluated according to their
> transition conditions, while according to the BPEL Specification, these
> links should be set to false.
>

They should be set to false if they don't share the same scope, otherwise
they should be left unset. Leaving them unset is fairly easy, we just need
to leave the evaluation loop, but the scope detection would be a bit longer.
I don't have the bandwidth right now, care to submit a patch?

Thanks!
Matthieu


>
> Regards,
> Thomas
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Runtime%3A-SEQUENCE-and-ACTIVITYGUARD-tp16048082p16048082.html
> Sent from the Apache Ode Dev mailing list archive at Nabble.com.
>
>