Article
article
Reads:
1254
Score:
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;
}) ();





0