code: public static <T> T withProcessApplicationContext(Callable<T> callable, String processApplicationName) throws Exception {
      try {
        setCurrentProcessApplication(processApplicationName);
        return callable.call();
      }
      finally {
        clear();
      }
    }
docs: <p>Takes a callable and executes all engine API invocations within that callable in the context
  of the given process application
  
  <p>Equivalent to
  <pre>
  try {
  ProcessApplicationContext.setCurrentProcessApplication("someProcessApplication");
  callable.call();
  } finally {
  ProcessApplicationContext.clear();
  }
  </pre>
  
  @param callable the callable to execute
  @param name the name of the process application to switch into