public interface AuditAccess
The AuditAccess
interface offers methods to write an AuditLogEntry
to the memory audit
store with the given status. For performance reasons all AuditLogEntry
objects, created with this
method will by default be kept in the memory audit store, till they are explicitly flushed to the DB for a specific
MessageKey.
This will usually be done automatically by the Messaging System, whenever a message reached a final state (i.e.
DELIVERED, NOT DELIVERED, FAILED). AuditLogEntry
objects are merged together from the memory audit
store and the BC_MSG_AUDIT DB table (and sorted), before they are getting returned to the UI for displaying purpose,
through the method getAuditEntryList(PublicMessageKey msgKey)
of the AuditLogManager
class. There are several auditSuccess, auditWarning and auditError method signatures, which allow to ommit the
PublicMesageKey, if not known and the parameters for the text key, if available.
If third party Adapter developers want to use the offered AuditLog capabilities, they are required to create a
MessageKey (consisting of a GUID messageId and a MessageDirection
object) as early as possible and to
pass that MessageKey to the AdapterFramework, as part of the Message representation.
Since flushing the AuditLogEntries for a specific MessageKey causes DB access and therefore is a performance issue,
it's up the application developers, when and how often they need to call the flush method additionally, to avoid
loosing audit entries (especially in case of errors on sending side)..
Modifier and Type | Field and Description |
---|---|
static String |
VERSION_ID |
Modifier and Type | Method and Description |
---|---|
void |
addAuditLogEntry(MessageKey msgKey,
AuditLogStatus status,
String textKey) |
void |
addAuditLogEntry(MessageKey msgKey,
AuditLogStatus status,
String textKey,
Object[] params)
Writes an
AuditLogEntry to the memory audit store with the given status. |
void |
flushAuditLogEntries(MessageKey msgKey)
This method is used to explicitly flush all
AuditLogEntry objects stored in the memory audit store
for a given MessagKey to the BC_MSG_AUDIT DB table. |
static final String VERSION_ID
void addAuditLogEntry(MessageKey msgKey, AuditLogStatus status, String textKey, Object[] params)
AuditLogEntry
to the memory audit store with the given status.msgKey
- The MessageKey, for which the AuditLogEntry
is to be written.textKey
- The key of the message text in the ResourceBundle used in the AuditLog UI JSP page. For 3rd party
application/adapter development it's also possible to pass in an already localized text String, instead of
a resource bundle key. In this case it is also possible to use the Java TextFormatter's placeholder
concept and the additional params ({0}...{x}).params
- Some (up to AditLogEntry.MAX_PARAMS) additional params for the message textstatus
- AuditLogStatusvoid addAuditLogEntry(MessageKey msgKey, AuditLogStatus status, String textKey)
void flushAuditLogEntries(MessageKey msgKey)
AuditLogEntry
objects stored in the memory audit store
for a given MessagKey to the BC_MSG_AUDIT DB table. For performance improvements, all added
AuditLogEntry
objects are by default kept in the memory audit store, till they get explicitly
flushed to the DB. The flushing is to be done, when the message reached a final state (i.e. DELIVERED, NOT
DELIVERED, FAILED) and when the message processing flow leaves the AdapterFramework. The MS automatically flushs at
central points, and it is up to the appliations, how often they want to flush additionally, to avoid loosing audit
entries (especially in case of errors on sending side).msgKey
- The MessageKey of the message to be flushed to the DB.Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] SAP_XIAF
|
[sap.com] com.sap.aii.af.ifc.facade
|
api
|
BC-XI
|
Copyright 2019 SAP AG Complete Copyright Notice