Defining a Filter for a Task
A task filter enables the DCS runtime to direct a request from a client application to a specific task, if an operation is implemented by more than one task. A client request can include context information, and a task filter can specify that a particular task should run if the properties in the context information match certain values. The Context class provided with DCS contains the following properties that you can reference in a task filter, including:
- Environment
- Organization.Plant
- Organization.Holding
- Organization.BusinessUnit
- Organization.OrganizationalUnit
For more information about the DCS Context class, see DCS Context. For information about how to define the Context object, see Invoking a DCS Service from a Client Application. You can also customize the Context class and add your own properties. For more information, see Building a Custom Context Class.
To enable the client application to invoke a task, the service scope and the task filter must both match the scope defined in the Context object in the client application. For more information about defining service scope, see Defining Scopes. For information about how DCS performs scope matching, see DCS Scopes.
To define a task filter
- In the DCS Management Services Console, expand the DCS Management Services node, expand the Task Management node, expand Operations, and then expand the category containing the operation for which you want to specify a task filter.
- In the left pane, click the operation.
- In the right pane, right-click the task to which you want to add the filter, and then click Edit Filters.
- In the Edit Task Filters dialog box, add properties to define the task filter that you require.
- Click OK to close the dialog box and apply the filter to the operation.
The following figure shows a sample task filter configuration in the DCS Management Services Console.
Example task filter definition - this filter matches the Contoso.Banking.BranchOperations.ClientFacing.ClientTerminal scope