The problem of SAP (adapter 4.6) IDocs being logged to the IntegrationServer/packages/WmPartners/pub/mailbox directory seems to cause webMethods Integration Server administrators quite a few headaches. The standard supported mechanism to delete these files
is to call "wm.PartnerMgr.xtn.Sweeper:sweepTRX" service periodically to purge old transactions. While this is an acceptable solution, more than one administrator has asked how to disable this transaction logging altogether.
Information regarding this method can be found by combining specific information in the Partner Manager user’s guide with information from the SAP Adapter user’s guide.
STEP 1: Create a service to handle “content-based routing”. Name this service whatever you like, and put it somewhere where you put “common” services for server administration.
STEP 2: On the “Input / Output” tab, select the specification reference at “pub.sap.idoc.routing:inboundDefault”.
Step 3: Create a map step
Step 4: Add a string variable “$routeOnly” and set the value to “true”
By inserting the parameter “$routeOnly” with the value “true” prior to calling WmPartners, logging to disk is bypassed.
Step 5: Map “sender”, “receiver” and “msgType” from IDOC_CONTROL as follows (you will have to create the variables on the left under IDOC_CONTROL): (Note that this step is necessary if you use IDocs that are a version earlier than 4.0)
SNDPRN => sender
RCVPRN => receiver
MESTYP => msgType
On each of these three maps, edit the “Indices” to use “IDOC_CONTROL” index “0”, and insert a “Copy condition” ensuring that the variable being copied is not null (the following image is an example):
Step 6: Repeat step 5, only for IDOC_CONTROL_REC_40.
Steps 5 and 6 emulate the default behavior of the SAP adapter by extracting sender, receiver, and message type from the EDIDC
Step 7: Register this service with SAP adapter routing:
Call the built-in service “pub.sap.idoc.routing:registerService” with the parameters:
msgType => $default
service => {your service name}
inbound => true
After the sender, receiver, and message type are extracted, the IDoc is sent to the partner manager. These parameters are used to match a partner manager routing rule to determine where to route the IDoc. This service is automatically registered when the package is loaded.
The service you create is automatically enabled, and will be applied to all incoming IDocs. It can be disabled or unregistered as follows:
[SIZE=2]** TO DISABLE THIS SERVICE (AND ENABLE LOGGING) **
(NOTE: This service is intentionally disabled in development)
- Open IS Administrative console
- Open the SAP adapter configuration
- Under “Default handling for all IDocs” change the “Inbound service” setting from “{your service name}” to “$none”.[/size]
[SIZE=2]** TO UNREGISTER THIS SERVICE **
Call the built-in service “pub.sap.idoc.routing:unregisterService” with the parameters:
msgType => $default
service => {your service name}
inbound => true
I hope that this guide helps others as a reference to address this issue in the future![/size]
– Christopher Kovacs