User Define Policy in IBM App Connect Using JCN
User Define Policy: IBM App Connect Enterprise V11 introduced User Defined Policy. The User Defined Policy is defined when you construct a message flow by using the Message Flow editor. This property can be used by the ESQL or Java program inside message flow nodes, such as a Compute node or a Java Compute node.
The advantage of user-defined policies is their values can be changed by operational staff at deployment and run time.
Java Compute Node:
The Java Compute node is used to write Java logic and functions in IBM App Connect. Mentioned the below points, which state the behavior of the Java compute node.
Java can be used to inspect an incoming message and, based on its content, propagate it to one of the node’s two output terminals intact. Although the node functions similarly to a filter node, it chooses its output terminal using Java rather than ESQL.
To modify a portion of an incoming message and send the modified message to one of the output terminals, use Java.
Create and construct a distinct output message using Java that is unrelated to the input message.
Create a map in a global cache using Java, and add to and extract data from that map. By storing data in the global cache, that data is available to other Java Compute nodes or message flows.
Configuration steps to use user-defined policy in IBM ACE:
- Create policy project in the IBM App Connect.
- Create user define policy in the project and add some values.
- To work with policy, create one application in the IBM App Connect.
- Here we are using the Java compute node to configure the policy project in the application.
- Deploy Application and policy projects in the integration server.
User Define Properties Using Java Compute Node:
Create the application and user-defined policy as shown in the above figures and mention the policy project on Java compute node properties. Now deploy the Application and policy project in the server and check the response.
The application will give you the response as override properties in the user-defined policy. Observe the above response that F, A, P are given in the policy.