Showing posts with label WorkFlow Foundation. Show all posts
Showing posts with label WorkFlow Foundation. Show all posts

Wednesday, February 18, 2009

Workflow 3.5 Designer Rehosting

Since the release of Workflow, Designer Rehosting has been promoted as one of the good qualities of Workflow. In each article or presentation Designer Rehosting keeps coming back as a good thing. So I decided to put it to the test. I started with trying to find a reason why a customer would want to use Designer Rehosting. Microsoft gave me the following reasons:

  • (Design Time) To view, create or modify Workflows
  • (Runtime) To view the current state of an executing workflow by utilizing the tracking information.

Both reasons are obvious and still don't give me any reason to sell it to a customer, they can use Visual Studio to do exactly the same. There's another reason why your customer might want to use Designer Rehosting. Maybe in some sort of specific scenario he wants to customize views to his needs or choices. With Designer Rehosting you can choose to expose as much or as little functionality of Workflow as you wish.

I started with catching up on Designer Rehosting, MSDN has some great articles on that, you can find them here. Microsoft made some sample bits to get you up to speed, those can be found here. After I read the documentation (that's a lie) and grinding the code, I tried to do it myself. I must admit, I expected it to be easier. The actual hosting WF in a Winforms app is easy, but to put something of a framework together that was hard. Maybe I should have just copied all the code from the sample bits, but I hate to do that.

All the things you need to get your view in order can be found in System.ComponentModel.Design. I used the WorflowView, DesignSurface and the WorkflowDesignerLoader to get my View in order. After a little bit of yelling and screaming at my PC, the view looked like this:

winapp

The thing that got me screaming was the toolbox control, I expected that this toolbox would be in System.ComponentModel.Design, it was not. I did not find a control that showed me all the Activities from System.Workflow.Activities, so I ended up making the thing by myself. I don't know why Microsoft chose to not expose that control, but it sure would have helped me. Then again I'm now able to (for example) let the InvokeWebServiceActivity disappear from my toolbox, or show one of my own custom Activities.

So now I'm able to drag and drop my Activities to my Workflow, that's cool! This is the basics on Designer Rehosting. I can load a Workflow and show it in my app. I didn't have time to get the Tracking ready, that will be my next project and just for fun I want to be able to add some code, but that's a whole different ballgame.

To be honest I think that you should really think about if you want to use Designer Rehosting. It sounds easy and they make it look like you really want to, but you need to write a lot of plumbing code before you even have a simple app like this. I don't think there will be a lot of customers that really need Designer Rehosting, there are usually other (better and simpler) solutions for the same problem.

Tuesday, October 28, 2008

WF 4.0 vs WF 3.0

A fast blog for now: the best improvements for WF 4.0!

Activity:

  • Authoring is simpler and takes much less code
  • Fully declarative workflows and activities
  • Alignment across Expressions, Rules, and Activities
  • Seamless Composition Across Flow Styles

Runtime

  • 10-100x Performance Improvements
  • Full control over persistence
  • Flow-in Transactions
  • Partial Trust Support
  • Integrates with WCF, WPF, ASP.NET

Tools

  • Designer Performance and usablility
  • Rehosting Improvements
  • Unified Debugging Experience

I've seen the new Designer and it rocks! It looks better and even has a new zoomfunction which works much better then the old! But they added more they added external Arguments you can assign which goes in and out. And my personal favourite it even shows which variables are in scope! And it's possible to use expressions on those variables.

WF 4.0 is a part of "Dublin" for a complete overview on "Dublin" check it out here!

Monday, October 6, 2008

Pageflow available on CodePlex

After a three week vacation in France and Italy, I'm catching up on the latest facts and the first good news I read was that my colleague Wouter Crooy finally managed to get Pageflow on CodePlex!

We've been working with Pageflow for over a year now and he's been trying to get it on CodePlex for about half a year, so congratulations!