WF 4.0 What is different from 3.X part 2

Published Wed, May 27 2009 12:13 PM

Some more facts about WF 4.0.

Part 1 can be found here

  1. There is no rule engine anymore!
  2. Workflows have a XAML extension now. (activities can have that too)
  3. Everything in a XAML workflow is XAML based (suprising isn’t it ;-. In WF 3.X this wasn’t the case). Now there is no CodeDom for expressions/rules anymore. (Code based workflows are possible also)
  4. The designer is completely new. WPF based and easier to rehost in your own application.
  5. No binding of activities to each other anymore. This is the responsibility of variables and arguments from now on.
  6. No dependency properties anymore on custom activities, but InArgument<T> and OutArgument<T> properties.
  7. It’s easier to make Custom Activities. Custom activities can be made in code or in XAML. There are a lot of base classes for code based custom activities. WorkflowElement is the base class of all activities. CodeActivity<T> for simple activities that return 1 value (of type T). CodeActivity for simple activities that return no or multiple values. NativeActivity<T> and NativeActivity for complex activities like long running activities.
  8. No code condition or declarative rule condition anymore. Every rule can be coded as an expression. Expressions are stored in XAML within the Workflow XAML file. No seperate CodeDom rules file anymore.
  9. No WorkflowSchedulerService (Manual or Default) anymore to manage on which thread the workflow runs. In WF 4.0 Use WorkflowInstance or WorkflowInvoker. WorkflowInstance for Async workflows (on a separate thread) and WorkflowInvoker for Synchrone workflows (on the running thread). The latter is ideal for unit testing activities.

to be continued…

Comments

# Marcel Bradea said on Friday, June 26, 2009 6:28 PM

Great list of changes to come! Great to know what things to watch out for in current architecture, such as rules not being run from files anymore and conditions being specified in VB etc.

Great work!

# Daniel said on Tuesday, October 05, 2010 8:42 AM

i'm starting with WF...should i start with 3.5 or 4.0..

# Pascal Naber said on Tuesday, October 05, 2010 11:32 PM

Daniel, the concepts are the same, but overall everything is changed. If you don't have any requirements with your project to use 3.5, I would start with 4.0.

3.5 is legacy...

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 6 and 3 and type the answer here: