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] "getting" a state id.
Date Wed, 11 Mar 2009 20:18:50 GMT
On Wed, Mar 11, 2009 at 8:32 AM, Linda Erlenhov
<linda.erlenhov@gmail.com> wrote:
> Hello
> I´m back with sort of the same (but then again not) problem as I´ve asked
> previousley. It´s about fetching ID:s again. I have an SCXML file that looks
> on the form like this:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <scxml id="runsim">
> <state id="176">
> <initial>
> <transition event="1" cond="!1" target="0">
> <var name="1"/>
> </transition>
> </initial>
> <state id="0">
> <transition event="2" cond="2" target="END"/>
> <transition event="3" cond="!1" target="2">
> <var name="1"/>
> </transition>
> </state>
> <final id="END"/>
> </state>
> </scxml>
>
> I would like to "fetch" the first states id, the one that wrapps everything
> (in this version the id is 176).
> How do I do that?
>
<snip/>

I'm afraid I don't completely understand what you are attempting to
do. So, for example, assuming you're asking given the Commons SCXML
object model for the above state machine, how do we fetch the wrapping
state's ID, then the model API is your friend (SCXML#getChildren()
contains only one entry in this case, and thats for the state in
question):

  http://commons.apache.org/scxml/0.9/apidocs/org/apache/commons/scxml/model/package-summary.html

As an aside, there is atleast one issue with the above document (no
initial state for the state machine).

-Rahul


> Best Regards
> Linda
>

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


Mime
View raw message