commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Linda Erlenhov <linda.erlen...@gmail.com>
Subject Re: [SCXML] Transition/Var question
Date Mon, 02 Mar 2009 10:07:02 GMT
Hello

Yes this is what I want to do, but I don´t understand how (1) is done. With
the getEngine you get the rootContext, The rootContext describes ALL var:s
in the StateMachine as I understand, so then it should be the context
associated with the transition I want. How do I do that? The transition type
doesn´t have a name and I can´t find a method that takes an "executable
object"ish and returns something that I want.

best regards
//Linda

On Sat, Feb 28, 2009 at 6:20 AM, Rahul Akolkar <rahul.akolkar@gmail.com>wrote:

> On Fri, Feb 27, 2009 at 7:06 AM, Linda Erlenhov
> <linda.erlenhov@gmail.com> wrote:
> > Hello again!
> >
> >
> >> <snip>
> >>
> >> followed by introspection like so:
> >>
> >>    getEngine().getRootContext().get("outcome");
> >>
> >> </snip>
> >
> > The problem with that approach is that i won´t know the names of my
> "var":s.
> >
> > The idéa is:
> > I´m building an graphical editor for Statecharts, where you can model a
> > statemachine with some simple drag and drop actions. When your satisfied
> > with your machine the editor generates an SCXML-file which then is meant
> to
> > be run. Everything I do has to be "generic" so what I wanted was a way
> to,
> > when the listner registers an "onTransition" ( the class Implements the
> > SCXMLListener interface) move:
> > 1. Check if there is an "var" associated with that transition
> > 2. If so, fetch the exp.
> >
> <snip/>
>
> IIUC, for (1), introspect the Transition object (the list of actions
> therein). (2) is above (replace the String constant "outcome" with the
> value obtained in 1).
>
> -Rahul
>
>
> > best regards
> > //Linda
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message