code: public static void fetchAttributes(RequestAdapter requestAdapter, ProcessResult processResult) {
          if (processResult != null) {
              for (ContentResult contentResult : processResult) {
                  for (ActionResult actionResult : contentResult) {
                      Object actionResultValue = actionResult.getResultValue();
                      if (actionResultValue instanceof ProcessResult) {
                          fetchAttributes(requestAdapter, (ProcessResult)actionResultValue);
                      } else {
                          String actionId = actionResult.getActionId();
                          if (actionId != null) {
                              requestAdapter.setAttribute(actionId, actionResultValue);
                          }
                      }
                  }
              }
          }
      }
docs: Stores an attribute in request.
  
  @param requestAdapter the request adapter
  @param processResult the process result