code: @Override
      @SuppressWarnings("unchecked")
      public <T> Future<T> submit(Callable<T> task) {
          Map<String, String> execProps = getExecutionProperties(task);
  
          ThreadContextDescriptor contextDescriptor;
          if (task instanceof ContextualAction) {
              ContextualAction<Callable<T>> a = (ContextualAction<Callable<T>>) task;
              contextDescriptor = a.getContextDescriptor();
              task = a.getAction();
          } else {
              WSContextService contextSvc = getContextService();
              contextDescriptor = contextSvc.captureThreadContext(execProps);
          }
  
          TaskLifeCycleCallback callback = new TaskLifeCycleCallback(this, contextDescriptor);
          return callback.policyExecutor.submit(task, callback);
      }
docs: {@inheritDoc}