Share all details about your problem, including any error messages you may have received.
sailpoint.tools.GeneralException: The application script threw an exception: java.lang.ClassCastException: Cannot cast sailpoint.object.ProvisioningPlan$AccountRequest to sailpoint.object.ProvisioningPlan$AccountRequest BSF info: LU Rule SAP Analytics Before Provisioning at line: 0 column: columnNo
I did check the object type and it is ProvisioningPlan.AccountRequest. As I mentioned above this issue is evident with 8.3p5 and we were not facing the issue in 8.3p4 with same code.
I don’t see an issue in your code. However, the BeanShell executor can sometimes behave unpredictably with type declarations. So I would recomment to use List accountRequests = null; instead of List<AccountRequest> accountRequests = null;
I tried the way you mentioned as well before, but even that didn’t work with IIQ 8.3p5. I was able to fix the issue by assigning the list of account requests to Object instead of AccountRequest class in FOR loop.
for (Object obj : accountRequests) {
//DON’T PERFORM AN EXPLICIT CASTING
String nativeIdentity = obj.getNativeIdentity();
}
Without performing an explicit casting I was able to run the rule without any issue. This does not only apply for Account Request object, it applies for all the SailPoint Classes. I observed casting error for Application, Attributes and so on. So, for every Sailpoint object, I did assign it to an generic Object class variable.