Message Staging and Logging Options in Advanced Adapter Engine
Message Staging and Logging Options in Advanced Adapter Engine
Link: https://blogs.sap.com/2012/11/06/message-
staging-and-logging-options-in-advanced-
adapter-engine-of-pi-73x/
Intro
One of features that were available in ABAP stack of PI 7.1x systems and that its Java
stack was lacking is customizable behavior of message persistence for various
processing steps. Transition towards Java-only processing in PI brought special
attention to this topic due to major requirements focusing on more precise
monitoring of messages processed in Advanced Adapter Engine. One of very
common use cases is the requirement to check payload of the processed message
before and after mapping execution (for example, in order to identify correctness of
the mapping execution for the particular message executed at runtime). As a result,
several significant and very useful enhancements in this area – namely,
customizable message staging and logging in Advanced Adapter Engine – were
provided in PI 7.3x and extended in PI 7.31.
In this blog, I would like to summarize various message staging and logging options
that are available in Advanced Adapter Engine of PI 7.3x.
Overview
Following message staging and logging options are available in Advanced Adapter
Engine of PI 7.3x:
Global staging/logging;
Scenario-specific staging/logging using advanced settings of Integrated
Configuration;
Scenario-specific logging using adapter module in communication channel.
In PI 7.30, message staging customization is only possible globally for the entire
Advanced Adapter Engine – meaning that all scenarios running in the corresponding
Advanced Adapter Engine are affected by respective staging configuration.
Customizable global message logging and scenario-specific staging/logging options
are not available in PI 7.30 yet.
Before proceeding with discussion of various staging and logging options, let’s firstly
highlight major differences between these two mechanisms of the message
persistence in Advanced Adapter Engine.
Redundant staging and logging configured for several (many) processing steps
should be avoided since it brings negative impact to message processing time in
Advanced Adapter Engine as well as additional load on database resulting in
increased execution time of the scenario in PI and increased database growth rate.
Global staging/logging
Message staging and logging behavior is configured adjusting corresponding
properties of the J2EE service XPI Adapter: XI:
Possible processing steps and modes that are relevant for staging are provided in
tables below:
Processing Description
Step
Mode Description
continued with the next step. If its next processing step throws an
exception, the processor reschedules the message from this storage
and returns
Mode values that are relevant for logging are derived from ‘basic’ 4-bit binary values
by summarization of respective ‘basic’ binary values and its further conversion to a
decimal value. Relevant ‘basic’ values are enumerated in the table below:
Binary Description
Value
0000 No logging
Please also note that during staging, the message was put into the queue and
retrieved it multiple times (corresponding to amount of processing steps for which
staging was configured and should be conducted for the processed message). This
can be noticed when examining audit log of the message:
Similarly, sample custom configuration of global message logging is provided below:
In logging, there is no multiple operations of queue write (put) / read (retrieve) due
to difference in nature of the logging mechanism in comparison to the staging
mechanism:
Valid processing steps that can be chosen for staging and logging using advanced
settings of Integrated Configuration are the same as those applicable for global
staging and logging configuration and described earlier.
In Message Monitor, the persisted (both staged and logged) versions of the message
can be observed (highligted on the screenshot below):
Scenario-specific logging using adapter module in
communication channel
In PI 7.31, a SAP standard adapter module MessageLoggerBean is provided – this
module can be inserted in the adapter module sequence of the corresponding
communication channel.
Adapter module parameters and their valid values are enumerated in the table
below:
Below is an extract of the audit log of the processed message were log entries
reflecting execution of MessageLoggerBean are highlighted – as seen, logging mode
(controlled by log condition adapter module parameter) is indicated:
In Message Monitor, the persisted version of the message can be observed, version
of the message is controlled by log location adapter module parameter (highligted
on the screenshot below):
Outro
Described staging and logging options can be employed in combination making
staging and logging in Advanced Adapter Engine even more flexible.
For example, the below persisted versions of the processed message are outcome of
joint usage of:
References
There are also other very nice materials on SCN that cover message staging and
logging functionality available in Advanced Adapter Engine of PI 7.3x – namely, it is
highly recommended to go through following blogs to get additional information on
the topic:
PI/XI: PI 7.3 message version persistence for ICO integration flows – teaser, the
blog written by Michal Krawczyk: http://scn.sap.com/community/pi-and-soa-
middleware/blog/2010/10/18/pixi-pi-73-message-version-persistence-for-ico-
integration-flows–teaser
Scenario specific message staging and logging in PI 7.31 AAE, the blog written by
Nageshwar Reddy:
http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/07/26/scenario-
specific-message-staging-and-logging-in-pi-731
Message Versioning in the Advance Adapter Engine of PI 7.30, the blog written by
William Li:
http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/01/03/message-
versioning-in-the-advance-adapter-engine-of-pi-730
Alert Moderator
Assigned tags
SAP Process Integration
advanced adapter engine
message logging
message staging
Related Questions
Message is not visible in adapter engine - SAP PI 7.4 (Dual Stack)
Communication channel data provider not registered for selected Adapter Engine PO 7.5
24 Comments
You must be Logged on to comment or reply to a post.
Former Member
Hi Vadim,
We are on PI 7.30 I can only see xiadapter.stage.conf in NWA and not the
log property.
Is there any SP/Release restriction.
Many Thanks,
Sudharshan N A
o Like(0)
Hi Sudharshan,
Regards,
Vadim
Like(0)
Stefan Drechßler
Hi Vadim,
Good blog!
com.sap.engine.interfaces.messaging.api.exception.MessagingException:
com.sap.aii.af.sdk.xi.mo.xmb.DynamicConfiguration.get(java.lang.String,
We are setup your log module in our adapter, but we don’t see the error
message.
By the way check your picture, same are not display correct..
Regards,
Stefan
o Like(0)
Hi Stefan,
Thank you for pointing to the issue with pictures – I re-published the
blog and now they should be back again.
Regards,
Vadim
Like(0)
Nageshwar Reddy
Hi Vadim Klimov,
Very detailed blog. Thanks.
I also had a blog written on staging and logging (PI 731): Here is the link
http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/07/26/
scenario-specific-message-staging-and-logging-in-pi-731
o Like(0)
Hi Reddy,
This is surely a fair comment, thank you. I updated the blog with
references and included links to SCN materials on message
logging/staging in AAE 7.3x topic.
Regards,
Vadim
Like(0)
Former Member
In the case of multiple Receivers or multiple Interfaces after interface determination, the
MS stage will always get staged for each new message id, regardless of global or specific
settings.
In the case of single receiver and single target interface it works as expected.
But when conditions match for multiple receivers or multiple interfaces, the
message gets staged at MS for each split message.
Jonathan
o Like(0)
Saurabh Kumbhare
Nice Blog..Cheers!!
o Like(0)
Former Member
Well explained.
o Like(0)
Pavan kumar
Cheers
Pavan
o Like(0)
Former Member
Is there any chance you know me where to find the “Advanced Settings” Tab
of the ICO in an IFlow?
I could edit the generated ICO, but editing generated objects is a very bad
idea.
o Like(0)
Hello Elias,
If you don’t see the the view ‘Properties’ in the SAP Process Integration
Designer perspective, please go to Window > Show View > Other…
and select General > Properties there.
Vadim
Like(0)
Former Member
Hi Vadim,
you were right, the “Properties” view was not active. Displaying
it solved the problem.
Thank you!
Regards
Elias
Like(0)
Former Member
Excellent Blog…
o Like(0)
Great blog. Just a question. How we can define the persistence time of a
message as usually defined in SXMB_ADM?
o Like(0)
o
Xavier San Sebastián
Like(0)
Martin Babayan
Like(0)
S Kumar
Excellent Blog
o Like(0)
Former Member
Hi Vadim,
It works fine when I put it at the beginning of the module order and I see the
entry in the message editor versions.
Best regards,
Stefan
o Like(0)
Hi Stefan,
Regards,
Vadim
Like(0)
Former Member
I am new to PI/PO, I would like to know if we can use log4j type logging to add
customized logging in PO.
o Like(0)
Former Member
o Like(0)
Hi Ashok,
Regards,
Vadim
Like(0)
Former Member
Thanks.