I'm seeing some examples that are almost what I'm looking for but not quite:
I have a handful of small state machines that each represent a short flow a user can take on an entity. In certain cases (access control, certain screens), different flows are available to them (i.e. delete is available only on one screen). I'm trying to compose the machines together based on the screen and the user role.
Setting everything up using invoke seems to work, but how do I delegate events to the invoked child machine?
- Hand the view a reference to the relevant child actor - render component dedicated to a certain machine depending on the active parent state, get that actorRef using
actorRef.getSnapShot().children.<machineId> - Use the wildcard transition with
sendToto send all events to whichever child machine is currently running
Am I missing something?