Click here to Skip to main content
12,824,299 members (43,434 online)
Click here to Skip to main content
Add your own
alternative version


21 bookmarked
Posted 18 Dec 2006

Hosting Windows Workflow Foundation

, 3 Jan 2007
Rate this:
Please Sign up or sign in to vote.
Using Parameter to host workflow


A workflow and a host application can pass data between them by using parameters. On the workflow side, a parameter is a simple property that is defined in your workflow class. If a set method is defined for the property, the host application can set that property before the workflow executes by passing in a parameters collection during the <?XML:NAMESPACE PREFIX = MSHelp /><MSHelp:link tabIndex=0 keywords="M:System.Workflow.Runtime.WorkflowRuntime.CreateWorkflow(System.Type,System.Collections.Generic.Dictionary{System.String,System.Object})">CreateWorkflow method call. To return parameters back to the host application after it finishes executing, you can define a get method for the property.

in this artical, create an string property named FirstName, LastName and Age as Integer. this property is passed to workflow when the report is submitted.

whats the windows workflow foundation engine?

The Windows Workflow Foundation runtime engine is responsible for creating and maintaining running workflow instances. To accomplish this, the runtime engine needs a host process that includes console applications, Windows Forms-based applications, ASP.NET Web sites, and Web services. Additionally, workflow-enabled applications that host the Windows Workflow Foundation runtime engine can further refine the behavior of the workflow runtime engine by using services. The base services in Windows Workflow Foundation can be configured to support transactions, persistence, tracking, threading, and scheduling. For application-specific functionality, your application can also define custom services that can be added to the runtime engine.

Creating a Workflow Host

The host interacts with Windows Workflow Foundation through the <MSHelp:link tabIndex=0 keywords="T:System.Workflow.Runtime.WorkflowRuntime">WorkflowRuntime class, or a custom class that inherits from it. You create a WorkflowRuntime object and populate it with the services that you will use during the execution of your workflows.

Host Responsibilities

Host responsibilities are as follows:

  • Create one or more processes and one or more application domains.

  • Provide isolation mechanisms as needed.

  • Marshal calls between application domains as needed.

  • Start workflow instances.

  • Create custom and local services.

Additionally, a host might do the following:

  • Control the loading and unloading of workflows from memory.

  • Listen for specific events and communicate them to a user or administrator.

  • Set time-outs and retries for each workflow.

  • Expose performance counters.

  • Write log information for debugging and diagnostics.

  • Provide custom service implementations.

  • Create localized services to meet language requirements of the hosting application and user base.

Download Project. working using vs 2005



This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Omar Fawzy
Web Developer
Jordan Jordan
MCP Microsoft Certified Professional - Developing and Implementing Windows Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET.
MCP Microsoft Certified Professional - Developing and Implementing Web Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET.
•Bachelor's degree in Information Technology, major in Software Engineering from Philadelphia University (Period 2002-2006).
•Good skills in programming using (, 2.0, C++,
•Professional in OOP.
•programming with (Windows Workflow Foundation WWF), Framework 3.0 and design the activity that meet any workflow in any business process.
•Good Skills in web programming using new technology Ajax (Atlas) Framework.
•IT Consultant in SoftConIT.

You may also be interested in...

Comments and Discussions

GeneralMy vote of 1 Pin
Wael Al Wirr2-Dec-09 2:42
memberWael Al Wirr2-Dec-09 2:42 
Nothing usefull
GeneralRipoff of the WWF Labs supplied by Microsoft Pin
clarkybravo17-Sep-08 4:53
memberclarkybravo17-Sep-08 4:53 
GeneralRe: Ripoff of the WWF Labs supplied by Microsoft Pin
Omar Fawzy17-Sep-08 20:00
memberOmar Fawzy17-Sep-08 20:00 
QuestionCan i create a designer for WF Pin
serg.jn12-Jun-08 4:25
memberserg.jn12-Jun-08 4:25 
AnswerRe: Can i create a designer for WF Pin
serg.jn16-Jun-08 6:07
memberserg.jn16-Jun-08 6:07 
GeneralRe: Can i create a designer for WF Pin
mbaocha6-May-09 17:31
membermbaocha6-May-09 17:31 
Generalgood Pin
wwqwwq13-Feb-08 17:29
memberwwqwwq13-Feb-08 17:29 
GeneralDownload corrupt Pin
Member #30277928-Dec-06 17:14
memberMember #30277928-Dec-06 17:14 
GeneralRe: Download corrupt Pin
Robert te Kaat30-Dec-06 1:26
memberRobert te Kaat30-Dec-06 1:26 
GeneralRe: Download corrupt Pin
Omar Fawzy3-Jan-07 22:17
memberOmar Fawzy3-Jan-07 22:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170308.1 | Last Updated 4 Jan 2007
Article Copyright 2006 by Omar Fawzy
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid