commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <rahul.akol...@gmail.com>
Subject Re: [SCXML] patterns for bridging
Date Thu, 20 Apr 2006 19:53:18 GMT
On 4/20/06, Nestor Urquiza <nestoru@yahoo.com> wrote:
> So you think the approach of calling a method as part
> of the condition is a valid alternative or because of
> the fact that it is relying on a common way of
> evaluating boolean expressions that still jexl might
> not guarrantee you think it is a weak approach and I
> would go with intermediate Action States?
>
<snip/>

IMO, whether you choose an intermediate state should depend upon:

 * Amount of work done in executable content within the method you're
calling (more work implies an action state preference, since
transitions are more or less instantaneous, but this is somewhat of a
theoretical argument).

 * Amount of logical outcomes coming out of the method you're calling.
If on a certain event, you need to call a method that can come back
with different logical outcomes that dictate the transition target,
you need an action state. As an example, see "checkCookie" state in
the Commons SCXML rendition of the Shale usecases log-on dialog [1].

You will have to try short-circuiting in JEXL yourself, sorry I don't know.


> Also, about payload/_eventdata I do not understand if
> the method going to be called before the conditions
> are evaluated within a transition?
<snap/>

What method is that?


> If yes then I can
> setup variables using an _eventdata object methods
> then test for those variables in the condition. Is the
> _eventdata variable behavior already implemented in
> commons?
>
<snap/>

Yes, and is now documented as well ;-) (though website is not
refreshed yet -- in a few).

-Rahul

[1] http://jakarta.apache.org/commons/sandbox/scxml/usecases/shale-dialogs/log-on-config.xml

> Thanks
>
<snip/>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message