The AttributeContext, which contains the results of the attribute resolution, cannot be and is not populated into the context tree until attribute resolution has completed. This means that ActivationConditions for DataConnectors or AttributeDefinitions cannot depend on the AttributeContext's contents.

To work around this, the resolver can be instructed to resolve a limited set of attributes (and their dependencies) and place the results into an "intermediate" AttributeContext which is stored under the resolution context.  A SimpleAttributePredicate (or any other suitable condition object), customized to locate this intermediate AttributeContext, can then be used as an activation condition. A predefined bean named shibboleth.ChildLookup.PreRequestedAttributeContext is provided for this purpose.

You should bear the following in mind:

Example

Predicate for PreRequested Attributes
<bean id="MyCondition" class="net.shibboleth.idp.profile.logic.SimpleAttributePredicate"
	p:attributeContextLookupStrategy-ref="shibboleth.ChildLookup.PreRequestedAttributeContext">
  <property name="attributeValueMap">
    <!-- Usual configuration elided -->
  </property>
</bean>
Defining a preRequested Attibute
<AttributeDefinition xsi:type="Simple" id="preRequested" preRequested="true" dependencyOnly="true">
    <InputDataConnector ref="MyDataConnextor" attributeNames="PreRequest"/>
</AttributeDefinition>