(WF4) Setting a default type parameter for Generic Activities added from the Toolbox

One of our internal customers pinged me with a quick question today. He asked whether it is possible to set a default type argument for T if you have an activity of GenericType, say DataCollectorActivity<T>. I might have said this in passing by before but the answer is yes, the same technique is used for…


Custom Flowchart Runtime Thoughts (for ICompositeView)

Disclaimer: no WF 4.0 runtime experts were consulted for advice in the thinking of this. YMMV. Things have been busy lately and though I have had a couple requests to continue the ICompositeView series (see earlier posts), I haven’t had much free time. Compounding the free time scarcity, decisions seem needed. Do people want to…


Argument, Variables, Assign and Let Activity

Forum posts give me a lot of crazy ideas. This one might be a throwaway, but it’s the process of trying things out and exploring that triggers off yet more ideas. 🙂 Occasionally Workflow Foundation 4 developers feel bugged by the need for Variables. Or actually the ‘ceremony’ of using Variables for glue or piping…


Basic Activity Scheduling in Workflow 4.0

…NativeActivity. Provides all of the features of CodeActivity, plus aborting activity execution, canceling child activity execution, using bookmarks, and scheduling activities… As of .Net Fx 4.0 Beta 2, the Activity class hierarchy looks a bit like this: Actually this is only a tiny chunk of the Activity class Hierarchy, but it does include every class…


Undoable Layout for the Freeform Canvas Activity Designer (Part 6)

This is Part 6 of a series of posts on flowchart-like freeform layout activity designers, [Part 1 – Part 2 – Part 3 – Part 4 – Part 5 – Part 6  – Part 7] I’ve started varying the titles. In Parts 1-4 we began developing a freeform layout designer called CanvasDesigner. In Part 5, we…


Fun with Bookmarks: Implementing Continue and Break

A few people have noticed in the Workflow Foundation Beta 2 forums that the looping constructs provided in System.Activities.Statements such as While activity, ForEach activity, and ParallelForEach lack certain features found in their C# counterparts – there is no break or continue statement. This seemed like an interesting problem – how can we implement these missing features…


Freeform Custom Activity Designers using ICompositeView (Part 2)

This post is Part 2 of a series on writing custom activity designers. [Part 1 – Part 2 – Part 3 – Part 4 – Part 5] Last time we found out that ICompositeView.OnItemsDelete() will never get called – unless we tell our contained activities exactly which composite view they belong to. But we didn’t…


Freeform Custom Activity Designers using ICompositeView

[This post is Part 1 of a series on writing custom activity designers. Part 2 – Part 3 – Part 4 – Part 5 – Part 6 – Part 7] Motivation: Building an activity like Flowchart Creating composite activities and designers in Workflow Foundation 4.0 is really easy when you use WorkflowItemPresenter and WorkflowItemsPresenter. (Seriously….