TaskService taskService = engine.getTaskService();
identityLink.validate();
if (identityLink.getUserId() != null) {
taskService.deleteUserIdentityLink(taskId, identityLink.getUserId(), identityLink.getType());
} else if (identityLink.getGroupId() != null) {
taskService.deleteGroupIdentityLink(taskId, identityLink.getGroupId(), identityLink.getType());
}
}