Service Catalog: push a debug log to the workflow from script include

 script include function:

CatalogueHelper.wfDebug("a message- xyz", "debug");


//...

CatalogueHelper.wfDebug = function(sMessage,sMessageLevel){ sMessageLevel = sMessageLevel || "info"; var oWorkflow = (typeof workflow == "undefined") ? false:workflow; var sDebugLevel = gs.getProperty("STP.WFDebug") || "info"; if (oWorkflow){ switch (sDebugLevel){ case "debug": if (sDebugLevel == sMessageLevel) oWorkflow.scratchpad.aLog.push (sMessage); case "info": if (sDebugLevel == sMessageLevel) oWorkflow.scratchpad.aLog.push (sMessage); case "none":break; } } };










workflow - run script:



run script 2:




Comments

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

Running transform maps asynchronously