On Sun, Apr 10, 2011 at 11:14 AM, jocke eriksson <[email protected]> wrote: > Hello SCXML users. I'm the project owner of freeswitch-scxml at google > code. I have been waning to add > a feature and I'm not quite sure how to implement it. I want to be > able to add a count object, > when evaluated in a transition, it should return the number of times > that event has happened in a state. > > ex > <transition event="nomatch" target="exit" cond="count gt 3" /> > > The problem I have is that when the guarded block is evaluated I have > no way to find out > in which transition it currently is located in. > > Is my only option to override SCXMLSemanticsImpl#filterTransitionsSet > and set the current transition > in the context before evaluation. > <snip/>
Implicit variables can be fun :-) Yes, filterTransitionsSet() would likely be the easiest way -- this is a good example of the semantics interface used for extensibility. BTW, if you want freeswitch-scxml to be listed on the Commons SCXML home page (see "Who is using it?" section [1] at the bottom of home page), send us a one-liner description you'd want to see and we can add it to that section. -Rahul [1] http://commons.apache.org/scxml/#Related_Projects > Regards Jocke Eriksson > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
