I have the following code that is working in 0.9 but failing in 2.0-SNAPSHOT
.
SCXMLExecutor engine;
Context rootContext;
Evaluator evaluator;
.....
rootContext = evaluator.newContext(null);
engine.setRootContext(rootContext);
engine.go();
rootContext.set("intent", "StartBot");
engine.triggerEvent("run", TriggerEvent.SIGNAL_EVENT);
----------------------
<scxml xmlns="http://www.w3.org/2005/07/scxml"
version="1.0"
datamodel="jexl"
initial="Start">
<datamodel>
<data id="intent" expr=""hello"" />
....
</datamodel>
<state id="Start">
<transition event="run" cond="intent eq "startBot""
target="StartBot" />
<transition event="run" target="Default" />
</state>
<state id="Default">
<onentry>
<log expr="intent" />
<assign location="response" expr=""Sorry I do not
understand!"" />
</onentry>
<transition target="Start" />
</state>
<state id="StartBot">
.....
--------------------------------------------------------------------------------------
The StartBot state is not entered, rather the Default state is entered and
the value
of the "intent" datamodel item is printed as 'hello' rather than 'StartBot'
as expected
INFO: transition (event = run, cond = null, from = /Start, to = /Default)
INFO: null: hello
This same code is working with version 0.9.
Do I have to do things differently with 2.0-SNAPHOT for it to work?
Regards,
Diptendu Dutta