O'Reilly logo

Microsoft Windows Workflow Foundation 4.0 Cookbook by Andrew Zhu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using a customized extension

WF4 also allows us to define our own WF4 extensions. In this task, we will create a simple extension and use this extension in a workflow.

How to do it...

  1. Create a Workflow Console Application:

    Add a new Workflow Console Application to the Chapter06 solution and name it UsingCustomizedExtension.

  2. Create a customized extension:

    Add a new code file to the project and name the file SimpleExtension.cs. Fill the file with the following code:

    using System.Activities.Hosting; using System.Collections.Generic; using System; namespace UsingCustomizedExtension { public class SimpleExtension : IWorkflowInstanceExtension { private WorkflowInstanceProxy instance; public IEnumerable<object> GetAdditionalExtensions() { return null; } public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required