Advanced Policy Violation Rule

I understand that, the issue I’m facing is, if a Role is having “Classifications” attribute value when I request that particular role, it is not appearing in “reqIdRoles” list and it is directly appearing in Access Request.

Example:

Role1: with attributes name: test, Classifications: [c1,c2], Owner: ownerName, Type: IT, Description: test decription etc..

Role2: with attributes name: test, Owner: ownerName, Type: IT, Description: test decription etc.. (Classifications attribute left blank).

Now, I request Role1 and Role2 thenreqIdRoles.size() should be [2+asigned roles count], but I’m getting only [Role2+asigned roles] in reqIdRoles

List reqIdRoles = reqIdentity.getAssignedRoles();

Got a curious question - What will happen if we create ‘Advanced’ policy but do not create/output a PolicyValidation object (or) send a null one?

Will it work?