Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State machine of state machines #1

Open
mohsenoid opened this issue Jul 15, 2017 · 2 comments
Open

State machine of state machines #1

mohsenoid opened this issue Jul 15, 2017 · 2 comments

Comments

@mohsenoid
Copy link

I was testing your cool library to use in my project which is fully written in Kotlin, and my question is what is the best implementation of having a main state machine which dispatch system control to other state machines and get control back and dispatch it to another one?

To be more specific, in my Android application I have different parts that my core(which would be the main state machine) can pass control to them and every one of them are another separate state machines which can give back control to the core.

I try to have different executor with same configurator but I am not sure if it is correct or not, however this way my configurator should include all my different state machines states and events!!

@MiloszKrajewski
Copy link
Owner

I'm not sure if I understand what you are trying to do. I can imagine switchable bevaviour implementated with "currentExecutor" as a field in main state machine and redirecting all evens from main machine into "currentExecutor" not worrying what it actually is. You can implement some special states in sub machines which may indicate that current executor should be switched to something else.

I'm not really sure exactly what you want to do though.

@mohsenoid
Copy link
Author

mohsenoid commented Jul 26, 2017

Because of my application complexity if I am going to implement all my states in a single state machine it would get really complicated and hard to maintain.
I was thinking for having separate FSM and passing execution between them, but had no idea if is it possible with your library and how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants