Double-click the cFile component,
which is labeled File_source, to display its Basic settings view in the Component tab.
In the Path field, browse to or enter the
input file path, and leave the other parameters as they are.
In this scenario, there are four text files in the specified
directory: a.txt, b.txt,
c.txt and d.txt, the contents of which
are This is a!, This is b!, This is
c!, and This is d! respectively.
Double-click the cAggregate
component, which is labeled Aggregator, to display its
Basic settings view in the Component tab.
In the Language field, select Constant or Simple as the expression language.
In the Expression field, enter the
expression "getBody(String.class)" to retrieve the body of the
message.
In the Strategy field, enter the
name of the Java bean AggregateBody you just created.
Select the Number of messages check
box and type in 2 in the field.
Double-click the cProcessor
component labeled Monitor_before to display its Basic settings view in the Component tab.
In the Code box, customize the code as
follows so that the Run console displays
the message contents before an aggregation takes place:
In the same way, configure the cProcessor component labeled Monitor_after so
that the Run console displays the message contents after an aggregation takes place: