Article

Stepping through UserApp Variables

Author Info

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

article
Reads:

1254

Score:
0
0
 
Comments:

0

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;   
 }) ();


Author Info

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




User Comments

© 2009 Novell, Inc. All Rights Reserved.