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

Request: Support for multiple guards #34

Open
pickledgator opened this issue Nov 17, 2021 · 0 comments
Open

Request: Support for multiple guards #34

pickledgator opened this issue Nov 17, 2021 · 0 comments

Comments

@pickledgator
Copy link

I have a use case where I often need to validate transitions using multiple guards. For now, this requires an extra member function that wraps other boolean checks such that a single bool output is provided to the fsm API. It would be awesome to reduce some of the boilerplate by supporting the ability to provide a list of guards that need to all be AND'd together to validate the transition. Then on the handle_event, here, you'd just check for each of the provided guards before proceeding. This pattern is similar to the API provided by the python transitions lib.

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

1 participant