Restricting a task rule policy to specific user tasks in a single CICS region

You define policies to monitor the resource utilization of a user task, and to automatically respond when resource usage exceeds the thresholds you define. In this way, excessive resource usage and looping and runaway transactions can be detected and dealt with appropriately. Policies that contain task rules can be deployed to single CICS® regions or deployed with CICS applications and platforms. When deployed into a single CICS region, task rules in the policy apply to all CICS user tasks running in that CICS region by default. However, deploying polices with such a wide scope might not be suitable in all cases. You might want to restrict the effect of task rules to specific user tasks.

You can limit the effect of task rules in either of the following ways:
  • By defining a transaction ID filter, a user ID filter, or both for the rule condition. This requires that your CICS TS region is either at Versions 5.4 - 5.6 and has APAR PH26145 applied, or at later releases.
  • By defining an application entry point and a policy scope. Three types of application entry point are supported: PROGRAM, TRANSACTION, and URIMAP.
The condition filters are defined for a single rule so you can have rules of different scopes within one policy. When deployed to the region, the rule triggers an action only when the threshold is met by tasks running under the specified transaction or user ID. Strictly speaking, these filters restrict the rule scope, but can have an effect on the scope of the policy that contains them. If you don’t have too many rules in a policy, this can be a quick way to restrict your policy to certain tasks because the filters can be defined directly in the rule condition definition. The filter accepts several operators so you can apply the rule to multiple transaction or user IDs matching the specified filter. For more information about the condition filter, see Policy rule conditions.
Figure 1. Condition specification in a rule definition
This screen capture shows the rule specification of a rule definition

The application entry point and policy scope, on the contrary, are defined in a CICS bundle and applies to all the rules in the specified policy. An application entry point identifies a resource (PROGRAM, TRANSACTION, or URIMAP) that is an access point to an application. A policy scope associates the application operation that is specified in the application entry point definition with a policy. The policy resource is not required to be declared in the same CICS bundle project. This way, when the bundle that contains the policy scope and the application entry point is deployed to a single CICS region, the policy containing task rules will apply to specific user tasks that pass through the specified entry point.

The following diagram shows the contents of an application entry point and a policy scope definition and their relationship.
Figure 2. Contents of application entry point and policy scope
This diagram shows the contents of an application entry point and a policy scope definition and their relationship within a CICS Bundle project.

If you want to apply the same policy to multiple entry point resources, you can define multiple sets of entry points and policy scopes to associate the same policy with entry points for different resources. For more information about the policy scope of different policy types, see Policy scopes.