code: protected List<String> getRecipients(String outcome) throws ObserverException {
          if ("Assigned".equals(outcome)) {
              // send e-mail only to assignee
              return Arrays.asList(new String[]{context.getAssignee().getEmail()});
          }
          else {
              try {
                  ContextEmailRecipients contextRecipients = new ContextEmailRecipients(context);
                  String groups = context.getAttribute(TaskAttributeConstant.NOTICE_GROUPS);
                  if (groups != null && !groups.isEmpty() && !groups.equals("[]")) {
                      return contextRecipients.getRecipients(TaskAttributeConstant.NOTICE_GROUPS,
                          TaskAttributeConstant.RECIPIENT_EMAILS);
                  }
                  else {
                      List<String> emails = contextRecipients.getGroupEmails(context.getTaskInstance().getWorkgroups());
                      for (String email : contextRecipients.getRecipients(null, TaskAttributeConstant.RECIPIENT_EMAILS)) {
                          if (!emails.contains(email))
                              emails.add(email);
                      }
                      return emails;
                  }
              }
              catch (DataAccessException | ParseException ex) {
                  throw new ObserverException(ex.getMessage(), ex);
              }
          }
      }
docs: Default implementation: If outcome is "Assigned", send only to assignee's email.
  Otherwise, if Notice Groups attribute is present, the groups so specified
  are unioned with any recipients resulting from evaluation of the Recipients Expression attribute.
  If no Notice Groups are specified, any workgroups associated with the task are added to the
  Recipients Expression outcome.