Configuring Talend ESB components to listen for and process notifications using the Notification WSDL - 7.0

Capturing Salesforce object changes in real time with Talend ESB

author
Irshad Burtally
EnrichVersion
7.0
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
task
Data Governance > Third-party systems > Business applications > Salesforce components
Data Quality and Preparation > Third-party systems > Business applications > Salesforce components
Design and Development > Designing Routes
Design and Development > Third-party systems > Business applications > Salesforce components
EnrichPlatform
Talend Studio
This section explains how to configure your components in Talend ESB to implement the Web Service which will be listening for notifications messages coming from Salesforce.
  1. Configure the activemq_connection_factory component as follows.
    Field Value
    MQ Server ActiveMQ
    Broker URI "tcp://localhost:61616" by default if ActiveMQ is installed on the same host.
  2. Configure the webservice_salesforce.notification.account component as follows.
    Field Value
    Address Put the URL to bind on, for example, http://0.0.0.0:8765/services/account.

    Note that this address should be coherent with the URL that you previously defined in Salesforce when setting up the Outbound Message. If you put a dummy endpoint as suggested because the Talend Web Service was not yet implemented, you can get back to the Salesforce console and edit the Outbound Message to change the endpoint URL with the same value, http://0.0.0.0:8765/services/account.

    WSDL File Browse your computer and choose the previously downloaded WSDL workflowOutboundMessage.wsdl.
    Service configuration Click the button to open the wizard. Then click Refresh to load the port name. Choose the unique port name displayed Notification, then click Finish.

    All other fields should be automatically filled. The configuration should look as follows.

  3. Configure the InOnly component by choosing the value InOnly for Exchange Patterns.

    This component is used to set the exchange pattern within the mediation route. Since you are posting a message to ActiveMQ in a fire-and-forget manner before sending back an ACK Response to Salesforce, you do not want to wait for an ActiveMQ response before proceeding. So the tip is to set the exchange pattern to InOnly right before the ActiveMQ component.

  4. Configure activemq_salesforce.notification.account as follows.
    Field Value
    Type queue
    Destination "salesforce_notification_account"
    ConnectionFactory Select the activemq_connection_factory component in the drop-down list.

    This component is used to post Salesforce notification messages to an ActiveMQ queue in order to ensure reliability. This way, you have the guarantee that Salesforce notification messages will not be lost even if a failure occurs.

  5. Configure set_webservice_response as follows.
    Field Value
    Language CONSTANT
    Expression Copy the XML fragment below and paste it into your component configuration.

    "<out:notificationsResponse xmlns:out=\"http://soap.sforce.com/2005/09/outbound\"><out:Ack>true</out:Ack></out:notificationsResponse<"

    This component is a simple cSetBody used to hardcode a positive Acknowledgement returned back to Salesforce. So the ACK attribute is always set to TRUE in your configuration.

    The configuration should look as follows.

  6. Configure log_response by choosing the value INFO for Level. This component is used for debugging purpose and will display the response sent back to salesforce.

    The configuration should look as follows.

  7. Once everything is configured, start the mediation route by clicking Run. Monitor the logs to make sure there are no errors.

If no error occurs, you should now have a mediation route running inside the studio with a SOAP Web Service listening for the URL defined in the cCxf component waiting for incoming Salesforce notifications to process.