Is there a best-of-breed in-memory FSM library for Java?
I think ideal library would be relatively simple with support for events, actions, and transitions. It wouldn't require external configuration or precompilation. It wouldn't have to be concurrent capable or multi-threaded. Nice if it was hierarchical, but also not required. I think the State Machine included in Qt (C++) is at the ideal level of complexity and functionality. In fact, there are a number of interesting FSM libraries for C/C++, but I've been unable to find anything similar for Java.
I've come across the following Java libraries so far:
- Unimod FSM Framework - Looks very good, but maybe overly complex.
- Tungsten FSM Library - No longer active as a standalone library. No documentation that I could find.
- Apache SCXML - Maybe? I've read that it has issues, but haven't used it yet myself.
A number of articles online discuss ideas for implementing a custom FSM in Java, and maybe that's the way to go for simple in-memory FSM needs. At first I considered using a BPM engine like Activiti, but I think that those types of libraries are overkill and are more oriented towards process workflow.
I'm looking to use an FSM for managing the high level behaviors of a small robot. However, I would expect a decent FSM library of this type would also be applicable to GUI state management, game flow, and simple AI.
Any library recommendations, notes on experience with libraries above, or pointers to recent and modern FSM implementation strategies in Java would be appreciated.