Skip to main content Skip to complementary content

Building the Route

About this task

Example Route.

Procedure

  1. From the Palette, drag and drop cFile, a cConvertBodyTo, a cSetbody and a cLog components onto the design workspace.
  2. Link the components using the Row > Route connection.
  3. Double-click the cFile component to open its Basic settings view in the Component tab.
    Basic settings view.
  4. In the Path field, enter the path of the message source.
    In the fileName field, enter the name of the message source.
  5. Double-click the cConvertBodyTo component to open its Basic settings view in the Component tab.
  6. In the Target Class Name field, enter your target class name, String.class in this scenario.
    Basic settings view.
  7. Double-click the cSetBody component to open its Basic settings view in the Component tab.
  8. From the Language list, select XPATH.
    In the Expression field, type in "/Customers/Customer[Address/State='MA']" to extract the customer whose State is MA.
    Basic settings view.
  9. Keep the default settings of the cLog to log the message exchanges.
  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 – let us know how we can improve!