commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Schwager" <>
Subject [SCXML] featurerequest for new listener SCXMLPostExecutionListener
Date Fri, 18 Jul 2008 10:26:54 GMT
Hi Rahul,

I would like to trigger automat FSM2, if an event1 will fired on the

This could be done easily be done using a normal SCXMLListener, 
if a state changed in FSM1. 

But the SCXMLListener will not be called from SCXML, if 
nothing change inside of FSM1 (means, event1 will not map 
to any rule defined in the XML-file).

So, I have no change to trigger FSM2 via Listener/Action/Invoke 
in this szenario (or did I miss something ?)

A Solution could be to implement a new Listener interface 

    Public interface SCXMLPostExecutionListener extends SCXMLListener {
	// value true, if at least one fsm.trigger() called
      Void onTrigger(Boolean value)	
	// value true, if fsm.go() called
	Void onGo(Boolean value)		
	// value true, if at least one onExit/Entry/Transistion occurred
	Void onExit/Entry/Transition(Boolean value)  	

which, if a SCXMLPostExecutionListener has registered, will be called
AFTER (post execution) the execution of FSM has finised.

Another (but not recommended) solution is to integrate a parallel 
watchdog-state in the FSM1 which will change every time fired by any

I do not like this solution (but it works ;-), because I want not 
solve a technical problem (missing of something like
by changing the functional automat-description like this

    <state id="functional_business_logic">
    <state id="watchdog_global">
		<transition target="watchdog" />
	<state id="watchdog">
		<transition event="*" target="watchdog" />

Or is there another way to track down my requirement described above ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message