Skip to Content
Microsoft Windows Workflow Foundation 4.0 Cookbook
book

Microsoft Windows Workflow Foundation 4.0 Cookbook

by Andrew Zhu
September 2010
Intermediate to advanced content levelIntermediate to advanced
272 pages
5h 16m
English
Packt Publishing
Content preview from Microsoft Windows Workflow Foundation 4.0 Cookbook

Creating an Input Message activity using Bookmark

When a workflow is running and we want to send a message to the workflow during run time, how can we achieve this? We can use Bookmark to achieve this. In this task, we will create an activity using Bookmark, which will function as a message input activity.

How to do it...

  1. Create the InputMessage activity:

    Add a new code file to the ActivityLibrary project named InputMessage.cs. Then, replace all the default code with the following code:

    using System.Activities; public class InputMessage<T>:NativeActivity { public InArgument<string> bookmarkName { get; set; } public OutArgument<T> result { get; set; } protected override void Execute(NativeActivityContext context){ context.CreateBookmark(bookmarkName.Get(context), ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Essential Windows Workflow Foundation

Essential Windows Workflow Foundation

Dharma Shukla, Bob Schmidt

Publisher Resources

ISBN: 9781849680783Other