task 1710 - refactoring in task_request_context.