Adding mediator
We cannot wire the adapter
directly to the added BPEL process because of namespace conflict. There is an
“embedded ESB” component called mediator that can be used for doing data
transformations, routing decisions etc. very easily.
So drag and drop the mediator
to the canvas and wire the file interface to it. Next wire the mediator to the
BPEL flow.
The end result should look
like this:
Next open the mediator and click on the icon that looks like
cross-connect and its tooltip says: “Select and existing mapper file or create
a new one”.
Select create new and press Ok.
You can open both sides to reveal the parameters that need
to be mapped to each other. Notice the similarity of names.
You can drag one-by-one lines between elements but there is
also a shortcut. Drag a line from FenceEvent on left to GeoEvent on
right and the following dialog opens:
Select ok and you will see an automated mapping between all
parameters.
If you see a for-each operation in the mapping, you’ve made
a mistake and forgot to click the “File contains multiple messages” checkbox
along the path of defining the file adapter.
Save all. Now we have completed our task and can test again.