code: protected Map<String, Object> getGlobalVariables(KnowledgeRuntimeEngine runtimeEngine) {
          Map<String, Object> globalVariables = new HashMap<String, Object>();
          if (runtimeEngine != null) {
              Globals globals = runtimeEngine.getSessionGlobals();
              if (globals != null) {
                  for (String key : globals.getGlobalKeys()) {
                      Object value = globals.get(key);
                      globalVariables.put(key, value);
                  }
              }
          }
          return globalVariables;
      }
docs: Gets the global variables from the knowledge runtime engine.
  
  @param runtimeEngine the knowledge runtime engine
  @return the global variables