Products | Versions |
---|---|
TIBCO ActiveMatrix BusinessWorks | - |
Not Applicable | - |
Resolution:
There are 2 ways to go about in order to reference the database connections and use the same for the XPath function.
1. You could use a Java Custom Function Shared Configuration Resource to add your function in the Functions tab in XPATH query builder editor. These functions are also displayed when using the XPath Editor to build an XPath expression. To create a custom function, you must write the function as a method of a Java class and compile the code into a Java class file. Please refer to "Business Works Palette Reference" > Chapter 7 Java Palette > Java Custom Function for more information.
So, basically you could write you own Java code to establish JDBC connection from within this Java Custom Function. But, you ‘cannot’ use the JDBC Shared Configuration resource from your Java Custom Function to reference the database.
2. Further, you could use some standard JDBC activity to query the database using your input and use the database response as the input parameter for your XPath function.