I'm trying to use Automat to map out transitions that are either of the paths below.
- There can be many claims sent to an external service. Each claim, after being sent, can be :acknowledged or :rejected. - If a claim is :acknowledged, it can then either be :accepted or :rejected. - There will be many such claims [:sent :acknowledged :accepted] [:sent :acknowledged :rejected] [:sent :rejected] I'm trying to figure out how to use Automat to handle this use case. - The only way to advance through your FSM, seems to be to call fsm/advance (or fsm/advance-stream). How do we deal with forks in the road? - Looking at the documentation <https://github.com/ztellman/automat#a-short-example> and tests <https://github.com/ztellman/automat/blob/master/test/automat/fsm_test.clj>, it's not clear to me if I can pass multiple tokens (or claims) through 1 FSM. Are we meant to use 1 FSM per token (claim in this case)? - The semantics for Automat have you declare transitions, instead of states. States are implicit numbers between the transitions. Pallet-fsm <https://github.com/pallet/pallet-fsm> seems to follow the state declaration pattern, but hasn't been updated in a few years. Can I name the states and transitions between them? - There always seems to be one output state, even if they come from 2 different transitions. So the below 2 FSMs are equivalent. However, they both go to the same end state. Is there a way to define different output states? => (require '[automat.viz :refer (view)]) => (require '[automat.core :as a]) => (view (a/or [:sent :acknowledged :accepted] [:sent :acknowledged :rejected] [:sent :rejected])) => (view [:sent (a/or [:acknowledged (a/or :accepted :rejected)] [:rejected])]) Tim Washington Interruptsoftware.com <http://interruptsoftware.com> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.