deleteCandidateGroup/deleteCandidateUser not working

As part of Candidate update, I am using deleteCandidateGroup/deleteCandidateUser to remove group/user but its not reflecting. Records not getting removed.
Code Sample:
ProcessEngine engine = getProcessEngine();
org.camunda.bpm.engine.TaskService taskService = engine.getTaskService();
taskService.deleteCandidateUser(taskId, userID);


protected ProcessEngine getProcessEngine() {
try {
if ( _processEngine != null ) return _processEngine;
return EngineBootstrapUtil.getOrCreateServiceInstanceProcessEngine();
} catch (Exception e)
{
throw new InvalidRequestException(Response.Status.BAD_REQUEST, “No process engine available”);
}
}

Can anyone please on this.