Modules in Message Exchange

The figure shows the modules that are involved in the message exchange process. It also shows technical tracing and logging mechanisms.
The blocks shown in gray are parts of the Adapter Framework. The white blocks are part of AS Java. You must make the orange blocks available in adapter development.
The Adapter Framework consists mainly of Enterprise JavaBeans. As a rule, these are stateful session beans. These communicate with the adapters using the Enterprise JavaBeans container and the JCA framework.
There are two ways to convert the external protocol to XI message protocol:
● Execute the entire protocol mapping in the JCA adapter
● Execute parts of the mapping in the Enterprise JavaBeans that are embedded in the module processor

Implement the mappings relating to the transport protocol (for example, managing a port, managing a connection to another ERP system, or a database connection) in the JCA adapter.
Implement mappings relating to the message protocol (for example, converting a comma-separated payload to an XML payload) in an Adapter Framework module. This module can then be used for other adapter types.
In both cases, you can use the AS Java Services and the Adapter Framework libraries.
The module processor (AF module processor in the graphic) controls the processing sequence of the module. The modules are called in the sequence as they are entered in the communication channel.
If an exception is triggered at runtime, processing is stopped and the exception trigger is informed.
Module processing can be controlled by the following additional parameters that are saved in ModuleData:
● mp.skip
Set this parameter Boolean.TRUE and modules that recognize this parameter can skip the processing. Other modules can reset the parameter so that the next module processes the object.
The module description should describe its reaction to the parameter. If no description is provided then it is assumed that the module ignores the parameter.
● audit.key
To enable automatic auditing and collecting of performance statistics, you must add a parameter object with the key audit.key to the AuditKey object that represents the message that is currently to be processed.
It is recommended that you set this parameter in sender adapters so that it can be included in performance statistic evaluation:
AuditKey amk = new AuditMessageKey(xiMsgId, AuditDirection.OUTBOUND);
md.setSupplementalData("mp.skip", Boolean.FALSE); //Default
md.setSupplementalData("audit.key", amk);
...
mp.process(channelId, md);

For more information see the source code for the example adapter in CS_TRAUD START.
More information: Measuring Adapter and Module Performance