On 5/7/06, Nestor Urquiza <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to