Share via


Models for Implementing DCS Services

The DCS Software Factory provides four models that let you implement service operations based on a workflow. A workflow is a set of activities that lets you define a business process based on the tasks and operations that your organization performs.

Windows Workflow Foundation provides a common foundation for building workflow-based applications, and DCS uses Windows Workflow Foundation functionality to let you design and build service operations quickly. Windows Workflow Foundation provides several general purpose activities for defining workflow structure, and DCS supplements these activities with more specific activities directed toward building operations for distributed services.

The DCS Software Factory includes several Microsoft Visual Studio extensions, and implements Software Factory best practices. The DCS Software Factory provides tools that support the following four common models of business workflow:

  • Specific Workflow
  • Category Workflow
  • Conversational Workflow
  • Transparent Workflow.

Specific Workflow

The specific workflow is the simplest of the workflow models. A specific workflow defines a self-contained, single-call, stateless operation. A service may define any number of operations based on specific workflows. Each workflow implements a stand-alone task that does not retain any state when the task is finished. An operation in a specific workflow can implement the request/response messaging and one-way messaging models. When a client application sends a message to an operation that is based on a specific workflow, the DCS runtime creates an instance of a service to run that workflow. Whether you are using the one-way or the request/response messaging pattern, there is at most one incoming message to the service. After the workflow that the message triggered is finished, the instance of the service terminates.

Category Workflow

In many scenarios, it is possible that multiple operations share a common piece of processing as well as performing their own specific tasks. A category workflow lets you define this common processing as a Windows Workflow Foundation workflow, and then insert a placeholder where the DCS runtime can execute a specific workflow.

When you use a category workflow, you first define the common business logic, and then create any specific workflow implementations that the category workflow can incorporate. When you invoke the workflow service, you call the specific workflow implementation that you want to run, and the DCS runtime executes the category workflow that encapsulates this specific workflow automatically.

Conversational Workflow

A conversational workflow is a stateful series of operations that run by using a single instance of a service. The service instance remains active between operations until the conversation finishes. When the workflow that defines the conversation is finished, the service instance expires, and no further calls to the service instance are possible.

Multiple client applications can participate in the same instance of a conversational workflow, enabling them to share state information.

Transparent Workflow

A transparent workflow defines business logic that you can inject into the request or response pipeline for an operation. When a client application invokes the operation, the transparent workflow runs also and can transform the request or response in some way or perform additional processing.

An administrator configures transparent workflows by using the DCS Management Console and by defining a transparent pipeline of tasks, which is attached to another service operation (known as the base service). The transparent workflow executes when the base service operation is invoked. The client application has no knowledge of, or ability to call into, the transparent workflow.

Note

You can also implement service functionality in an ordinary .NET class. For more information, see Using a .NET Framework Class to Build a Task.

In This Section

How the DCS Runtime Executes a Service Based on a Category Workflow

How the DCS Runtime Executes a Service Based on a Conversational Workflow

How the DCS Runtime Injects a Transparent Process into a Service

See Also

Building DCS Services

Using a .NET Framework Class to Build a Task