Skip to main content Skip to complementary content

Configuring the components and connections

About this task

In this scenario, the cStop component stops the sub-route on which it is dropped before it completes and does not have properties to set.

Procedure

  1. Double-click the cIntercept component to display its Basic settings view in the Component tab.
  2. Select the From intercept type and enter "file*" in the Component filter field to intercept messages from the component with the name matching the file* pattern.
  3. Double-click the cProcessor component, to display its Basic settings view in the Component tab.
  4. Customize the code in the Code area to display the CamelFileName header of the intercepted message on the console:
    System.out.println("Message intercepted: "+
    exchange.getIn().getHeader("CamelFileName"));
  5. Double-click the first cTimer component to display its Basic settings view in the Component tab.
  6. Enter 1 in the Repeat field to trigger one message exchange.
  7. Double-click the first cSetBody component to display its Basic settings view in the Component tab.
  8. Select Constant from the Language list and enter "Hello World!" in the Expression field as the message body.
  9. Double-click the first cFile component to display its Basic settings view in the Component tab.
  10. Specify the path to the source file in the Path field and enter the file name in the fileName field.
  11. Double-click the second cFile component to display its Basic settings view in the Component tab.
  12. Specify the path to write the file to in the Path field and enter the file name in the fileName field.
  13. Keep the default settings of the cLog components to log the message exchanges.
  14. 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!