@Override
    public <T> T execute(final Object[] args, final Class<T> clazz, final boolean failOnError) {
        return lock.tryLock(() -> {
            try {
                LOGGER.trace("Beginning to execute script [{}]", this);
                return compiledScript != null
                    ? ScriptingUtils.executeGroovyScript(this.compiledScript, args, clazz, failOnError)
                    : null;
            } finally {
                LOGGER.trace("Completed script execution [{}]", this);
            }
        });
    }
This is {@link WatchableGroovyScriptResource}.

@author Misagh Moayyed
@since 6.0.0
core/cas-server-core-scripting/src/main/java/org/apereo/cas/util/scripting/WatchableGroovyScriptResource.java