Description
🐞 Issue: getState().getId() returns null when reusing a submachine in multiple parent states
Description:
I've created a minimal project to demonstrate a bug that occurs when a single submachine is reused in multiple states of a parent state machine.
The issue is that when the submachine is reused in more than one parent state, stateMachine.getState().getId() unexpectedly returns null.
Reproduction:
A working test shows that if the submachine is used in only one state of the parent machine, everything works as expected.
A failing test demonstrates the bug: reusing the same submachine in multiple parent states results in getState().getId() returning null.
Expected behavior:
getState().getId() should return the correct state ID regardless of how many times a submachine is reused.
Repo:
You can find the full reproducible example here: repo
Let me know if you need any additional information or a stripped-down version of the project.