Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
2,652

Introduction:

What is Poll Enrich:  It is used to read the messages from external system and add the content to the original message in the middle of message processing sequence. Currently, we can use Poll Enrich step only to read the data from SFTP server.

There are the following options in Poll Enrich:

Combine XML: Combines the message polled from the external component with the original message without any conditions. The messages are combined in multimapping format.

  • Concatenate: The message polled from the external component is added to the existing message.

  • Replace: The existing message is replaced with the message polled from the external component.

Step-1: Add i-Flow and name it as PollEnrich and add an artifact take sender  as HTTPs and receiver as SFTP

Step-2: Open the i-Flow and Change the Sender Participant to “HTTP” and Target Participant to “SFTP

SaiPrudhviRajTaduva_0-1735370357638.png

Step-3: Connect the Sender Participant “HTTP” to Start and use the HTTPs adapter. Configure the Connection Tab as per below.

Note: Address can be anything, but for practice purpose here I am using POllEnrich as naming convention. This will be the end point URL for the Interface to trigger.

SaiPrudhviRajTaduva_1-1735370470966.png

Step-4:From the pallet functions, choose Call ---> External call--->Poll Enrich  and drop it in-between Start and End Message.

Double click on Poll Enrich function and select Combine XML from the Processing tab

SaiPrudhviRajTaduva_2-1735370824753.png

Step-5: Connect the End message and Target Participant “SFTP” and use SFTP adapter. In SFTP adapter, enter the following details

SaiPrudhviRajTaduva_3-1735371260113.png

Make sure that the SFTP credentials are deployed in the below path

Monitoring–>Integrations And APIs–>Overview –> Manage Security –> Security Material –> Create/Upload Credentials

Check the connectivity test of SFTP adapter in Test Connectivity in the below path

Overview –> Manage Security –> Connectivity Tests –> SSH

Copy the Host Key and paste it in notepad & deploy it in Known Hosts(SSH) file in the below path

Overview –> Manage Security –> Security Material –> Upload Known Hosts(SSH)

Step-6: Now take one more sender from the Participant pallet and Connect the Sender Participant “SFTP1” to Poll Enrich.

SaiPrudhviRajTaduva_4-1735371805247.png
In SFTP adapter, enter the following details
SaiPrudhviRajTaduva_5-1735372474776.png

 

Step-7: Save the Integration Flow & deploy it. Once Deployed, Go to Monitor. The status of the Integration Flow should be started

SaiPrudhviRajTaduva_6-1735372646481.png

Step-9:Now we are good to test the Integration flow. The next step is configuring the end point in Postman Copy the end point from Monitor tab.

SaiPrudhviRajTaduva_8-1735373174754.png

 


Inputdata:

<OrderDetails>
    <Order>
        <OrderNumber>1</OrderNumber>
        <OrderStatus>Shipped</OrderStatus>
        <CustomerEmail>customer@example.com</CustomerEmail>
        <CustomerName>John Doe</CustomerName>
        <EmailNotificationFlag>true</EmailNotificationFlag>
        <OrderTrackingNumber>TN12345678900</OrderTrackingNumber>
    <Order>
</OrderDetails>
Data from external system:
<OrderDetails>
 <Order>
  <OrderNumber>12345</OrderNumber>
  <OrderStatus>delivered</OrderStatus>
  <CustomerEmail>customer@example.com</CustomerEmail>
  <CustomerName>John Doe</CustomerName>
  <EmailNotificationFlag>true</EmailNotificationFlag>
  <OrderTrackingNumber>TN12345678900</OrderTrackingNumber>
 </Order>
</OrderDetails>
Step-8:

Open Postman paste the endpoint that you have copied from the monitor select basic authentication and provide the credentials the you have created.
Inputdata:
SaiPrudhviRajTaduva_9-1735373849257.png
Output:
SaiPrudhviRajTaduva_10-1735373885729.png

You can also try the other two functions in the same flow by changing the aggregation algorithm to

  • Concatenate

  • Replace

Thank you & Happy
Integrating

 

 

   

3 Comments