Open nightroman opened 5 months ago
Thanks for writing this up, @nightroman.
I think that in this case the graph output is correct since OnAssigned
is specifically configured for the parameterised Assign
trigger, whereas the re-entrant transition uses the Assign
trigger directly.
Does this explain what you're seeing?
Thanks
On transitioning from Assigned
to Assigned
(re-entry) the parameterized trigger Assign
is called, i.e. one has to specify the new bug assignee. E.g. when assigning from Harry to Fred here, we provide the parameter "Fred":
In other words, .PermitReentry(Trigger.Assign)
does not mean that the re-entry is not parameterized. The same parameterized .OnEntryFrom(_assignTrigger, OnAssigned)
applies and the call to OnAssigned
is happening on re-entry (debugging, testing, logging confirm this).
Thanks for the quick reply. I really shouldn't try to debug stuff when I'm tired :)
I'll try to spend some time on this over the next few days, unless you're already working on it.
Thanks
@mclift Thank you. No, I am not working on this (yet, maybe another day and another issue). Besides, this issue may be related or be in the same area as #587 and you have already started some work #589 (great!). So it might be reasonable either to fix both issues together or one after another.
As for contributing, in a way... at this point I've been working on PowerShell helpers for Stateless: https://github.com/dotnet-state-machine/stateless/discussions/592 These tools are useful for state machine interactive testing, low ceremony graph generation/show, etc.
Here is the graph of the official BugTrackerExample
Note that it correctly shows the label
Assign / OnAssigned
on transitioning fromOpen
toAssigned
and fromDeferred
toAssigned
.But on transitioning from
Assigned
toAssigned
(re-entry) the label is justAssign
instead of expectedAssign / OnAssigned
. (OnAssigned
is called on re-entry toAssigned
and this should be reflected).