In a state machine made with SCXML, is there any way to set a dynamic target value for a transition?
I mean, suppose I have an object called "obj" which has been set as the datamodel for a scxml. So there can be set conditions (if there were a property called checkCondition in the object) on it like:
cond="obj.checkCondition"
<state id="state1">
<transition cond="obj.checkCondition" target="state2"/>
</state>
<state id="state2">
...
</state>
I have another property in obj called nextTarget. I want to set the target in this transition reading its value from the object (as it is done in the conditions).
<state id="state1">
<transition cond="obj.checkCondition" target="eval(obj.nextTarget)"/>
</state>
<!-- Where in obj.nextTarget there it has been set as value "state1", "state2" or any state name -->
Is there any syntax to do this?
Thanks.