You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a state machine with two states called One and Two.
There are two triggers
GotoTwo from One to Two
and ReenterTwo from Two back to Two
There are then two OnEntry statements defined
OnEntry from GotoTwo runs a function called OnlyRunOnFirstEntryToTwo
OnEntry from ReenterTwo runs a function called RunOnEveryReentryToTwo
var sm = new StateMachine<State, Trigger>(State.One, FiringMode.Immediate);
sm.Configure(State.One)
.Permit(Trigger.GotoTwo, State.Two)
;
sm.Configure(State.Two)
.OnEntryFromAsync(Trigger.GotoTwo, OnlyRunOnFirstEntryToTwo)
.PermitReentry(Trigger.ReenterTwo)
.OnEntryFromAsync(Trigger.ReenterTwo, RunOnEveryReentryToTwo)
;
In the visualisation, I would expect a single entry label with something like "entry [GotoTwo] / OnlyRunOnFirstEntryToTwo"
Then on the reentry arrow, only the label "ReenterTwo / RunOnEveryReentryToTwo".
However, both function names appear as both entry statements inside the state and on the reentry arrow for ReenterTwo.
Further investigation - The GetInfo() method returns a StateMachineInfo with missing information. The StateInfo for state Two has a list of EntryAction ActionInfo objects, but the FromTrigger strings are null on both.
Tracked the bug down to the (mis)representation of async trigger entry actions. Instead of "hiding" the trigger inside an anonymous action, I have mirrored the sync version. Please see PR: #511
Consider a state machine with two states called One and Two.
There are two triggers
There are then two OnEntry statements defined
In the visualisation, I would expect a single entry label with something like "entry [GotoTwo] / OnlyRunOnFirstEntryToTwo"
Then on the reentry arrow, only the label "ReenterTwo / RunOnEveryReentryToTwo".
However, both function names appear as both entry statements inside the state and on the reentry arrow for ReenterTwo.
The text was updated successfully, but these errors were encountered: