Version 9.6
 —  Implementation Concepts  —

Defining Design/Change-Time Policies

Design/change-time polices provide governance controls that you can use to effectively administer and manage Web services and other assets within your SOA environment. Design-time policies enable you to control the acceptance of assets into the registry and manage their eventual deployment into the runtime environment. You can use design/change-time policies to ensure that assets entering the SOA environment conform to organizational standards and conventions, meet the architectural requirements of your enterprise and adhere to industry best practices. You can also use policies to execute standard procedures, such as initiating review processes, issuing notifications and granting instance-level permissions at key junctures in an asset's lifecycle.

The following sections generally describe design/change-time policies and explain how you might apply them at your site. For additional information about design/change-time policies, including specific steps for the procedures described in these sections, see the section Working with Design/Change-Time Policies.


What is a Design/Change-Time Policy?

A design/change-time policy defines a sequence of user-specified tasks that CentraSite is to execute when designated events occur in the registry. For example, a policy could instruct CentraSite to perform any of the following tasks:

A design/change-time policy has two major elements: it has an action list, which specifies the tasks (policy actions) that are to be executed, and it has a defined scope, which specifies when the action list is to be executed.

Policy Actions

A policy action is a programmed task, written in Java or Groovy (a scripting language). A policy action can perform any type of work you require (e.g., sending an email, validating an attribute setting, submitting an approval request, updating a database). It can have one or more input parameters. An action that sends an email message, for example, will include input parameters that specify the text of the message and to whom it is to be sent. A policy action returns a completion code that indicates whether it completed its task successfully.

The action list in a policy can contain one or more actions. CentraSite executes the actions in the order that they appear in the list. If an action does not complete successfully, CentraSite immediately exits the policy and bypasses any remaining actions in the list. Policy failures are recorded in CentraSite's policy log.

CentraSite is installed with a library of "built-in" policy actions that you can use to construct policies. You can also develop your own custom actions using Java or Groovy.

Policy Scope

The policy's scope specifies the conditions under which CentraSite is to execute the policy. It consists of two main parameters: Event Type and Object Type.

Together, the event type and the object type determine when the policy will execute. You can make the scope as narrow or as broad as you need. That is, you can target the policy for one particular type of event and object (e.g., a PreDelete event on an XML Schema) or apply the policy to multiple events and objects (e.g., a PreCreate, PreUpdate or PreDelete event on an XML Schema, a Service or a BPEL Process).

Refining a Policy's Scope with Additional Selection Criteria

You can optionally refine the scope of a policy to narrow the set of objects to which the policy applies. To do this, you include additional selection criteria based on an object's Name, Description or Classification properties. For example, you might create a policy that applies only to Application Servers whose name includes the string "myDomain.com:" or to Application Servers that are classified as Software AG Runtime.

The ability to execute policies based on object classification is an especially effective way to selectively apply policies to objects. As described in Creating a Different Lifecycle Path for a New Version of an Asset, you can use this technique to route assets between alternate paths in a lifecycle model. However, this technique can generally be used any time you want to apply a policy to a particular subset of objects within the specified object types.

Scope of a Policy Action

A policy action also has a declared scope. The action's scope specifies the object and event types with which the action can be used. Some actions have very specific object-type and event-type requirements. For example, you can use the "Validate Policy Deactivation" action only during a PreStateChange on a Policy object. Other actions support a broad range of object and event types.

A policy can contain only actions that support the full set of object types and event types specified by the policy's scope. For example, if you create a policy that executes on the PreCreate and PreUpdate events for XML Schemas, it can only contain actions whose scope includes the PreCreate and PreUpdate event types and the XML Schema object type.

When you create a policy, CentraSite's user interface will only allow you to select actions that satisfy the specified scope of the policy. If you subsequently change the policy's scope, CentraSite will not allow you to save the updated policy unless all of its actions support the policy's new scope.

Top of page

System-Wide vs. Organization-Specific Policies

A design/change-time policy is either system-wide or organization-specific. System-wide policies apply to all organizations within an instance of CentraSite. Organization-specific models apply only to a specified organization.

