A developer’s view of Workflow

A new programming language Windows Workflow Foundation (WF) 4.0 offers many features to simplify business application development, deployment and management. In this post I’d like to explore workflow from a developer’s angle as a new programming language. WF has a lot of “new” features compared to mainstream industry languages like C\C++\Java\C#\VB. As a developer, I…

5

Workflow Foundation 4.0 Activity Model (I)

Workflow as Activities If you have programmed with Windows Workflow Foundation (WF), you should be very familiar with Activities. In WF, programs are defined by a tree of Activities. Some Activities are used to control the flow of program, like Sequence, If, and While; some Activities perform specific actions, like Assign, InvokeMethod and WriteLine; some…

4

WF State Machine Activity Pack CTP1 Released

The WF State Machine Activity Pack CTP1 is released on CodePlex NOW!!  Please check it out. Last year in PDC2009, I ran a chalk talk on our work on WF 4 State Machine Activities and promised the team would ship an implementation for public review after the release of Visual Studio 2010.  Today, I am so…

3

[How To] Save WF4 Workflow Definition to Image Using Code

One of the benefits of using WF4 to create workflow is that it provides a graphical workflow designer. This means in most of the cases, developers don’t need to write code to define their workflows. Instead, they can use the graphical workflow designer we provided. This can not only dramatically improve the productivity but also…


Event-driven execution in .NET 4.0 with the Pick activity

.NET 4.0 and WF 4.0 include a new event-driven control flow activity called Pick that takes the place of the original Listen activity in .NET 3.x. Whereas the branches in the Listen activity may be triggered only by activities that implement the IEventActivity interface, the branches in a Pick activity may be triggered by any…

2

Workflow Foundation 4.0 Activity Data Model (III)

We talked about WF4 Activity overview and WF parameters in particular in previous posts. In this installment, I’m going to focus on WF variables. Variable Variables are modeled by Variable class.     namespace System.Activities     {           public abstract class Variable : LocationReference         {             public ActivityWithResult Default { get; set; }             public…

1

Workflow Foundation Internals (I)

Workflow Foundation Internals (I) Andrew Au Inspired by the book Essential Windows Workflow Foundation that describes the last version of Workflow Foundation, I can’t stop myself trying to write an equivalent piece for WF4. While the basic working principle is fundamentally the same, the programming model is quite different. We will start from the same…

1

Workflow Foundation 4.0 Activity Model (II)

In previous post I introduced WF4’s Activity model. In this section, I’m going to use 2 samples to demo 4 styles to create a custom Activity. How to build a leaf activity – HttpGet   Today HTTP based RESTful services are getting popular, so it might be useful to perform some basic HTTP operations in workflow….

1

Workflow Foundation 4.0 Activity Data Model (II)

In the 1st segment, I talked about high level principle for WF4’s data model design. I’m going to talk about WF Argument in particular in this post. Argument We’ve briefly touched this before: in WF4, arguments are modeled by Argument class. namespace System.Activities {   public abstract class Argument {     public Type ArgumentType { get;…

1

Hotfix from WPF to Solve Workflow Designer Hang Issue in Some Cases

Recently we’ve received a few customer feedbacks reporting WF4 workflow designer would have bad performance or hang in some cases even when the workflow is relatively small. We’ve worked with customers and found out that it was actually a WPF issue. Good news is, the WPF team has already release a hotfix for it. So…