autorun6464
(Anmol Timilsina)
September 29, 2025, 9:17pm
1
After Group aggregation NCD fails with form is null error.How do i find the forms thats are missing ..
java.lang.NullPointerException: Cannot invoke “sailpoint.object.Form.toXml()” because “form” is null
at sailpoint.api.nativeidentitychange.NativeIdentityChangeRolePropagatorCorrelationModel$RoleFilter.hasMatchingForms(NativeIdentityChangeRolePropagatorCorrelationModel.java:93)
at sailpoint.api.nativeidentitychange.NativeIdentityChangeRolePropagatorCorrelationModel$RoleFilter.test(NativeIdentityChangeRolePropagatorCorrelationModel.java:81)
at sailpoint.api.nativeidentitychange.NativeIdentityChangeRolePropagatorCorrelationModel$RoleFilter.test(NativeIdentityChangeRolePropagatorCorrelationModel.java:66)
Hi @autorun6464 ,
Did you create provisioning policy form in Role configuration?
autorun6464
(Anmol Timilsina)
September 30, 2025, 5:27pm
4
should i grab through bundle class???
Class: Role not found in namespace : at Line: 14 : in file: inline evaluation of: ``import sailpoint.object.Application; import sailpoint.object.Role;
Try this instead—no extra imports needed:
List roles = context.getObjects("Role", null);
System.out.println("Roles missing a form:");
for (Object o : roles) {
sailpoint.object.Role r = (sailpoint.object.Role) o;
if (r.getForm() == null) {
System.out.println(" - " + r.getName());
}
}
What it does:
context.getObjects("Role", null) fetches all Role objects.
We cast each to sailpoint.object.Role inline.
Print any with getForm() == null .
No need to import—this runs straight in the IIQ console.
autorun6464
(Anmol Timilsina)
September 30, 2025, 5:42pm
6
nope it still threw error
Code:
import sailpoint.object.Application;
import sailpoint.object.Role;
import sailpoint.object.Link;
import org.apache.log4j.Logger;
import java.util.Iterator;
import java.util.ArrayList;
import sailpoint.api.SailPointContext;
import sailpoint.object.*;
Logger logger = Logger.getLogger(“Rules”);
logger.debug(“Starting Form Check for Application”);
List roles = context.getObjects(“Role”, null);
logger.debug(“Roles missing a Form:”);
for (Object o : roles) {
sailpoint.object.Role r = (sailpoint.object.Role) o;
if (r.getForm() == null) {
logger.debug(" - " + r.getName());
}
}
Error: : Error in method invocation: Method getObjects(java.lang.String, null) not found in class’sailpoint.server.InternalContext’ : at Line: 13 :
Old Code :
import sailpoint.object.Application;
import sailpoint.object.Role;
import sailpoint.object.Link;
import org.apache.log4j.Logger;
import java.util.Iterator;
import java.util.ArrayList;
import sailpoint.api.SailPointContext;
import sailpoint.object.Role;
Logger logger = Logger.getLogger(“Rules”);
logger.debug(“Starting Form Check for Application”);
List roles = context.getObjects(Bundle.class);
logger.debug(“Roles missing a Form:”);
for (Bundle r : roles) {
if (r.getForm() == null) {
logger.debug(" - " + r.getName());
}
}
Error: Method getForm() not found in class’sailpoint.object.Bundle’ : at Line: 18 : in file: inline evaluation of:
can you try this one
import sailpoint.object.Role;
import sailpoint.object.Bundle;
import org.apache.log4j.Logger;
Logger logger = Logger.getLogger("Rules");
logger.debug("Starting Form Check for Roles");
// Correct method - use Role.class, not string
List roles = context.getObjects(Role.class);
logger.debug("Roles missing a Form:");
for (Role r : roles) {
if (r.getForm() == null) {
logger.debug(" - " + r.getName());
}
}
autorun6464
(Anmol Timilsina)
September 30, 2025, 5:56pm
8
yup tried this at first error says Role class not found
Error: Typed variable declaration : Class: Role not found in namespace : at Line: 14 : in file: inline evaluation of: ``
Found the issue. In SailPoint IIQ, Roles are actually Bundle objects , not Role objects.
import sailpoint.object.Bundle;
import org.apache.log4j.Logger;
Logger logger = Logger.getLogger("Rules");
logger.debug("Starting Form Check for Roles");
// Use Bundle.class for roles in IIQ
List bundles = context.getObjects(Bundle.class);
logger.debug("Roles missing a Form:");
for (Bundle bundle : bundles) {
if (bundle.getForm() == null) {
logger.debug(" - " + bundle.getName());
}
}
autorun6464
(Anmol Timilsina)
September 30, 2025, 6:12pm
10
but the issue with bundles class is there is no getForm() method.
Error: Method getForm() not found in class’sailpoint.object.Bundle’ : at Line: 18 : in file: inline evaluation of:
Hi @autorun6464 ,
Use below code, it will works
import sailpoint.object.Bundle;
List bundles = context.getObjects(Bundle.class);
List bundlesList = new ArrayList();
for (Bundle bundle : bundles) {
List forms = bundle.getProvisioningForms();
if (forms != null){
log.warn(" Role name is :" + bundle.getName());
bundlesList.add(bundle.getName());
} else {
log.warn("No form found");
}
}
return bundlesList;
autorun6464
(Anmol Timilsina)
October 1, 2025, 9:07pm
12
it does give me back forms and disable all the roles that contains form for that application but it still giving me form is null error for ncd
system
(system)
Closed
November 30, 2025, 9:08pm
13
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.