Whether a policy is system-wide or organization-specific affects the policy's scope. When a policy is organization-specific, its scope is limited to the set of objects that belong to a specified organization. For example, if you create a policy that executes on a PreDelete event for XML Schemas, and you make that policy specific to organization ABC, that policy will execute only when XML Schemas in organization ABC are deleted. If you make it system-wide, it will execute when an XML Schema in any organization is deleted.

Note:
Once you create a policy, its organizational scope is fixed and cannot be changed. That is, if you create a policy whose scope is specific to organization ABC, you cannot change its scope to make it system-wide or switch it to another organization. You must create a new policy and set its organizational scope in the new policy as needed.

Top of page

Policy Priority

A policy has a priority value, which CentraSite uses when an event triggers multiple policies. You can give a policy a priority value between 11 and 9999 (inclusive). Priority 11 is the default. Values less than 11 and greater than 9999 are reserved for system use.

A policy's priority value is used only when an event triggers multiple policies. When this occurs, CentraSite examines the priorities of the selected policies and executes the policies serially, in priority order, from the lowest value to the highest value (that is, it executes the policy with the lowest value first). Each policy in the series is executed to completion before the next one begins.

For example, if an event were to trigger the following policies, CentraSite would execute the policies in the following order: B, A, C (as determined by the priority assignments 11, 25 and 100, respectively).

Policy Priority
A 25
B 11
C 100

If multiple policies have the same priority, they will be executed serially, but their order is indeterminate. (That is, you cannot predict the order. CentraSite will choose the order at enforcement time.)

Top of page

Pre-Operation and Post-Operation Event Types

Many of the event types to which you can apply policies represent pre-operation events or post-operation events.

Top of page

What Happens When a Design/Change-Time Policy Executes?

When an event occurs in the registry, CentraSite determines which policies are "within scope" and executes those policies in priority order (from lowest assigned value to the highest assigned value). If an action within a policy fails, CentraSite immediately exits the policy. It does not execute any of the remaining actions in the policy, nor does it execute any remaining policies that are within scope of the event.

If the policy was triggered by a pre-operation event (e.g., a PreCreate event or a PreStateChange event) the requested operation is also not executed. For example, if a user attempts to add an XML Schema to the catalog, and the schema does not satisfy a validation policy that is triggered by the PreCreate event for XML Schemas, CentraSite will reject the user's request to add the new schema to the catalog.

Policy failures are written to CentraSite's policy log. From the Inbox page in CentraSite Control, users can view the failed policies that were logged during the events that they initiated. Administrators with "View Policy Log" permission can view and query the entire log using CentraSite Control's Logging feature.

Top of page

OnTrigger Policies

CentraSite provides a special event type called an OnTrigger event. Policies that you create for this event type can be run "on demand" from the CentraSite Control user interface. Anyone who has View permission on an OnTrigger policy can execute the policy on demand.

When you run a policy on demand, CentraSite applies the policy directly to each object instance in the registry that:

Administrators often use OnTrigger policies to assign permissions to a specified set of objects instead of manually setting permissions on individual objects using the user interface.

Top of page

Typical Uses for Design/Change-Time Policies

The following sections describe typical uses for design/change-time polices.

Using Policies to Initiate Reviews and Approvals

Enforcing a review and approval process is a common use of a design/change-time policy. To create this type of policy, you include one of CentraSite's approval actions in the policy. An approval action identifies the group of users (the approver group) whose approval is required in order to complete the policy successfully. When you configure an approval policy, you can specify whether approval is required from just one approver in the group or from all approvers in the group.

You apply approval polices to PreStateChange events. Thus, to use approval policies on assets, those assets must be under lifecycle management.

Note:
Approval policies can also be used with an OnConsumerRegistration event. This use case is described later in this section.

When CentraSite executes an approval policy, it initiates an approval workflow. Users who are designated approvers review the request on the Pending Approvals tab of their Inbox page in CentraSite Control user interface. If the approvers approve the request, CentraSite executes the requested state change. If an approver rejects the request, the policy fails and the requested state change is not executed.

