AnsweredAssumed Answered

deleteIdentityLink does not delete the IdentityLink

Question asked by reggieoki on Jul 6, 2011
Latest reply on Jul 7, 2011 by jbarrez
The TaskEnity method "deleteIdentityLiink" does not remove existing IdentityLinks.

I want to clear out any existing IdentityLink then add my Candidate Groups.  But when I use the "deleteIdentityLink" method to clear out all IdentityLink, then retrieving the list of Candidates, they are still there.

The ACT_RU_IDENTITYLINK table indicates that the specified IdentityLinks were not removed.

Below is a snippet of code.  Any suggestions?

    java.util.Set<IdentityLink> Candidates = task.getCandidates();

    for (IdentityLink temp: Candidates) {
      task.deleteIdentityLink(temp.getUserId(), temp.getGroupId(), temp.getType());
    }

    Candidates = task.getCandidates();

    task.addCandidateGroup("testGroup1");
    task.addCandidateGroup("testGroup2");

    Candidates = task.getCandidates();

Outcomes