src/main/java/me/paulbares/camunda/ApprovalWorkflowTaskListener.java
public static Set<String>[] extractCandidates(Collection<IdentityLink> candidates) {
    Set[] r = new Set[]{new HashSet<>(), new HashSet<>()};
    for (IdentityLink candidate : candidates) {
      String userId = candidate.getUserId();
      if (userId != null) {
        r[0].add(userId);
      }
      String groupId = candidate.getGroupId();
      if (groupId != null) {
        r[1].add(groupId);
      }
    }
    return r;
  }
/**
   * Extracts the list of candidates from the input collection of {@link IdentityLink}. They can be users or groups or
   * both. The result array is of size 2. The set at index 0 contains the set of users, the set at index 1 the set of
   * groups.
   *
   * @param candidates the candidates
   * @return the set of users and groups that can complete the task
   */
Extracts the list of candidates from the input collection of  IdentityLink. They can be users or groups or
both. The result array is of size 2. The set at index 0 contains the set of users, the set at index 1 the set of
groups.

@param candidates the candidates
@return the set of users and groups that can complete the task
Extracts the list of candidates from the input collection of IdentityLink . They can be users or groups or both . The result array is of size 2 . The set at index 0 contains the set of users the set at index 1 the set of groups . @param candidates the candidates @return the set of users and groups that can complete the task
public static Set<String>[] extractCandidates(Collection<IdentityLink> candidates) {
    Set[] r = new Set[]{new HashSet<>(), new HashSet<>()};
    for (IdentityLink candidate : candidates) {
      String userId = candidate.getUserId();
      if (userId != null) {
        r[0].add(userId);
      }
      String groupId = candidate.getGroupId();
      if (groupId != null) {
        r[1].add(groupId);
      }
    }
    return r;
  }
public static Set < String > [ ] extractCandidates ( Collection < IdentityLink > candidates ) { Set [ ] r = new Set [ ] { new HashSet < > ( ) , new HashSet < > ( ) } ; for ( IdentityLink candidate : candidates ) { String userId = candidate . getUserId ( ) ; if ( userId != null ) { r [ 0 ] . add ( userId ) ; } String groupId = candidate . getGroupId ( ) ; if ( groupId != null ) { r [ 1 ] . add ( groupId ) ; } } return r ; }
Extracts the list of candidates from the input collection of {@link IdentityLink}.
Extracts the list of candidates from the input collection of { @link IdentityLink } .