code: @SuppressWarnings("unchecked")
      void initThreadContext(WSContextService contextSvc, Map<String, String> execProps) {
          threadContext = contextSvc.captureThreadContext(execProps);
      }
docs: Capture thread context.
  
  @param contextSvc thread context service.
  @param execProps execution properties for the persistent task.