Defining external policy governors

If you develop a policy governor that extends the com.ibm.ram.extension.PolicyGovernor class and includes custom policies, you must install the resultant Java archive file into IBM® Rational® Asset Manager.

About this task

After you complete work on your policy governor and the custom policies that it includes, you export the Java project as a JAR file, which you then add as a new policy extension in Rational Asset Manager.

Procedure

  1. Log on to the Rational Asset Manager web client as a repository administrator.
  2. Click Administration.
  3. Click Custom Extensions.
  4. In the Policy Extensions section, click New Policy Extension. The New Extension window opens.
  5. In the Class name field, type the policy governor class name. The name you enter must include the plug-in path and the governor class name. For example, if the governor class (MyGovernor) in the JAR file is in this location:
    com/ibm/ram/extension/demo/policy/
    the class name must be:
    com.ibm.ram.extension.demo.policy.MyGovernor
  6. In the .jar or .zip file field, browse to the JAR file with the custom extension on your local file system. For example: com.ibm.ram.extension.demo.policy.jar.

    You can upload a JAR file or you can include multiple JAR files in an archive file and upload them all. For example, if you are integrating with another product and want to include the libraries of the other product to work with the policy, you must add all of them to the class path. You can create an archive file that contains all of the JAR files, and then upload the JAR files as a single archive file. The upload extracts the file content and places all of the included JAR files on the class path.

  7. Click OK. The policy extension is installed.

Results

After you complete these steps, the new policies in the policy governor are available for use in asset lifecycles.

An approved asset of the Custom Extension type that contains the JAR file is added to the repository. Do not modify this asset on the Asset Details page or revert it to Draft state.

What to do next

After you add a policy governor that includes custom policies, you might need to change a policy and then add an updated governor with those changes to Rational Asset Manager. You can add the newer governor by using the Modify link to upload a new .jar file instead of deleting the older extension.
To remove a custom extension from the server, click Delete.
Important: If you delete a custom extension, you can no longer see the results and history of the extension for any assets that used the extension.
For additional instructions to create or modify custom policies, see Creating policies by using the custom policy review API.

Feedback