Policies for lifecycles

You can use policies to verify whether conditions have been met so that you can more efficiently manage and govern the assets in your repository.

To watch a free movie about creating custom lifecycles and configuring policies, see this On Demand Demo on ibm.com.

Policies for managing assets

Policies are scripts that you can use to manage assets. You can configure policies to run at specific times in a lifecycle, such as when an asset enters or leaves a state. Broadly, when a policy runs, it performs one of these actions:
  • Runs a test and records the result: Most policies check for certain conditions and report Pass if the conditions are met or Error if the conditions are not met. Some policies can also report a Warning when the conditions are not met. For example, the Artifact validation policy checks that an asset has a particular type artifact attached. Then, that policy reports either Pass if the artifact is there, or Error if the artifact is not there.

    The result of a policy is logged. You check the result of a policy when you configure the transition between states in a lifecycle. For example, you can configure that an asset cannot move from the Review state to the Approved state unless all policies report that they have passed.

  • Modifies an asset or the lifecycle for an asset: Some policies automatically modify assets when they run. For example, the Append artifacts policy automatically adds a file of your choice to the asset when the policy runs. When the Modify lifecycle manager policy runs, it changes the lifecycle manager for the asset.
  • Manages integrations between IBM® Rational® Asset Manager and other applications: You can use some policies specifically to work with other applications. For example, the ALE policy refers to the mapping file for the connection to IBM WebSphere® Service Registry and Repository, and can modify the assets in Rational Asset Manager and service objects in WebSphere Service Registry and Repository.

Policies for managing lifecycles

With policies, you can check for various conditions during the lifecycle of an asset at the repository or community level. Although some policies duplicate the features in Asset types, you might want to use policies for the following purposes:
  • Limiting asset types: You can use policies instead of asset types to limit the number of asset types in your repository. If you limit the number of asset types, other users can submit assets more easily.
  • Submitting assets: If you do not meet the constraints for an asset type, you cannot submit a new asset. While policies might prevent you from changing the state of an asset, they do not prevent you from submitting a new asset to the repository.
  • Restricting categories of assets: Because policies are configured with lifecycles, policies can apply to assets that are of a certain category.
  • Restricting at certain points of a lifecycle: You can set policies to run at specific states and at certain times, such as when the asset enters a state.
  • Restricting at a regular interval: You can set policies to repeat at an interval of your choosing.
  • Providing warnings instead of full errors: When a policy fails, it can issue either a warning or an error.
  • Automatically modifying assets: Instead of running tests, some policies automatically modify assets for you. For example, you can use the Categorize asset policy to assign categories to an asset. You can use the Modify asset owner policy to change the owners of an asset.

When policies can run during lifecycles

You can assign policies to run at the following times while an asset is in a particular state of a lifecycle:
Asset save
The policy runs every time that the asset is modified while it is in that state.
Entrance to state
The policy runs when the asset first enters that state.
Action
The policy runs when a user attempts to manually change the lifecycle state of the asset. For example, you might attempt to move the asset from a Draft state to an Approved state.
Delete
The policy runs only if someone attempts to delete the asset while it is in that state. If the policy reports a Pass or a Warning, the asset is deleted. If the policy reports an Error, the asset is not deleted.
Timer
The policy runs one time after a specified amount of time has passed. The timer begins when the asset enters the state of the lifecycle. In previous versions, the pending policies ran every 30 seconds. Beginning in version 7.5.1, you can specify a time interval at which to run a pending policy.

Display names for policies

For all policies, you can configure the display name. In the Policy display name field, you can specify a more descriptive label for a policy that you have configured. For example, to describe what the policy does when it runs, you can change from the default label of Default Policies > Artifact Validation Policy to Check that there is a WSDL file.

The policy display name must be unique for all policies in the lifecycle. The display name for the policy is shown when you configure transitions between asset states.


Feedback