This just works for me

Jun 27, 2010 at 1:24 PM


I am using SimpleStateMachine for my project and it just works for me. I use "graphviz" to visualize the state machine and custom tasks to carry out actions.

Thanks for providing this stuff for us.



Jun 29, 2010 at 3:51 PM
I'm pleased to hear that! Is graphviz easy to use for such tasks? That's something I would like to play with myself.
Jun 29, 2010 at 5:17 PM
Edited Jun 29, 2010 at 5:19 PM

Yes, it is rather easy to convert a SimpleStateMachine to Graphviz's DOT langauge. The result usually looks good enough. I use SVG output and then convert it to PNG with ImageMagick. Unfortunately the conversion takes awfull long, aprox. one second. This is a problem, because the state transitions are displayed as they occur on the fly and 1 sec latency is noticable. Does anyone know a fast .NET SVG to png rendering engine? For graphviz, instead of runing it as a new process, I'd recommend to load the neccessary functions with PInvoke to speed things up... get the SVG output damn fast....

By the way, there was a question earlier regarding to "Parallel Proccess".

"Instead you may want to have a single state, AwaitingDocumentResults, and this state can either host an inner state machine for each document, or can handle waiting for the responses in application logic. In the end, I think the state machine library should probably be given the ability to manage multiple child states automatically, but it will take care not to drift into re-creating WF and building a sequential workflow library into the state machine library, where it doesn't belong. "

 I don't quite understand how this would work in practice. To get around the very same issue, I use a custom task to transfer events from one state machine to an other. Typically the state machines run in separate processes and .NET remoting takes care of passing the events. The issue is, that defining how the 'independent' state machines interract eachother gets a bit complicated in the .boo file.