I'm running a state machine workflow to control user interactions with the website. The workflow runtime is hosted in asp.net. I was able to get it to work as I wanted it to but still the event fired to transition a state in the workflow doesn't always transition the state. This makes me question the integration of WWF with asp.net:
Is hosting workflow runtime in asp.net mvc environment the best choice?
Or is it better to host the runtime in a windows service using Windows Workflow Service Host and allow asp.net application access it through WCF?
Are there any success stories out there that anybody would like to share?
Any comments and suggestions are welcome,
Thanks,
Cullen
I have an alternative for you if you are open to a non-Microsoft solution, although it is .Net based. I have used a framework called Stateless, a state-machine by Nicholas Blumhardt - creator of Autofac- where you can do the following:
With very little effort you can persist your state, then retrieve that state easily later on. Notice that you have NO need to host a separate runtime environment. If you state is represented by an integer, you can fetch that value, instantiate a Stateless object with the current state and you now are ready to update your state machine. The beauty is that you do not need the overhead that normally is required of Workflow Foundation.
I have used this in production for 4 months and it works very well. I think you could adapt this quite easily to ASP.Net MVC.
In respect updating the workflow dynamically, if you configure a state machine such as
and maintain a separate file of states and triggers in XML, you can perform a configuration at runtime by looping through the string int value pairs.