Closed joeloyj closed 7 years ago
Thanks Joel,
Investigating...
Hi Joel, you've uncovered a bug that will cause what you're seeing whenever you leave a composite state via a transition whose source is a pseudo state. The code uses the last known state in the active state configuration (which is always a state as its used for history purposes as well) as the basis for what child states to leave.
In your example, when bootstrapping the transition from aChoice
to b
it determines that it needs to exit a
and then cascades the leave operation using the last know state.
I will investigate potential fixes, but this may take a little time - in the mean time, if you can restructure (or don't have any exit behaviour on aa), then you'll be fine.
I have an approach to fixing the issues and am fairly well progressed on the development, but a little more work and testing required; should be in a stable state in a few days.
Unfortunately, the approach I was looking at will not work; I have another angle of attach. This requires that I extend and expand the active state configuration to contain both the last known state and the current active vertex.
Fixed by release v5.11.0
Example:
Running the above code produces:
Note that
instance leave model.default.a.default.aa
is executed twice. The second occurrence should beinstance leave model.default.a.default.aChoice
.