Partilhar via


Windows Workflow Overview

This topic applies to Windows Workflow Foundation 4 (WF4).

A workflow is a set of elemental units called activities that are stored as a model that describes a real-world process. Workflows provide a way of describing the order of execution and dependent relationships between pieces of short- or long-running work. This work passes through the model from start to finish, and activities might be executed by people or by system functions.

Workflow Run-time Engine

Every running workflow instance is created and maintained by an in-process run-time engine that the host process interacts with through one of the following:

Each of these classes wraps the core activity runtime represented as a ActivityInstance responsible for activity execution. There can be several ActivityInstance objects within an application domain running concurrently.

Each of the preceding three host interaction objects is created from a tree of activities referred to as a workflow program. Using these types or a custom host that wraps ActivityInstance, workflows can be executed inside any Windows process including console applications, forms-based applications, Windows Services, ASP.NET Web sites, and Windows Communication Foundation (WCF)services.

Dd489465.44c79d1d-178b-4487-87ed-3e33015a3842(en-us,VS.100).gif

Interaction between Workflow Components

The following diagram demonstrates how workflow components interact with one another.

Workflow interaction

In the preceding diagram, the Invoke method of the WorkflowInvoker class is used to invoke several workflow instances. WorkflowInvoker is used for lightweight workflows that do not need management from the host; workflows that need management from the host (such as Bookmark resumption) must be executed using Run instead. It isn’t required to wait for one workflow instance to complete before invoking another; the runtime engine supports running multiple workflow instances simultaneously. The workflows invoked are as follows:

See Also

Other Resources

BizTalk Server 2006 or WF? Choosing the Right Workflow Tool for Your Project