Tracing Functions Using APL in a Workflow

If you want to perform traces to see which functions change a UDR, you can use the trace() APL function.

The trace command syntax is as follows:

void trace (drudr myUDR, string Message)   
ParameterDescription

myUDR

The UDR to trace on

Message

The message displayed in the trace

Returns

Nothing


Example trace() Function

This is an example of how the trace() function can be used in an Analysis agent.

import ultra.Default.traceudr;

consume {
  MyTraceUDR tu = {
      "intField": 1,
      "strField": "first"
  };
  trace(tu, "Sending to Dest1");
  udrRoute(tu, "dest1");
  
  tu = {
      "intField": 2,
      "strField": "second",
      "subUdr": tu
  };
  trace(tu, "Sending to Dest2");
  udrRoute(tu, "dest2");  

}

When doing a trace in Desktop, the messages defined by the trace() function will be shown in the table displaying trace results:

See ... for more information about executing traces in Desktop.