commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guofeng Zhang" <guof...@radvision.com>
Subject RE: [SCMXML] How to express 'evnet name/action' of a transition in Commons SCXML?
Date Tue, 29 Aug 2006 09:55:08 GMT
Great! In this way I could use guard condition to check the return value
of the action in further transition.

Thanks.


-----Original Message-----
From: Nestor Urquiza [mailto:nestoru@yahoo.com] 
Sent: Monday, August 28, 2006 11:33 PM
To: Jakarta Commons Users List
Subject: Re: [SCMXML] How to express 'evnet name/action' of a transition
in Commons SCXML?

Hi Guofeng,
One of the ways (the one I use) is to create an action
state and there I put the actions. The action state
becomes just a "transitional state" which allow you to
do what you are looking for if I understood correctly.

<snippet>
<state id="IDLE">
<!-- your initial state -->
		<n:transition event="event1" cond="bar eq foo"
target="aIDLE2STATE1"/>
</state>
<state id="aIDLE2STATE1">
<!-- call your actions here, make a final decision
based on some variables for example a result variable
-->
		<n:transition cond="result eq true"
target="STATE1"/>
</state>
<state id="STATE1">
		<!-- this is the final state where you wanted to go
-->
</state>

</snippet>

I reccomend you to read/search the mailing list ...
specifically I think [1] would be very helpful for you
Best regards,
Nestor
[1]
http://marc.theaimsgroup.com/?l=jakarta-commons-user&m=114551355208021&w
=1

--- Guofeng Zhang <guofeng@radvision.com> wrote:

> Hi,
> 
>  
> 
> For a transition in a statechart, we can depict the
> transition as "event
> name/action" in UML diagram, but I do not know how
> to express it in
> commons SCMXML. I want to call a method in a Java
> class in the action
> when the event is fired.
> 
>  
> 
> I read the user guide and browse the SCMXL
> specification; they only
> describe how to use actions in a state. I can not
> figure out how to use
> the action in a transition.
> 
>  
> 
> Could anyone kindly give me a sample about it?
> 
>  
> 
> Thanks.
> 
>  
> 
> Guofeng
> 
>  
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



---------------------------------------------------------------------
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