Skip to content
This repository was archived by the owner on Sep 25, 2018. It is now read-only.
This repository was archived by the owner on Sep 25, 2018. It is now read-only.

Bug identified for history states when using self-transitions #45

@Bab64

Description

@Bab64

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions