IIQ Pitfall: Managed Attribute Uniqueness

This example shows that there are cases where two ManagedAttributes in the same application may have the same type and value.

A common mistake I’ve seen made by developers I work with is to look up ManagedAttribute objects by application and value, without also specifying the account schema attribute name. While this will often work, it is not strictly correct. For what I choose to refer to as “entitlement-like” ManagedAttributes, the application, account schema attribute name, and the value are required to find the correct ManagedAttribute object.

The attached XML contains an Application, PreIterate Rule, CorrelationConfig, TaskDefinition, and Rule. Running the aggregation task will result in the creation of two ManagedAttributes that differ only by attribute name. The Rule can then be run from the debug page to see how a search by application, type, and value can produce incorrect results while a search by application, attribute name, and value produces the correct result.

Note: Much of the content of this post is copied from a question I asked here: How do I uniquely identify a ManagedAttribute (not by id)?

ManagedAttributeTest.xml (9.1 KB)

3 Likes