private static void fetchAttributeValueFromExternalGroovyScript(final String attributeName,
                                                                    final Map<String, List<Object>> resolvedAttributes,
                                                                    final Map<String, List<Object>> attributesToRelease,
                                                                    final String file) {

        ApplicationContextProvider.getScriptResourceCacheManager().ifPresentOrElse(
            cacheMgr -> {
                val script = cacheMgr.resolveScriptableResource(file, attributeName, file);
                if (script != null) {
                    fetchAttributeValueFromScript(script, attributeName, resolvedAttributes, attributesToRelease);
                }
            },
            () -> {
                throw new RuntimeException("No groovy script cache manager is available to execute attribute mappings");
            });
    }
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