Hello Kareem
First: You will need to create the policy with the properties you need
Second: You need to create a java class for the java compute node from which you want to access the policy.
Third: Add user code to get the policy, which will be something like this:
- MbPolicy myUDPolicy = getPolicy("UserDefined", "{policyproject}:MyUDP"); which get a policy called MyUDP that is stored in "policyproject".
Fourth: Add user code to access the policy to get the properties, which will be something like this:
- System.out.println(" Name: "+myUDPolicy.getPropertyValueAsString("Name"));
For more information refer to the IBM doc: https://www.ibm.com/docs/en/app-connect/12.0?topic=java-accessing-user-defined-policy-from-javacompute-node
Regards,
Kjetil Svihus
------------------------------
Kjetil Svihus
------------------------------
Original Message:
Sent: Tue January 16, 2024 02:37 PM
From: Kareem Qureshi
Subject: Accessing a user-defined policy from a JavaCompute node
I am trying to acess user-defined policy from JCN... I am using ACE 12.0.9.0 on windows 11 laptop... as defined in this documentation - Accessing a user-defined policy from a JavaCompute node
I have created Policy project Local and defined a sftpconn policy and deployed locally
MbPolicy myPol = getPolicy("UserDefined", "{Local}:sftpconn");
it is always comes back as null.
Is there anything I am missing here....
------------------------------
Kareem Qureshi
------------------------------