on 2018 Oct 01 2:43 PM
I need to store some status information like "Document 100 posted successfully" or "Error: Customer 100 not found" in the message processing logs so I can extract afterwards all the statuses and forward them in one email. Is there a posibility to store something in an integration flow to get it visible to
/api/v1/MessageProcessingLogs
?
Request clarification before answering.
Hello Codrin,
Below will guide how you can do this.
1) Write a script to set the CustomHeaderProperties which can be accessible using above mentioned APIs subset.
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
def body = message.getBody(java.lang.String) as String;
def messageLog = messageLogFactory.getMessageLog(message);
if(messageLog != null){
//addCustomHeaderProperty
messageLog.addCustomHeaderProperty("CustomSri", "SriprasadShivaramBhat")
}
return message;
}
2) Call the API with sublevel 1 and select all the fields you need.
Later in your channel remove the $select and keep only $filter ( if you have any filter ) like below then you will get the customheaderproperty set [ Currently there is some issue with combination of $select & $expand for these entities and development team working on it ]
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
11 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.