WF 4.0 What is different from 3.X part 2
Some more facts about WF 4.0.
Part 1 can be found here
- There is no rule engine anymore!
- Workflows have a XAML extension now. (activities can have that too)
- 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)
- The designer is completely new. WPF based and easier to rehost in your own application.
- No binding of activities to each other anymore. This is the responsibility of variables and arguments from now on.
- No dependency properties anymore on custom activities, but InArgument<T> and OutArgument<T> properties.
- 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.
- 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.
- 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…