Pending approvals appear in the approvers inbox in CentraSite Control

graphics/scrn_PendingApprovals.png

Users who submit requests that require approval can view the status of their requests on the Approval Requests tab of their Inbox page in the CentraSite Control user interface.

Using Policies to Validate Assets

Validation is another common task that you can perform using design/change-time policies. You use validation policies to ensure that assets conform to organizational norms and standards before they are accepted into the catalog or enter a critical lifecycle state. For example, you might create validation policies to perform the following types of tasks:

CentraSite provides built-in actions that you can use to perform many validation tasks. You can also create custom actions to perform validation tasks that are specific to your environment.

Using Policies to Modify Assets

You can use design/change-time policies to make changes to assets when certain events occur. Setting instance-level permissions on an asset is an example of an update you might make using a policy. Other kinds of changes you might make include classifying an asset, setting a specified attribute when an asset completes a series of tests and changing an asset's lifecycle state.

CentraSite provides built-in actions that you can use to perform many kinds of updates to assets. You can also create custom actions to modify assets.

Using Policies to Issue Notifications or Update External Systems

Notifying individuals when certain events occur in the registry is another common use case for design/change time policies. CentraSite includes a built-in email action that you can use for this purpose.

You might, for example, use this action to send an email to key users in your IT organization when a service switches to the Production state of its lifecycle. You might also create custom actions that would send messages to and/or trigger processes on external systems when certain events occur in the CentraSite registry.

Using Policies to Execute a Consumer Registration

If you want to use CentraSite's consumer-registration feature, you must first create a consumer-registration policy. CentraSite will not enable the consumer-registration feature until you create this policy.

The consumer-registration feature in CentraSite enables users to register users and/or applications as consumers of an asset. To complete the registration process, the owner of the asset must first review and accept the user's request. If the owner accepts the request, the consumer-registration policy, which you create, is executed. This policy includes the "Register Consumer" action, which performs the actual registration process. It can optionally include other actions, such as an approval action, as needed. For additional information about creating a policy that registers consumers, see The Consumer Registration Policy.

Using Policies to Manage the Deployment of Virtual Services

If you use virtual services, you must create policies that enable an administrator to deploy a virtual service to webMethods Mediator and to make a virtual service undeployable while it is being revised. For additional information about creating these kinds of policies, see Defining a Lifecycle Path that Enables Deployment of a Virtual Service.

Top of page

Issues to Consider When Developing Design/Change-Time Policies

The following are issues to keep in mind when creating design/change-time policies for your CentraSite registry.

Top of page

Managing Design/Change-Time Policies

The following sections describe issues relating to the creation and maintenance of design/change-time policies.

Activating a Design/Change-Time Policy

Policies are managed by a predefined lifecycle installed with CentraSite. This lifecycle, called the "Policy Lifecycle", defines the following lifecycle states: New, Productive, Suspended and Retired.

To activate a policy, you must place the policy in the Productive state. When you switch the policy to this state, CentraSite begins enforcing it.

Modifying a Design/Change-Time Policy

You cannot modify a policy while it is in the Productive state. To make changes to a policy, you can do any of the following:

Copying a Design/Change-Time Policy

A design/change-time policy can become quite complex, especially if it contains several policy actions. Instead of creating a new policy "from scratch", it is sometimes easier to copy an existing policy that is similar to the one you need and edit the copy.

CentraSite includes a copy feature that lets you do this. It produces a copy that is identical to the original policy. Unlike a new version of a policy, a copy of a policy is not associated with the original policy in any way. CentraSite treats the copy just as if it were a new policy that you created from scratch.

Modifying the Predefined Lifecycle Model for Policies

The predefined lifecycle model that CentraSite uses for policies is made up of four states: New, Productive, Suspended and Retired. This lifecycle is generally adequate for most environments. However, you can make certain minor types of customizations to it if necessary.

For information about the ways in which you can customize this lifecycle model, see the topic Customizing the Predefined Lifecycle Model for Policies in the section Working with Design/Change-Time Policies > Functional Scope .

Top of page