Using the Dynamic User-Defined DataPower Policy (Non-Pipeline)
Learn how to configure DataPower processing rules that can be referenced by the pipeline version of the Dynamic User-Defined DataPower Policy.DataPower Policies Managing Policies
Table of Contents
The "Dynamic User-Defined DataPower Policy" allows you to specify one or more DataPower "Processing Rules" and assign a "User-Defined Category" that can be referenced by the pipeline version of the Dynamic User-Defined DataPower Policy.
- Each policy must be attached to a service operation. The attachment sequence should be non-pipeline version first followed by the pipeline version.
- When the policy gets deployed with the service to DataPower, it matches the specified "User-Defined Category" to the correct "Dynamic User-Defined DataPower Policy" searches for the name of each DataPower "Processing Rule" (i.e., Rule Name) in the DataPower domain and executes the rule based on the sequence specified in the policy.
This component is available in the Policy Manager "Management Console" if you have performed a DataPower integration by installing the "SOA Software IBM for WebSphere DataPower Option Pack" to the "SOA Software Platform," and have installed and configured the Policy Manager and DataPower features as outlined in the "Policy Manager for IBM WebSphere DataPower Installation Guide for Windows and UNIX Platforms."
Using Contexts with User Defined DataPower Policy
When enforcing the User-Defined DataPower Policy Component, DataPower will call out to a user defined processing rule previously defined as a "Processing Rule" object in the DataPower domain being governed. This rule will perform an important user-defined function such as security processing or transformation.
When authoring this rule, the proper use of DataPower contexts is critical to the functioning of the rule and the larger service.
The following lists the key points that should be followed for the proper use of contexts.
- If actions in the user defined processing rule need to read the current request or response message, their input context should be set to ‘INPUT’.
- The ‘INPUT’ context within the user defined processing rule contains the request or response message as it has been modified over the course of DataPower processing up to the invocation of the user defined rule. It does not contain the original message as received by DataPower.
- If actions in the user defined processing rule need to modify the current request or response message, their input context should be set to ‘OUTPUT’. The context written to this output will be represented in the response message to DataPower’s consumer.
- The ‘OUTPUT’ context within the user defined processing rule will be used as the OUTPUT context of the larger transaction once the user defined processing policy completes. That content will be available to other downstream user defined processing rules via the ‘INPUT’ context for that rule as per normal functionality.
- If a user defined processing rule action does not need access to the ‘INPUT’ context for the action’s input or ‘OUTPUT’ context for the action’s output, it should use the ‘NULL’ context instead.
Let's take a quick walkthrough of the Dynamic User-Defined DataPower Policy configuration process to get you started.
Step 1: Add Policy
- You can create a Dynamic User-Defined DataPower Policy instance using Add Policy in the Policies > Operational Policies section.
Step 2: Modify Policy
When you Modify the Dynamic User-Defined DataPower Policy on the Policy Details page the initial policy will look like this:
Figure. Modify Dynamic User-Defined DataPower Policy - Dynamic User-Defined DataPower Policy Options
Step 3: Configure
Configuring the following policy options:
- User-Defined Category - A text field that allows you to enter a category name for the policy definition. This category name can then be referenced in a "Dynamic User-Defined DataPower Policy" (pipeline version), or "Dynamic User-Defined DataPower Policy Activity" (in an Orchestration Policy).
- Add - A button that adds a row entry where you can define a DataPower "Processing Rule." Rule Name, Authenticates Consumer, and Execution Order fields are added.
- Rule Name - A field display that allows you to enter a DataPower "Processing Rule" name.
- Authenticates Consumer - Indicates whether the DataPower "Processing Rule" has "Authenticates Consumer" enabled. Configure this field by manually entering "Yes" or "No."
- Execution Order - A field display that allows you to enter a number that represents the execution order of the DataPower "Processing Rule."
- Delete - A button that deletes a single row.
Step 4: Attach Policy
After you have saved your policy you must attach both the Dynamic User-Defined DataPower Policy Component and the Dynamic User-Defined DataPower Policy that contains the User-Defined Category you referenced to specific web service or at the Organization level and the policy will be active for all services defined within the organization. The non-pipeline policy should be attached first as follows: