Hi! Have you tried to create stateful agents? This would be useful for implementing long running business processes. The state would be saved to db for durbality and atomicity. In case of crash, the process implemented as agent would continue to execute from the last durable state. I have implemented (lol funny to say implemented but in case of LISP the job is partialy done :-)) already this:
(ns bpml.core) (defmacro statful[ & a ] # this macro analyses its arguments lineary and when matches the state of entity with name of catched defactivity then continues executing body from that place ) (defactivity receive-credit![ a ] # user processing rules ) (defn scenario-one[ a ] (stateful (let[ z (receive-credit! a) g (approval! z)] (when-not (approved? g) (include-transaction-history! g)) (include-standard-text! g) (send-jms (do ))))) (dispatch-jms "jms://queueu:12232/me" (fn[ msg ] true ) scenario-one) This is some kind of that process www.omg.org/news/meetings/workshops/HC-Australia/Mancarella.pdf from page number 8. The main idea is not to mimic BPML since LISP != Graph (I would make interpretation of XML, but not now in prototyping stage). The first idea to achive that is to store state of input/output arguments of each call to any activity (defined with defactivity) and next time when there is the recovery from crash, stateful macro do the job as it is written above in its body as comment. Maybe you have other ideas for to implement such functionality? Why I'm trying to do stateful processing in Clojure? Because LISP is a mother of ALL languages. It allows to implement any kind of processing flow especially the abstract one/declerative/higher order. But somehow this concept seems to be hard, since I can't express it in declerative way but by imperative tracing. Another idea is to use monads but I'm to weak to understand them in way allowing to implement it. -- 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