commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Azraiyl <>
Subject [scxml] update datamodel
Date Sat, 04 Sep 2010 16:40:30 GMT

I've a simple state machine

<?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="" version="1.0"
name="Fan2" initial="Off" exmode="strict">
		<data id="T" expr="10"/>
	<state id="Off">
			<log expr="'OnEntry Off'"/>
		<transition cond="T &gt; 30" target="On"/>
			<log expr="'OnExit Off'"/>
	<state id="On">
			<log expr="'OnEntry On'"/>
		<transition cond="T &lt; 20" target="Off"/>
			<log expr="'OnExit On'"/>

and like to update T through Java. I tried this:

fan2.getEngine().getRootContext().set("T", "40");

but somehow the engine does not switch into the new state. Do I have
to manually trigger the engine to reevaluate all expression or what
I'am missing?

Thanks in advance for any hint

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

View raw message