I am looking for help/suggestion for the following scenario:
Currently we are logging $body variable to OSB logs for both request and its response. But sometimes it is difficult to relate a request to its response since there are multiple calls to same service at same time. So we have dig hard into the logs to find the association between the request and response. To over come this issue I want to know if it is possible to print a uniqueID for request and response pair? Do I need to write an assertion and expose it as a WS-Policy and then attach it to proxy service? I cannot use a report action as client policies refrains to do that.
How to go about it. Please advise.
Please let me know if more information/clarification is required on the question.
Using $messageID is a good plan but if you want to use a UUID you can use fn:bea-uuid() to assign an id to a variable at the start of your pipeline and print it out in request and response threads. I've done this when trying to get timings for calls to external systems to see how much time is being spent in OSB when we were getting very spiky behaviour (e.g. 95% of responses were sub-second but we saw maxima of the order of 190 seconds).
IIRC, we assigned something like
to a variable and then logging that alongside fn:currentDateTime() as the WLS log timestamps don't give you the millisecond accuracy.