WF-1703: Modified the code for task completion to add user and to remove roles.