App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#Applicationintegration
#App Connect
#AppConnect
 View Only
Expand all | Collapse all

User defined Policies

  • 1.  User defined Policies

    Posted Fri February 06, 2026 04:24 PM

    Can anyone help me with accessing the property which is mentioned in user defined policy using esql on compute node.



    ------------------------------
    Narender kadari
    ------------------------------


  • 2.  RE: User defined Policies

    Posted Mon February 09, 2026 04:44 AM

    Hi

    You can declare a variable outside the module part of you ESQL which references your UDP. What's important is that the variable must be spelled exactly the same as your UDP, else it won't work.

    Example:

    DECLARE configGroup EXTERNAL CHARACTER 'default_group';

    CREATE COMPUTE MODULE TransportOrder_Compute
        CREATE FUNCTION Main() RETURNS BOOLEAN
        BEGIN
            SET OutputRoot.JSON.Data.Config = configGroup;
            
            IF configGroup = 'PROD' THEN
                SET OutputRoot.JSON.Data.Status = 'Operational';
            END IF;

            RETURN TRUE;
        END;
    END MODULE;



    ------------------------------
    Niki Heyligen
    Integration Consultant
    Integration Designers
    Kontich
    ------------------------------



  • 3.  RE: User defined Policies

    Posted Mon February 09, 2026 11:40 AM

    Hi,

    Thanks for the reply however, my actual requirement is to access user defined policy with in the ESQL node without using any java code.



    ------------------------------
    Narender kadari
    ------------------------------



  • 4.  RE: User defined Policies

    Posted Tue February 10, 2026 05:12 AM

    Hi, 

    Sorry, I misread it as User Defined Property. To read policies, I believe you will need a small Java bridge like Paul mentioned: 

    https://www.ibm.com/docs/en/app-connect/13.0.x?topic=esql-accessing-user-defined-policy-by-using



    ------------------------------
    Niki Heyligen
    Integration Consultant
    Integration Designers
    Kontich
    ------------------------------



  • 5.  RE: User defined Policies

    Posted Mon February 09, 2026 11:39 AM

    Hello Narender,  

     You can access it in ESQL via java calls.  

    Please see this for the details: 

    Accessing a user-defined policy by using ESQL - IBM Documentation  



    ------------------------------
    Paul Lacy
    ------------------------------



  • 6.  RE: User defined Policies

    Posted Tue February 10, 2026 05:12 AM

    Can you guide me to use Java integration project(Java package) instead of JCN node to call user defined policy in esql.



    ------------------------------
    Narender kadari
    ------------------------------



  • 7.  RE: User defined Policies

    Posted Tue February 10, 2026 07:54 AM

    Perhaps it would be better for you to share your use case? It maybe that creating a UDP and then using a policy to over ride it achieves the same thing?



    ------------------------------
    Andy Bell
    ------------------------------



  • 8.  RE: User defined Policies

    Posted Tue February 10, 2026 08:44 AM

    I have created a java integration project with class and method. And created an external procedure with java as external name in esql. And referenced the java project to application. But when I try to deploy the bar iam getting an error java methods could not be found in workpath/shared-classes directory.



    ------------------------------
    Narender kadari
    ------------------------------



  • 9.  RE: User defined Policies

    Posted Wed February 11, 2026 04:54 AM

    Hi,

    Have you placed the JAR file inside the shared-classes directory of the integration node?



    ------------------------------
    Abdulla M H
    ------------------------------



  • 10.  RE: User defined Policies

    Posted Wed February 11, 2026 12:37 PM

    Hi,

    Can please specify which jar needs to be added as I have already added jplugin. And when I created a new java project and re compiled with bar issue has been resolved and bar file is deployed. But when iam trying to call the java method after reaching to mbpolicy.getpolicy() method iam getting source folder not found tab I have added the message flow in the message flow container but still getting the error. If I press f6 the method is returning null(Policy or property not found). Ihave added the relevant sbips fyr.



    ------------------------------
    Narender kadari
    ------------------------------



  • 11.  RE: User defined Policies

    Posted Mon February 16, 2026 07:44 AM

    Go to java prespective , create java project , put the class into it , after this right click on the java project , select build path , then configure build path .

    in the screen will open the libraries tab and the select add external jars from the right add below 2 jars :

    • jplugin2.jar
    • javacompute.jar

    from this path :
    C:\Program Files\IBM\ACE\12.0.12.19\server\classes



    ------------------------------
    Ahmed Elelaimy
    ------------------------------



  • 12.  RE: User defined Policies

    Posted Mon February 16, 2026 10:37 AM

    Thanks it worked.



    ------------------------------
    Narender kadari
    ------------------------------