commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoît Thiébault <thieba...@artenum.com>
Subject [SCXML] Undoing a transition
Date Wed, 17 Oct 2012 13:25:03 GMT
Hi,

Suppose I have the following SCXML file:

<?xml version="1.0"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" 
xmlns:ker="http://www.keridwen.org/SCXML"
     initialstate="stateA">

     <state id="stateA">
         <transition event="transition1" target="stateB" />
     </state>

     <state id="stateB" />
</scxml>

In my Java code, I did start the SCXML Engine with this file and executed:

stateMachine.dispatchSignalEvent("transition1");

I am now in stateB.

How can I do programmatically to "undo" the transition, following the 
inverse path of transition1 and returning to stateA?

I can listen to the engine and implement the method

public void onTransition(final TransitionTarget from, final 
TransitionTarget to, final Transition transition)

.. but I don't know how to order the engine to perform the reverse operation

Kind regards

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


Mime
View raw message