Skip to Content
Author's profile photo Former Member

Static and Dynamic Queue Generator

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

/wp-content/uploads/2016/07/1_991080.jpg

4.       Uncheck the checkbox

               /wp-content/uploads/2016/07/2_991081.jpg

5.       Clicking the finish button the project looks like this.

/wp-content/uploads/2016/07/3_991097.jpg

6.       Now right click on the project and create a EJB Bean

/wp-content/uploads/2016/07/4_991099.jpg

7.       Uncheck the service endpoint checkbox

/wp-content/uploads/2016/07/7_991100.jpg

8.       Click on the DyanmicQBean.java file and write your logic for Dynamic Queue generation Code is attached.

/wp-content/uploads/2016/07/8_991101.jpg

9.       Right click on your EJB project and Build project

/wp-content/uploads/2016/07/9_991102.jpg

10.   Now we have to attach the EJB project to EAR. File -> New (EAR Project)

/wp-content/uploads/2016/07/10_991103.jpg

11.   Attach the EJB project to our EAR.

/wp-content/uploads/2016/07/11_991104.jpg

12.   Double click on the application-j2ee.engine.xml file

/wp-content/uploads/2016/07/12_991105.jpg

     Add the below references:

/wp-content/uploads/2016/07/12_1_991109.jpg

13.   Build the EAR project follow Step 10

14.   Window preference add the SAP system where you want to deploy.

/wp-content/uploads/2016/07/14_991110.jpg

15.   Right Click on the EAR project Click Run on Server and finish button.

/wp-content/uploads/2016/07/15_991111.jpg

16.   Add the Configuration in Channel:

/wp-content/uploads/2016/07/16_991112.jpg

17.   Output

/wp-content/uploads/2016/07/17_991113.jpg

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Eng Swee Yeoh
      Eng Swee Yeoh

      Hi Ragavendran

      Thank you for making the effort to contribute in this space on SCN.

      However, the bulk of the content above deals with the creation of the EJB/EAR project for adapter modules and not much on the details of this specific module. If you search on SCN, there already exist plenty of materials that cover the creation and deployment processes for adapter module development.

      As such, I'd like to suggest that you elaborate more on the specific details of your custom module, for example, the use cases, the logic of the module and some runtime examples. This would add move value to the blog as it allows others to consider if such a module would be useful for their own integration requirements.

      Regards

      Eng Swee

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Eng Swee,

      Thank you for the suggestion. Going forward will add up good details along with the code.

      This module is about generating dynamic queue as per the payload value (providing XPATH) along with the static constant to identify which particular interface.

      If user is not providing both the constant in the module parameters. The code will take by default "DEF" as constant. Then if the xpath value is not available or null in the payload Default Queue ID that is passed in the parameter will be taken.

      This module will be helpful in case of EOIO messages that might get stuck due to some issue other plants or shipments get affected in order to have a effective business flow. The generation of this dynamic and static queue module is used.

      I hope this information helped you to understand the overview of module solution.

      Regards,

      Ragav

      Author's profile photo Eng Swee Yeoh
      Eng Swee Yeoh

      You can use the Edit functionality to modify your blog accordingly instead of explaining this in the comments section.