Overriding the data source configuration properties using policies

Policies are used to override property values so that you can control the behavior of message flows and message flow nodes at run time.

About this task

Use the user-defined policy to control the behavior of the manufacturing message flows, and the nodes in message flows, at run time.

To create a user-defined policy to override the data source configuration properties at run time by using the Toolkit, complete the following steps:

Procedure

  1. In the Application Development view, click New > Policy.
  2. Select an existing policy project or click New to create a policy project.
  3. Enter a name for your policy. The DataSource Policy Name List is in the IBM® App Connect for Manufacturing node property editor.
  4. Click Finish. A policyxml file is created and is opened in the Policy editor.
  5. In the Policy editor, select User Defined as the Policy Type from the list.
  6. Select User Defined as the Policy Template from the list.
  7. Add the appropriate Property Name values for your policy.
    The following table describes the mapping of the policy's user-defined Property Name with the data source configuration properties from the DataSource Config view.
    Table 1. Mapping of the Property Name and DataSource Config properties
    User Defined Property Name DataSource Config UI
    CLIENT_KEEP_ALIVE Client Keep-Alive
    CREDENTIAL_NAME  
    DISCOVERY_ENDPOINT Discovery Endpoint URL
    MESSAGE_ENCODING Message Encoding
    MESSAGE_SECURITY_MODE Message Security Mode
    PROTOCOL Protocol
    QUEUED_PUBREQ_COUNT Queued PubReq Count
    SECURITY_CLIENT_CERT Client Certificate file
    SECURITY_CLIENT_PRIV_KEY Client Private Key file
    SECURITY_POLICY Security Policy
    SECURITY_SERVER_CERT Server Certificate file
    SECURITY_USER User Name
    SERVER_KEEP_ALIVE Server Keep-Alive
    SERVER_URL_TYPE Server URL Type
    UPDATE_INTERVAL Update Interval
    Important: The QUEUED_PUBREQ_COUNT property specifies the number of the Publish Requests sent by a server. If you change the value of the Queued PubReq Count in the DataSource Config view, you must create the message flow again to use the updated values.
    • Click Add from the Policy Editor to add a new property name and value. The Add a new property window pop-up. You can add multiple data source properties to override.
    • Specify the data source property name and value that you want to override, and click OK. Refer to the mapping table, for the property name references.
    Note: For policies, you can no longer override the SECURITY_PASSWORD property, as the password is stored in the normal text that can lead to security issues. You can instead override CREDENTIAL_NAME property by using the value as given in the mqsicredentials command. After overriding, the password is searched against the value given in the CREDENTIAL_NAME property. For more information, see Configuring vault-enabled integration server.
  8. Optional: You can Edit or Delete an existing data source property name and value from the Policy Editor.
  9. Save your policy. Any errors are reported on the Problems tab.

Results

A policy that contains the overriding property values is generated. You can see your policy and policy project in the Application Development view.

The values in the policy override the equivalent properties that were configured in the DataSource Config view for the node when the message flow was developed.

What to do next

  1. Attach the policy to a message flow node by setting the policy name in the appropriate property of the message flow node. If you want to override a message flow node property with a policy at run time, you need to set the policy name on the message flow node. For more information, see Overriding data source properties.
  2. Deploy the policy. You can deploy one or more policy projects, either in an independent BAR file, or in the same BAR file as the associated message flow.

    If a policy name is set specifically on a message flow or message flow node, you must deploy the policy before the message flow can be started. If a policy is not specified explicitly on a message flow or message flow node, you must deploy the policy before or with the message flow. For more information, see Adding resources to a BAR file.