Custom Workflow NPE issue

HI Sailors,

I have created a custom workflow and calling a method which I placed in rule library at one step in workflow, but when the the flow reaches to that particular step the workflow is getting terminated with below exception.

An unexpected error occurred: sailpoint.tools.GeneralException: The application script threw an exception: java.lang.NullPointerException BSF info: script at line: 0 column: columnNo

try {
logger.debug(“1”);
refershRoles(context, identity);//method
logger.debug(“2”);
workflow.get(“result”).put(“refresh status”, “Success”);
logger.debug(“3”);
}
catch (Throwable t) {
workflow.get(“result”).put(“refresh status”, “Failed”);
}
stepResults(context,workflow);

Loggers
1
2
3
Error

stepResults(SailpointContext context,Workflow workflow)
{
Logger.debug(“Entering”);
/my logic/
Logger.debug(“Exiting”);
}

I have kept some loggers in method before executing the code even those are not getting printed in my log file.
can you please provide your inputs to overcome this issue.

Thanks,
Saikiran D

Is “Logger” variable in stepResults initialized? Check by adding:

stepResults(SailpointContext context,Workflow workflow)
{
  if (Logger == null) log.error("Logger is null?");
  Logger.debug(“Entering”);

Hi @christian.cairney,

I have initiated the logger.
This is my actual method.
void stepResults(SailPointContext context, Workflow workflow) throws GeneralException {
log.debug(“Entering”);
/ my logic /
log.debug(“Exiting”);
}