In the previous instalment, Building your first iFlow – Part 2: Initializing the iFlow the iFlow was setup so that the iFlow could be started and the data retrieved from a remote service. In this exercise the data will be parsed and sent to the email account as an email.
To handle the data from the request, a content modifier component is used that will parse the XML and then use XPath’s to extract the relevant parts of the XML into variables that will be used in the message.
After the content modifier has processed the message, the message will need to be delivered so at this stage an “End Message” event will be added to the integration process as well.
Expand the “Others” panel in the palette and select the “Sender” component and place it in the iFlow.
The sender component will need to be configured to specify the authentication mechanism that will be used when sending messages to the external service.
Click on the sender node and then the properties tab will be activated with the choice of Basic Authentication or Certificate Based Authentication.
Since GMail expects the username and password to be sent using the Basic Authentication scheme, select the “Basic Authentication” option. Without this option selected the GMail server may not receive the credentials encoded correctly.
And of course the destination (sender) component and channel will also be required to take the final message and deliver it somewhere, join them together using a message flow connector.
As before, to configure the channel requires right clicking over the channel and choosing “Configure Channel” in order to reliably configure the channel definition.
For the outgoing messages the messages will be sent to the “Mail” adapter, that will be using SMTP to deliver the message. As before, once the adapter has been selected, goto the “Adapter Specific” tab and enter the relevant details.
Here the address of the destination server will be the gmail servers: smtp.gmail.com:587 using STARTTLS protocol and both the from and to fields will be set to my personal gmail account. For now the subject and body fields will not be configured.
All that is missing is the credential name and this will require a little detour…. which will be covered in the next posting