Re-Hosting the Windows Workflow Designer
I mentioned a couple of days back that we are depending on Windows Workflow as well as WCF. We did a form of proprietary workflow years ago in the legacy version of our Financial application that works somewhat well for the banks that use it. In the new architecture I am designing, we are doing way more and shooting for the large enterprises. We went to SOA, .NET 3, Agile and WCF a year ago and we rolled out a CTP to a major bank overseas about 12 Iterations ago that is real value working in the field. We knew we wanted to do something very different from our workflow in the legacy product which is defined in a table format. We wanted a lot more extensibility, flexibility and maybe something visual and easier to use. On the architecture front, I begun to look at WWF these past few weeks as a possible solution and it met a lot of the busines needs. Today, I begun to dig in. The WWF Runtime is of course, fairly straightforward to host in any CLR executable (WinForms, ASP.NET, Console apps, etc.). I was curious to see if we could do something like re-host the Workflow Designer inside our Smart Client/CAB application. I found this wonderful article and sample code on MSDN. There are really only three major classes to be concerned with: DesignSurface, WorkflowView,and WorkflowDesignerLoader and I was able to get this working with no changes with the latest .NET Framewoork 3. Then, with some work, I spiked up a little code to see if I could re-host it and sure enough I did. Its pretty feaking cool too! I have to do a lot more stuff to add code on what I actually do with the Workflow and such but its a great start.