on 11-29-2011 1:55 PM
Hi All,
In documentation of Interface AuditAccess in package com.sap.engine.interfaces.messaging.api.auditlog i found that it is possible to read AuditLog for messagekey using AuditLogManager. But i cannot find AuditLogManager ? Does someone know where i can found it or how to read auditlog for messagekey ?
BR
Maciej
Hi Maciej,
Please consider checking method getAuditEntryList() of AuditLogManager implementing class (com.sap.engine.messaging.impl.util.auditlog.AuditLogManager). This can be found in library com.sap.aii.af.ms.svc_api.jar (<bin>/services/com.sap.aii.af.ms.svc/lib/). Given a message key, it should return an array of corresponding audit log entries.
Signature of the method is as following:
public ArrayList<AuditLogEntry> getAuditEntryList(MessageKey msgKey) throws SQLException
Regards,
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I have a requirement where from a message mapping I need to find out the Audit log for a given message.
My Source payload will contain a message ID:
<Record>
<Data>
<MSGID>4F0C5BCC65150FB0E1008000AC1E11AD</MSGID>
<MSGDIR>OUTBOUND</MSGDIR>
</Data>
</Record>
Target will provide the Audit log entries like this.
<AuditAccess>
<message></messsage>
<AuditEntry>
<line> </line>
<line> </line>
<line> </line>
<line> </line>
<line> </line>
...
</AuditEntry>
</AuditAccess>
For this we wrote a UDF where we are trying to access. Here is my Java code:
import com.sap.engine.messaging.impl.util.auditlog.AuditLogManager;
import com.sap.engine.interfaces.messaging.api.*;
import java.util.*;
public class RWBTest {
public static void main(String[] args) {
String msgID = "12345678";
MessageDirection msgDirection = MessageDirection.valueOf("OUTBOUND");
ArrayList al = new ArrayList();
MessageKey msg = new MessageKey(msgID,msgDirection);
AuditLogManager am = AuditLogManager.getInstance();
try {
al = am.getAuditEntryList(msg);
} catch (Exception e) {
// TODO: handle exception
}
String ret = al.toString();
}
}
The issue is I am not able to instantiate AuditLogManager and getting a NULL pointer exception.
I could not find any JavaDoc for AuditLogManager class.
Anyhelp/document on AuditLogManager class would be much appreciated.
Thanks in advance !!!
Hello Shibaji,
It isn't clear for me what is the intention to use AuditLogManager in UDF (message mapping)? For mappings, the standard way to go is to utilize AbstractTrace.addInfo() in order to create trace entries. For example:
com.sap.aii.mapping.api.AbstractTransformation.getTrace().addInfo("Sample text of the trace entry");
Next, is there any reason to pass technical information like message ID, direction in the payload? In general, payload should contain integrated application data whereas message technical data like message ID can be retrieved from mapping runtime constants. On SAP Help, you can see all mapping runtime constants that can be used as well as proposal on their usage:
http://help.sap.com/saphelp_nwpi711/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/frameset.htm
Regards,
Vadim
Hello,
I would need the same functionality - check status of some message from another relation if I know MessageID. So in this case I need it also use this feature in UDF.
Could you help me and advise how to get AuditEntryLog with information about processing message in UDF if I know MessageID of this relation, please?
Thanks Michal
(I'm using PI 7.11)
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.