Why I am getting this error with the following code
Exception running rule: BeanShell script error: bsh.EvalError: Sourced file: inline evaluation of: import sailpoint.object.*; import sailpoint.object.Attributes; import sailpo . . . '' : Error in method invocation: Method getApplication(java.lang.String) not found in class'sailpoint.object.Identity' : at Line: 53 : in file: inline evaluation of:
import sailpoint.object.*; import sailpoint.object.Attributes; import sailpo . . . ‘’ :
QueryOptions qo = new QueryOptions();
// Adding filters to the QueryOptions
qo.addFilter(Filter.and(
Filter.eq("links.application.name", "Active Directory"),
Filter.eq("links.disabledAccount", "false")
));
qo.addFilter(Filter.eq("orgStatus", "Hired"));
List userList = new ArrayList();
// Searching for identities based on the query options
Iterator it = context.search(Identity.class, qo);
while (it.hasNext()) {
Identity identity = it.next();
// Check if the identity does not have the "HR" application
if (identity.getApplication("HR") == null) {
userList.add(identity.getAttribute("staffId"));
}
}
// Returning the list of user staff IDs
return userList;
Thank you