docs: @Override
      public Object evaluate(TaskRequest req, TaskResponse res) {
  
          String rslt = null;
  
          Element e = (Element) element.evaluate(req, res);
          if (e.getName().equals("group")) {
              // This is a group name, we need to look up the key...
              try {
  
                  Class[] types = new Class[] {IPerson.class, IPortletDefinition.class};
  
                  for (Class c : types) {
                      EntityIdentifier[] eis =
                              GroupService.searchForGroups(
                                      e.getText(), IGroupConstants.SearchMethod.DISCRETE, c);
                      switch (eis.length) {
                          case 1:
                              // This is good -- what we hope for...
                              rslt = GroupService.findGroup(eis[0].getKey()).getKey();
                              break;
                          case 0:
                              // This is ok -- try the next type...
                              continue;
                          default:
                              String msg2 = "Ambiguous group name:  " + e.getText();
                              throw new RuntimeException(msg2);
                      }
                  }
  
                  // We better have a match by now...
                  if (rslt == null) {
                      String msg = "No group with the specified name was found:  " + e.getText();
                      throw new RuntimeException(msg);
                  }
  
              } catch (Throwable t) {
                  String msg = "Error looking up the specified group:  " + e.getText();
                  throw new RuntimeException(msg, t);
              }
          } else if (e.getName().equals("literal")) {
              rslt = e.getText();
          } else {
              String msg = "Unsupported element type:  " + e.getName();
              throw new RuntimeException(msg);
          }
  
          return rslt;
      }