commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <nest...@yahoo.com>
Subject Re: [scxml] is there a way to allow an event in all states and just keep in the state?
Date Mon, 08 May 2006 21:39:58 GMT
You are right Fasih and in fact look at my last post I
was really talking about staying in the state which is
of course already implemented. You just stay there if
the event is not included so instead of including the
event in every node just do not write anything ;-)
quite simple uh? I was my friend really tired as I
said
Thanks again guys!,
really a pleasure to be interacting with you.
Nestor

--- Fasih <fasihullah.askiri@baypackets.com> wrote:

> I think that Nestor wanted to be in the same state,
> there is a difference in 
> going // and included states way.
> If you "bubble up" wouldnt you loose the state you
> were in? Or is there some 
> way to remain in the orig state? By the way, I was
> wondering if <history> is 
> implemented, any example to show a use? Just
> curious!
> 
> +Fasih
> 
> ----- Original Message ----- 
> From: "Rahul Akolkar" <rahul.akolkar@gmail.com>
> To: "Jakarta Commons Users List"
> <commons-user@jakarta.apache.org>
> Sent: Monday, May 08, 2006 3:51 PM
> Subject: Re: [scxml] is there a way to allow an
> event in all states and just 
> keep in the state?
> 
> 
> On 5/7/06, Nestor Urquiza <nestoru@yahoo.com> wrote:
> > thanks first of all for the reply, then my
> concrete
> > example is a system that is accepting services
> request
> > from remote clients. Must of the requests would be
> > accepted if the client is in the proper state to
> > accept them which translates to having in the
> scxml
> > file the "event" attribute available for the
> current
> > state.
> >
> > There are events however that are available for
> every
> > state in the system ... in other words no special
> > state is needed to authorize the event to be
> > triggered. For those events you can add a node
> inside
> > every state in your scxml file and I am wondering
> if
> > there is a better way of doing this.
> >
> <snip/>
> 
> Generally speaking, if events get processed by
> identical transitions
> for all substates of a particular state, the
> transition can be
> replaced by a single one that bubbles up to the
> parent.
> 
> For example:
> 
> <state id="parent">
>   <state id="child1">
>     <transition event="menu.main"
> target="mainmenu"/>
>     ...
>   </state>
>   <state id="child2">
>     <transition event="menu.main"
> target="mainmenu"/>
>     ...
>   </state>
> </state>
> 
> can become:
> 
> <state id="parent">
>   <transition event="menu.main" target="mainmenu"/>
>   <state id="child1">...</state>
>   <state id="child2">...</state>
> </state>
> 
> Parallelism could be used as well, as already
> pointed out. If I've
> missed the point, the smallest possible SCXML
> snippet illustrating
> what you want to do would be helpful.
> 
> -Rahul
> 
> 
> > Parallel states maybe are a solution given a
> parallel
> > state that can be defined as the same level as the
> > IDDLE one meaning that the system could be in an
> > IDDLE2 parallel state from which all the requests
> or
> > events are accepted.
> >
> > I will give this configuration a try and I will be
> > back to you. I guess I got what you mean.
> >
> > Nestor
> >
> > --- Fasih <fasihullah.askiri@baypackets.com>
> wrote:
> >
> > > Not sure I understood your requirement right.
> But
> > > have you seen how parallel
> > > states work?
> > > You might have seen this, but just in case you
> > > haven't, look at the
> > > microwave e.g
> > > There are two parallel states:
> > > Door
> > > Cooking [??]
> > > Door can be in Open/Close state. Cooking has its
> own
> > > states, cooking may or
> > > maynot change state on a door state change, this
> > > might be what you are
> > > looking for.
> > >
> > > Maybe you can give a few examples to elaborate
> on
> > > your requirements
> > >
> > > +Fasih
> <snap/>
> 
>
---------------------------------------------------------------------
> 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
> 
> 


__________________________________________________
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


Mime
View raw message