I have a requirement to skip specific attribute requests from provisioning in plan in IIQ.
I know we can remove them from provisioning plan using before provisioning rule but i have a requirement to use them in after Modify Native rule for some validation, but these attributes shouldn’t be provisioned.
The Before Provisioning rule is the only place to stop these attributes from reaching the connector. Before removing them, stash their values on the AccountRequest so they remain available later.
You can use below code to do it, or add in your existing rule
List skipAttrs = Arrays.asList("attr1", "attr2");
if (plan != null && plan.getAccountRequests() != null) {
for (AccountRequest acctReq : plan.getAccountRequests()) {
List attrReqs = acctReq.getAttributeRequests();
if (attrReqs == null) continue;
Map saved = new HashMap();
List toRemove = new ArrayList();
for (AttributeRequest ar : attrReqs) {
if (skipAttrs.contains(ar.getName())) {
saved.put(ar.getName(), ar.getValue());
toRemove.add(ar);
}
}
if (!toRemove.isEmpty()) {
attrReqs.removeAll(toRemove);
Attributes args = acctReq.getArguments();
if (args == null) args = new Attributes();
args.put("skippedAttrs", saved);
acctReq.setArguments(args);
}
}
}
return plan;
Hello Prashanth. Naveen’s approach looks good. Since your After Modify native rule runs through IQService, I would suggest storing the values as individual AccountRequest arguments rather than a nested map. In the BP rule, save the value before removing its AttributeRequest:
These metadata values are available to the scripts but are not provisioned to AD. Just make sure a Modify operation still reaches the connector after removing those AttributeRequests. Otherwise, the After Modify rule may not execute.