Dropping and linking the components
About this task
This scenario requires one cMessageFilter component to filter the messages from the sender, one cFile component as the message sender, one cFile component to receiver the messages containing Paris, one cFile component to receiver all the messages from the sender, and two cProcessor components to monitor the messages routed to the two receivers.
Procedure
- From the Connectivity folder of the Palette, drop three cFile components onto the design workspace, and label them Sender, Paris_only, and Unfiltered respectively to better identify their roles.
- From the Routing folder, drop a cMessageFilter component onto the design workspace, and label it Filter.
- From the Custom folder, drop two cProcessor components onto the design workspace, and label them Monitor_Paris and Monitor_Unfiltered respectively.
- Right-click the cFile component labeled Sender, select Row > Route from the contextual menu and click the cMessageFilter component.
- Right-click the cMessageFilter component, select Row > Filter from the contextual menu and click the cFile component labeled Paris_only. This endpoint will retrieve the messages that meet the defined criterion.
- Right-click the cMessageFilter component, select Row > Route from the contextual menu and click the cFile component labeled Unfiltered. This endpoint will collect all the messages, including those meeting the filter criterion. This connection is optional.
- Right-click the cFile component labeled Paris_only, select Row > Route from the contextual menu and click the cProcessor component labeled Monitor_Paris. Repeat this step to connect the cFile component labeled Unfiltered to the cProcessor component labeled Monitor_Unfiltered.