Skip to main content Skip to complementary content

Configuring the components

Procedure

  1. In the Basic settings view of the cTimer component, enter 1 in the Repeat field to generate the message exchange one time. Keep the default settings of the other options.
  2. In the Basic settings view of the cSetBody component, select Constant in the Language list and enter the following message in JSON format in the Expression field:
    "{ \"givenName\": \"Mike\", \"sureName\": \"Jonson\", \"employee\": { \"consultant\": true, \"since\": 2011 }, \"path\": \"/etc/talend/runtime.cfg\" }"
  3. In the Basic settings view of the cSetHeader component, click [+] in the New headers to set area to add a row in the Headers table.
    In the Name field, enter the name of the header "responseCode".
    In the Language list, select Constant.
    In the Value field, enter 200.
  4. In the Basic settings view of the cMulticast component, click [+] to add three rows to the URIS table. Specify the URIs of the endpoints where the message will be sent, "direct:repo", "direct:file", and "direct:built-in" in this use case.
  5. In the Basic settings view of the cDirect component labeled direct_repo, enter the endpoint URI "repo" in the Name field.
    Repeat this step to set the Name for direct_file and direct_built-in as "file" and "built-in" respectively.
  6. In the Basic settings view of the cJSLT component labeled Repo_resource:
    Select Repository in the Type list.
    Click [...] next to the Resource option and select the JSLT template that will be used to transform the incoming JSON message in the dialog box.
    Select the Pretty Print check box to format the output JSON message in a readable way.
  7. In the Basic settings view of the cJSLT component labeled Local_file:
    Select File Path in the Type list.
    In the Resource File field, browse to the path to the JSLT template in your local file system that will be used to transform the incoming JSON message.
  8. In the Basic settings view of the cJSLT component labeled Built-in:
    Select Built-In in the Type list.
    Select Constant in the Language list and Native as the code style.
    In the JSLT Template box, enter the JSLT template that will be used to transform the incoming JSON message.
    Select the Pretty Print check box to format the output JSON message in a readable way.
  9. Keep the default settings of the cLog component.
  10. Press Ctrl+S to save your Route.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!