Viewing code and executing the Route

SetHeader - Mediation

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
Talend Data Services Platform
Talend Real-Time Big Data Platform
Talend ESB
Talend MDM Platform
Talend Data Fabric
Talend Open Studio for ESB
task
Data Governance > Third-party systems > Processing components (Mediation) > SetHeader components (Mediation)
Design and Development > Third-party systems > Processing components (Mediation) > SetHeader components (Mediation)
Data Quality and Preparation > Third-party systems > Processing components (Mediation) > SetHeader components (Mediation)
EnrichPlatform
Talend Studio

Procedure

  1. Click the Code tab at the bottom of the design workspace to have a look at the generated code.
    As shown in the code, a message route is built from one endpoint .to another, and while in routing, the source message is split according to the condition xpath("/people/person") by cSplitter_1, and each sub-message is given a header named CamelFileName, the value of which is returned by .method(beans.setFileNames.class).
  2. Click the Run view to display it and click the Run button to launch the execution of your Route. You can also press F6 to execute it.
    RESULT: The source file message is split into sub-messages and each sub-message is renamed after the city name it contains and routed to the receiving endpoint.