I want to implement this sort of a conditional transition in SCXML:
current_state = s01
if (Math.random() < 50) go to state s02
else go to state s03
Is this sort of conditional targets supported in SCXML ?
To put it into the SCXML language, is the equivalent of the following snippet possible ?
<transition event="event_1">
<if cond="import java.util.Random; Math.abs(new Random().nextInt(100)) gt 50">
<target="s02"/>
<else/>
<target="s03"/>
</if>
</transition>
Would appreciate any pointers to their doc. for this / alternative strategies to handle it.
Thanks.