function Service_PreInvokeMethod (MethodName, Inputs, Outputs){ if (MethodName=="Execute") { TheApplication().Utility.InvokeMethod("logTransformRequest", Inputs, TheApplication().NewPropertySet()); } return (ContinueOperation); }
The Invoke needs the following script added:
function Service_InvokeMethod (MethodName, Inputs, Outputs) { if (MethodName=="Execute") { TheApplication().Utility.InvokeMethod("logTransformResponse", Outputs, TheApplication().NewPropertySet()); } }
The logRequest and logResponse methods set the direction attribute to 'EAI Transform' to distinguish it and uses the MapName attribute as the functional name. The Record Id is assumed to be an element called 'Id' in the first top level container.
I made a personal decision that logging these payloads was not universally necessary and therefore wanted to make logging these records conditional. In my case I made it run in two scenarios:
- If the executing user's log level is 5 and payload logging is enabled
- If the payload logging is not generally enabled but an error occurred subsequently in the executing workflow of a subprocess it called.
No comments:
Post a Comment