I would like to share with you about my experience in a requirement.
The requirement was to create both static and dynamic queue (payload value) generator.
Since this was to be implemented for many scenarios I ruled out the way of approaching through udf in mapping.
I created an adapter module where the inputs of the module was to provide an existing QueueID from the channel, Xpath to determine the payload value, constant that needs to be static for the queue.
Creation of Adapter module:
1. Install NWDS based on the PI version.
2. If you are using latest version of JRE downgrade it to Java 6.
3. File -> New EJB Project
4. Uncheck the checkbox
5. Clicking the finish button the project looks like this.
6. Now right click on the project and create a EJB Bean
7. Uncheck the service endpoint checkbox
8. Click on the DyanmicQBean.java file and write your logic for Dynamic Queue generation Code is attached.
9. Right click on your EJB project and Build project
10. Now we have to attach the EJB project to EAR. File -> New (EAR Project)
11. Attach the EJB project to our EAR.
12. Double click on the application-j2ee.engine.xml file
Add the below references:
13. Build the EAR project follow Step 10
14. Window preference add the SAP system where you want to deploy.
15. Right Click on the EAR project Click Run on Server and finish button.
16. Add the Configuration in Channel: