code: public boolean isAuthorized(String subject, String activity) throws CompatibilityException {
                  if (!subjects.contains(subject)) {
                          throw new CompatibilityException("Unknown subject: " + subject);
                  }
                  validateActivity(activity);
                  boolean authorizedForActivity = acModel.isAuthorizedForTransaction(subject, activity);
                  if (!authorizedForActivity) {
                          return false;
                  }
                  if (hasDataUsage(activity)) {
                          for (String attribute : activityDataUsage.get(activity).keySet()) {
                                  for (DataUsage usageMode : activityDataUsage.get(activity).get(attribute)) {
                                          if (!acModel.isAuthorizedForObject(subject, attribute, usageMode)) {
                                                  return false;
                                          }
                                  }
                          }
                  }
                  return true;
          }
docs: Checks if the given subject is authorized to execute the given
  activity.<br>
  A subject is authorized for execution, if it is authorized to execute
  the activity itself,<br>
  plus has permission to access all attributes the activity uses in the
  same modes.<br>
  This method delegates the call to the access control model.
  
  @param subject The subject in question.
  @param activity The name of a process activity.
  @return <code>true</code> if the given subject is authorized to
  execute the given activity;<br>
  <code>false</code> otherwise.
  @throws ParameterException
  @throws CompatibilityException