Skip to content

OnEntry not firing when entering parent state from child state in Windows environment #98

@averyscottnorris

Description

@averyscottnorris

Hello,

We recently experienced some inconsistent behaviors between our windows and linux/macOS environments that I wanted to bring to your attention.

Essentially, we have a reusable set of states that we apply to several different workflows. In this reusable set of states, we have a 'working' state that does work on an item. For most of our workflows, this single state is sufficient, but one workflow has two separate paths of the type of work that should be done, depending on the type of item. So in this case, we decided to give the parent working state two substates. We then override the parent to act as a passthrough, adding an OnEntry that checks a condition and then transitions to one child or the other based on that condition.

There is also a cancel trigger that can apply from this working state or its substates, that returns to the main working state. In other workflows this behaves fine (where there are no child states, and working state simply re-enters itself with the next item). In this case, however, when transitioning from a child of the working state to the parent working state, the onEntry does not trigger and you are not correctly transitioned into the appropriate child state.

From our testing, this seems to only affects windows environments. Our mac devs seem to be unable to reproduce this issue. For our part, we've solved our immediate issue by making our two substates into sibling states of the working state, which does correctly trigger the OnEntry in both windows and linux/mac environments

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions