            :evmsgs []}
           eventhandlers))
 
-(defn advance [ruleset msg]
+(defn advance [{:keys [ruleset] :as router} msg]
   "Takes a message, runs it against ruleset and returns a sequence of routed messages."
   (debug "routing starting with" (printable-msg msg))
   (if (< (::transition-count msg) 100)


(comment

  (def ruleset2
    {:routes
     {:book-flight
      {:transitions {:auth-checker :overbooked-checker-remote}}}})

  (def ruleset1
    ;;; you can have many routes
    {:routes

     ;;; defining a route :book-flight
     {:book-flight

                     :booker {:transform (fn [msg] (assoc msg :checked true))
                              :next [:invoice-generator (fn [msg] :notifier)]}}}}})

  #_(def router1 (message-router ruleset1))

  (->> (message :book-flight {:foo :bar})
