Custom Adapter Module Development
Custom Adapter Module Development
Attachments:8 Added by Rangarajan, last edited by Rangarajan on Aug 08, 2011 (view change)
Overview of SAP NetWeaver Process Integration ( PI ) Overview of Adapter Modules Sample use case
This also describes about the custom adapter modules in PI 7.1 and the sample use case for developing the same. Even though we found lot of online materials for development of custom modules for adapters, I couldnt find the way of usage in real time. Hence I have shared this information based on my project learning. It doesnt contain any step by step for deployment or development. It describes the adapter module code fragments and how it is getting adapted to real time usage. It is for the Intermediate PI Consultants.
SAP and non-SAP Applications A2A and B2B Communications For Business Process Management (BPM) Based on Industry and web service standard
Adapter modules are stateless EJB Each adapter we can define the generic modules in the module processor Customer specific modules can be added to default module chain and it can be parameterized. Sequence of modules matters!
Encryption and decryption Creating or merging the additional attachment Converting the payload [ which are not covered in the standards ]
Figure 1: Adapter module processes Sample Use case Our requirement is to validate the file content before send the message to PI. If content is invalid then dont send the message to PI . Adapter module code fragment process is the method of the class ModuleData to manipulate the PI data Payload. Here I would like to categorize the important aspects of the process methods code fragment as follows
Please refer the referencessection for complete step by step guide to deploy the Adapter module in J2EE Adapter Engine How to use in Integration Directory [Configuration] 1. Create a sender communication channel
Figure 2: File sender Communication Channel a. Go to module tab and give your JNDI name which you have given during deployment of your adapter module as first process sequence 1. Because before sending the message to IS we need to validate the file content
Figure 3: Module prioritization b. Process sequence 2 as MessageTransformBean to structure the content from payload to PI understandable format .Please refers MessageTransformBean for more info. c. Rest of process sequences except standard CallSapAdapterare for synchronous which are not relevant to this topic.
d. Go to module configuration parameter(Which will act like runtime parameters for Adapter module) and provide the inputs as follows. Here I have shown parameters for our custom module (process sequence 1 ) only.
ModuleK ParameterN ey ame 1 1 1 1 ParameterValue
/ ArchiveFilePa home/piuser/cap/dev/errorar th chive FilePath msgType namespace /home/piuser/cap/dev/ MT_TEST_SOURCE_REQ http://test.com/test/RESULT/S YNC
Table1: Module Parameters Challenges If you face the issue like , once you have raised to exception if validation fails from module then there may be chance for adapter polling freeze .Which will restrict the further polling for sender adapter until unless the earlier exception is cleared . Solution: SAP has released the notes for most of the Service packs .Our issue will be resolved once we apply the same. References [1] How To... Create Modules for the JEE Adapter Engine