/**
   * Execute action's workflow.
   *
   * @throws org.areasy.runtime.engine.base.AREasyException if any global error occurs. All errors
   *     comming from action's execution will become output items
   */
  public void run() throws AREasyException {
    // execute the requested action for each user
    for (int i = 0; i < getUsers().size(); i++) {
      String username = (String) getUsers().get(i);

      try {
        People person = new People();
        person.setLoginId(username);
        person.read(getServerConnection());

        if (person.exists()) {
          // check people unrestricted access flag.
          if (person.getAttributeValue(1000003975) != null) {
            person.setNullAttribute(1000003975);
            person.setIgnoreNullValues(false);

            person.update(getServerConnection());
            RuntimeLogger.info("Unrestricted access flag was removed for user '" + username + "'");
          }
        } else RuntimeLogger.error("People account wasn't found: " + person);
      } catch (Throwable th) {
        RuntimeLogger.error(
            "Error removing unrestricted access for user '" + username + "': " + th.getMessage());
        getLogger().debug("Exception", th);
      }

      // check interruption and and exit if the execution was really interrupted
      if (isInterrupted()) {
        RuntimeLogger.warn("Execution interrupted by user");
        return;
      }
    }
  }