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.
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.