Creating policies with the IBM App Connect Enterprise Toolkit

To control message flow behavior at run time, create one or more policies in one or more policy projects and deploy the policy projects.

Before you begin

For more information about policies, read Policies overview.

About this task

Policies are used to override property values so that you can control the behavior of message flows and message flow nodes at run time. You create one or more policies in a policy project, then you deploy one or more policy projects. Policies are XML files; therefore you can create a policy by using an XML editor. Policies are defined by an XML Schema Definition (Policy.xsd), which is found in the default installation directory. (For example, on Windows, you can find the policy definition file at C:\Program Files\IBM\ACE\version\common\schemas\Policy.) However, the following steps describe how to create a policy and a policy project in the IBM® App Connect Enterprise Toolkit.


  1. In the Application Development view of the IBM App Connect Enterprise Toolkit, click New, then select Policy.
  2. Select an existing policy project or click New to create a policy project.
  3. Enter a name for your policy.
    The policy name can include alphanumeric characters and the underscore character. The name cannot include spaces and must start with a letter.
  4. Click Finish.

    A .policyxml file is created and is opened in the Policy editor.

  5. In the Policy editor, select the policy type from the list.
  6. If your chosen policy type has more than one template, select the appropriate template from the list.
    The template provides default values for some fields.
  7. Edit or set appropriate values for your policy.
    Mandatory properties are marked with an asterisk. For more information about property values for specific policies, see Policy properties.
  8. Save your policy.
    Any errors are reported on the Problems tab.


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 Properties 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 example, to configure storage of events for aggregation nodes at run time, first create an Aggregation policy. Next, set the Aggregate name property on the AggregateControl or AggregateReply node to the name of the policy. If you do not use an Aggregation policy, the Aggregate name property on the Aggregation nodes is used to associated fan-in and fan-out flows.

    If the policy is deployed in the default policy project for the integration server, specify just the policy name in the message flow property.If the policy is deployed in a non-default policy project, prefix the name of the policy with the policy project name:
    You can also reference a policy from a JavaCompute node by using the name of the policy in the Java code; for example:
    Connection conn = getJDBCType4Connection("MyJDBCPolicy", JDBC_TransactionType.MB_TRANSACTION_AUTO);
  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 (see Adding resources to a BAR file).

Deployed policies are shown in the run sub-directory of the integration server work directory, within a sub-directory with the name of the policy project. You can see the properties of deployed policies in the Integration Explorer of the IBM App Connect Enterprise Toolkit or on the Policies tab of the web user interface (see Accessing the web user interface). You can also see which properties are being used by the deployed flow at run time by using the REST API or web user interface.