Article

adam_j_bradley's picture
article
Reads:

2891

Score:
0
0
 
Comments:

0

Stepping through UserApp Variables

Author Info

28 January 2008 - 7:18am
Submitted by: adam_j_bradley

(View Disclaimer)

Problem

A Forum reader recently asked:

"Is there any way to step through or see variables as UserApp workflow is occuring, so as to help in debugging?"

And here is the response from Adam Bradley ...

Solution

I use log4j to do some console logging. Most of my methods look something like this:

//Mapping
(function () {
    log = 
Packages.org.apache.commons.logging.LogFactory.getLog("PretendToBeFromHere");
    var errorString = "";

    log.info("Create User: Mapping: Entering");
    try {
        var _esd = flowdata.get('start/request_form/aDate').toString();
        if (_esd.length != 0) {
            log.info("Create User: Mapping: Entering: Success. Retrieved 
value of aDate " + _esd + " for User " + recipient + ".");
            formattedEsd = 
Packages.au.com.identityconcepts.IDMHelperExt.edirDateToPlain(_esd);
            return formattedEsd;
        }
        else
            errorString = "Create User: Mapping: Leaving: Exception when 
retrieving value of aDate for User.";
    } catch (e) {
        errorString = "Create User: Mapping: Leaving: Exception when 
retrieving value of aDate for User. " + e.toString();
    }
    log.info(errorString);
    return null;   
 }) ();


Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2013 Novell