SCION-CORE
SCION-CORE copied to clipboard
Bug identified for history states when using self-transitions
var sm = new scion.Statechart({ states: [ { id: 'A', transitions: [ { event: 't2', target: ‘A’ // Using 'History' here has same effect... } ], states: [ { id: 'History', $type: 'history', isDeep: true, transitions: [ { target: 'A1' } ] }, { id: 'A1', transitions: [ { event: 't1', target: 'A22' } ] }, { id: 'A2', states: [ { id: 'A21' }, { id: 'A22' } ] } ] } ] });
sm.start(); alert('Current: ' + sm.getConfiguration()[0]); // A1 sm.gen('t1'); alert('Current: ' + sm.getConfiguration()[0]); // A22 sm.gen('t2'); // Self-transition alert('Current: ' + sm.getConfiguration()[0]); // A22 expected but A1 is displayed, why?