UserApp - Workflow - Script error evaluating expression


Hi,

I get this error "Script error evaluating expression" in the log.

How do you get the system to log where in the script the error lies?

Your help would be appreciated.

Thanks,
Bruno

11:30:40,532 INFO [STDOUT] WARN [RBPM]
[com.novell.soa.af.impl.core.WorkflowNotification:evaluateMappings]
Script error evaluating expression [//We don't use the current
LM as this may have changed during the course of the workflow if the
person has no LM assigned
function getNotifyArrayList(){
var manager = IDVault.get(recipient , 'frgoUser',
'frgaReportsToAuthManager');
System.out.println("\n" "Recipient: " recipient "\n"
"Recipient's manager: " manager "\n" "real: " recipient);
var managerDN = IDVault.globalQuery("query_newfrgoUser",
{"firstName":"*" "*", "lastName":"*" "*", "loginDisabled":"FALSE",
"fNumber":manager, "companyCode":"*", "costCentreCode":"*",
"division":"*"});
System.out.println("\n" "manager dn: " managerDN "\n"
"type: " typeof managerDN "\n" "size: " managerDN.size());
if( managerDN.size() > 0 ) {
try {
System.out.println("\n" "Manager Approval
Notification : " "Manager Email: " IDVault.get( managerDN.get(0) ,
'user', 'Email') );
System.out.println("\n" "Manager Approval
Notification : " "Recipient Email: "
IDVault.get(flowdata.get('recipient'), 'user', 'Email') );
return IDVault.get( managerDN.get(0) , 'user',
'Email') "||" IDVault.get(flowdata.get('recipient'), 'user',
'Email');

} catch (e) {
System.out.println("\n Exception " e);
}
} else {
System.out.println("\n" "Manager Approval Notification
: " "Recipient Email: " IDVault.get(flowdata.get('recipient'),
'user', 'Email') );
return IDVault.get(flowdata.get('recipient'), 'user',
'Email');
}
};
getNotifyArrayList();] .
11:30:40,632 INFO [STDOUT] INFO [RBPM]
[com.novell.soa.af.impl.LogEvent:logAFEvent] [Workflow_Forwarded]
Initiated by System, Process ID: 42860f6ed2e14d0bbbe621a369da6488,
Process Name: cn=Approval
Model,cn=RequestDefs,cn=AppConfig,cn=UserApplication,cn=DriverSet1,ou=services,o=frg:261,
Activity: access_approved, Recipient:
cn=062f0bbc-d8fe-435c-8359-b32708ab3ee2,ou=Users,ou=Tanzania,ou=BusinessGroups,o=frg

UserApp - Workflow - Script error evaluating expression


--
bzanin
------------------------------------------------------------------------
bzanin's Profile: https://forums.netiq.com/member.php?userid=9162
View this thread: https://forums.netiq.com/showthread.php?t=53423

  • Often the cause of the problem is shown in the log lines right before
    the messages that you posted.

    You may also want to reduce assumptions in your code - like
    IDVault.get() will always return a valid manager, or
    IDVault.globalQuery() returning a valid result vector.

    Add conditional logic to avoid a call to managerDN.size() where
    managerDN is null.

    Something like

    if (managerDN