diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
index <HASH>..<HASH> 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
@@ -247,11 +247,12 @@ public class GremlinExecutor implements AutoCloseable {
         final Bindings bindings = new SimpleBindings();
         bindings.putAll(globalBindings);
         bindings.putAll(boundVars);
-        lifeCycle.getBeforeEval().orElse(beforeEval).accept(bindings);
 
         final CompletableFuture<Object> evaluationFuture = new CompletableFuture<>();
         final FutureTask<Void> f = new FutureTask<>(() -> {
             try {
+                lifeCycle.getBeforeEval().orElse(beforeEval).accept(bindings);
+
                 logger.debug("Evaluating script - {} - in thread [{}]", script, Thread.currentThread().getName());
 
                 final Object o = scriptEngines.eval(script, bindings, lang);
TINKERPOP3-<I> Move beforeEval to occur in same thread as eval

In this way, beforeEval can working with ThreadLocal settings on the Graph instances (as it may pertain to transactions).