return null;
return executionContext.get().variables;
}
+
+ public void addVariables(Map<? extends String, ? extends Object> variablesToAdd) {
+ variables.putAll(variablesToAdd);
+ }
public static ExecutionContext getCurrent() {
return executionContext.get();
+ " already registered.");
executionContext.set(context);
}
+
+ /**
+ * Unregisters the ExecutionContext for the current Thread
+ * @throws a SlcException if no ExecutionContext was registered for the Thread
+ * @return the unregistered ExecutionContext
+ */
+ public static ExecutionContext unregisterExecutionContext() {
+ ExecutionContext current = executionContext.get();
+ if(current == null) {
+ throw new SlcException("No Context registered.");
+ }
+ executionContext.remove();
+ return current;
+ }
public static void enterFlow(ExecutionFlow executionFlow) {
Stack<ExecutionFlowRuntime> stack = executionContext.get().stack;