Condividi tramite


Developing Windows Workflow Foundation Services

Services work in a Windows Workflow Foundation hosting environment to provide additional functionality to the runtime engine as it manages the execution of workflows. By default, several services are included with Windows Workflow Foundation. These services can be extended to provide more customized services depending on your workflow needs.

There are two ways to create custom services that work within the Windows Workflow Foundation programming model:

  • Creating services that are based on existing services.

  • Creating new services that fall beyond the capability of the provided default services.

Extending Base Services

Windows Workflow Foundation provides several base services that you can use to create a customized service to work in your workflow scenario. To do this, you create a new class definition and derive that class from an existing base service. For example, the TrackingService service is used to monitor a workflow. The TrackingService class is an abstract class that relies on a derived class to process the tracking data from a workflow. Extending the base TrackingService class enables you to control how the information is processed and reported by using your data store of choice.

For more information about extending the TrackingService class, see Creating Custom Tracking Services.

Creating New Custom Services

In addition to extending the default services that are provided by Windows Workflow Foundation, you can define new services that do not follow any particular architecture that is defined by the default services. For more information about adding and removing services in the Windows Workflow Foundation runtime, see How to: Add and Remove Workflow Services.

Note

You can derive your service from the base WorkflowRuntimeService class, but this is not required. However, doing this enables you to access the current workflow runtime engine by using the Runtime property.

In This Section

Creating Custom Scheduling Services

Creating Custom WorkflowCommitWorkBatchService Services

Creating Custom Persistence Services

Creating Custom Tracking Services

See Also

Concepts

How to: Add and Remove Workflow Services

Other Resources

Windows Workflow Foundation Services
Windows Workflow Foundation Samples
Windows Workflow Foundation Programming Guide