private static void mapSingleAttributeDefinition(final String attributeName,
                                                     final String mappedAttributeName,
                                                     final List<Object> attributeValue,
                                                     final Map<String, List<Object>> resolvedAttributes,
                                                     final Map<String, List<Object>> attributesToRelease) {
        val scriptFactoryInstance = ExecutableCompiledScriptFactory.findExecutableCompiledScriptFactory();

        if (scriptFactoryInstance.isPresent()) {
            val scriptFactory = scriptFactoryInstance.get();
            
            if (scriptFactory.isInlineScript(mappedAttributeName)) {
                val inlineGroovy = scriptFactory.getInlineScript(mappedAttributeName).orElseThrow();
                fetchAttributeValueAsInlineGroovyScript(attributeName, resolvedAttributes, attributesToRelease, inlineGroovy);
            } else if (scriptFactory.isExternalScript(mappedAttributeName)) {
                val file = scriptFactory.getExternalScript(mappedAttributeName).orElseThrow();
                fetchAttributeValueFromExternalGroovyScript(attributeName, resolvedAttributes, attributesToRelease, file);
            } else {
                mapSimpleSingleAttributeDefinition(attributeName, mappedAttributeName, attributeValue, attributesToRelease);
            }
        }
        mapSimpleSingleAttributeDefinition(attributeName, mappedAttributeName, attributeValue, attributesToRelease);
    }
This is {@link WSFederationClaimsReleasePolicy}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-ws-idp-api/src/main/java/org/apereo/cas/ws/idp/services/WSFederationClaimsReleasePolicy.java