ISAM for Mobile: Trace statements in Mapping Rules


Edit (13/1/15): There is another example of trace statements which references a different class in the article: ISAM for Mobile: Javascript Policy Information Points

Debugging IBM Security Access Manager (ISAM) for Mobile Mapping rules can be challenging. One of the things that makes it much easier is having regular trace statements.

In developing the other ISAM for Mobile articles, I found it much easier working out certain values using the Mapping extension utilities for tracing.

ISAM for Mobile: OAuth Authorization in Mapping Rules:

ISAM for Mobile: Accessing HTTP Headers in Authentication Service Mapping Rules

When generating trace, ensure that you have the trace statements enabled in the appliance:

In order to use the trace utilities, add the trace string to the section labelled Tracing Specification:

This is very similar to the old WebSphere ISC mechanism for trace strings.

Once enabled, trace data will be generated to the application log files section:

In your mapping rules, import the correct class, and then the trace string is available:

 * your code here
IDMappingExtUtils.traceString("My new trace String: " + someValue);

Now when the mapping rule is executed, the trace string should appear in the trace.log.

[4/2/14 15:46:48:840 EST] 0000004f id= > traceString ENTRY My new trace String: null

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Up ↑

%d bloggers like this: