I have been trying to complete the rule which adds the manager of a
certifications manager to the reminder notification.

After looking @ the Rules document, it appears that the documentation
has that very code detailed:

Example
This example EmailRecipient rule returns the name of the item owners
manager as the email recipient.

return item.getOwner().getManager().getName();


When I create the rule:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "netiq.dtd" "netiq.dtd">
<Rule created="1377533898065" id="8a788c9b40a8376f0140bb6b2d5108ff"
language="beanshell" modified="1378336388864" name="Managers Manager
Notification" type="EmailRecipient">
<Description>This rule is used to select an identity or a list of
identities who will receive email.</Description>
<Signature returnType="String or List of Strings">
<Inputs>
<Argument name="log">
<Description>
The log object associated with the SailPointContext.
</Description>
</Argument>
<Argument name="context">
<Description>
A sailpoint.api.SailPointContext object that can be used to
query the database if necessary.
</Description>
</Argument>
<Argument name="item">
<Description>
The sailpoint.object.Notifiable Interface for objects that can
be reminded, escalated, and expired.
</Description>
</Argument>
</Inputs>
<Returns>
<Argument name="identity name or names">
<Description>
You can return an identity name or a list of identity names.
</Description>
</Argument>
</Returns>
</Signature>
<Source>
import sailpoint.object.Identity;
return item.getOwner().getManager().getName();
</Source>
</Rule>


When I run this rule, it produces the following trace:

2013-09-04 16:34:17,165 ERROR QuartzScheduler_Worker-4
org.apache.bsf.BSFManager:451 - Exception:
java.security.PrivilegedActionException: org.apache.bsf.BSFException:
The application script threw an exception:
java.lang.NullPointerException: Attempt to invoke me
thod getName on null value BSF info: Managers Manager Notification at
line: 0 column: columnNo
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.eval(BSFManager.java:442 )
at sailpoint.server.BSFRuleRunner.eval(BSFRuleRunner. java:199)
at
sailpoint.server.BSFRuleRunner.runRule(BSFRuleRunn er.java:159)
at
sailpoint.server.InternalContext.runRule(InternalC ontext.java:1145)
at
sailpoint.server.InternalContext.runRule(InternalC ontext.java:1117)
at
sailpoint.api.Escalator.getRecipientsFromRule(Esca lator.java:929)
at
sailpoint.api.Escalator.getEmailAddressesFromRule( Escalator.java:894)
at sailpoint.api.Escalator.setCc(Escalator.java:877)
at
sailpoint.api.Escalator.getEmailTemplateWithCC(Esc alator.java:862)
at sailpoint.api.Escalator.handleReminder(Escalator.j ava:973)
at
sailpoint.api.Escalator.handleNotification(Escalat or.java:559)
at
sailpoint.task.WorkItemExpirationScanner.processIt ems(WorkItemExpirationScanner.java:168)
at
sailpoint.task.WorkItemExpirationScanner.processIt ems(WorkItemExpirationScanner.java:124)
at
sailpoint.task.WorkItemExpirationScanner.execute(W orkItemExpirationScanner.java:95)
at sailpoint.api.TaskManager.runSync(TaskManager.java :680)
at sailpoint.scheduler.JobAdapter.execute(JobAdapter. java:116)
at org.quartz.core.JobRunShell.run(JobRunShell.java:2 02)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:529)
Caused by: org.apache.bsf.BSFException: The application script threw an
exception: java.lang.NullPointerException: Attempt to invoke method
getName on null value BSF
info: Managers Manager Notification at line: 0 column: columnNo
at bsh.util.BeanShellBSFEngine.eval(Unknown Source)
at org.apache.bsf.BSFManager$5.run(BSFManager.java:44 5)
.... 19 more
2013-09-04 16:34:17,167 ERROR QuartzScheduler_Worker-4
sailpoint.task.WorkItemExpirationScanner:101 - The work item manager
failed to execute. Reason: The applicatio
n script threw an exception: java.lang.NullPointerException: Attempt to
invoke method getName on null value BSF info: Managers Manager
Notification at line: 0 column
: columnNo
sailpoint.tools.GeneralException: The application script threw an
exception: java.lang.NullPointerException: Attempt to invoke method
getName on null value BSF info:
Managers Manager Notification at line: 0 column: columnNo
at
sailpoint.server.BSFRuleRunner.runRule(BSFRuleRunn er.java:162)
at
sailpoint.server.InternalContext.runRule(InternalC ontext.java:1145)
at
sailpoint.server.InternalContext.runRule(InternalC ontext.java:1117)
at
sailpoint.api.Escalator.getRecipientsFromRule(Esca lator.java:929)
at
sailpoint.api.Escalator.getEmailAddressesFromRule( Escalator.java:894)
at sailpoint.api.Escalator.setCc(Escalator.java:877)
at
sailpoint.api.Escalator.getEmailTemplateWithCC(Esc alator.java:862)
at sailpoint.api.Escalator.handleReminder(Escalator.j ava:973)
at
sailpoint.api.Escalator.handleNotification(Escalat or.java:559)
at
sailpoint.task.WorkItemExpirationScanner.processIt ems(WorkItemExpirationScanner.java:168)
at
sailpoint.task.WorkItemExpirationScanner.processIt ems(WorkItemExpirationScanner.java:124)
at
sailpoint.task.WorkItemExpirationScanner.execute(W orkItemExpirationScanner.java:95)
at sailpoint.api.TaskManager.runSync(TaskManager.java :680)
at sailpoint.scheduler.JobAdapter.execute(JobAdapter. java:116)
at org.quartz.core.JobRunShell.run(JobRunShell.java:2 02)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:529)
Caused by: org.apache.bsf.BSFException: The application script threw an
exception: java.lang.NullPointerException: Attempt to invoke method
getName on null value BSF
info: Managers Manager Notification at line: 0 column: columnNo
at bsh.util.BeanShellBSFEngine.eval(Unknown Source)
at org.apache.bsf.BSFManager$5.run(BSFManager.java:44 5)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.eval(BSFManager.java:442 )
at sailpoint.server.BSFRuleRunner.eval(BSFRuleRunner. java:199)
at
sailpoint.server.BSFRuleRunner.runRule(BSFRuleRunn er.java:159)

Is there anyone familiar with rules and can suggest a solution?

AGS 6.1p7 r45646

Thanks,

Kevin


--
kjkrause40
------------------------------------------------------------------------
kjkrause40's Profile: https://forums.netiq.com/member.php?userid=3384
View this thread: https://forums.netiq.com/showthread.php?t=48569