Hot to get the assigned task roles

Hi Friends,

I have requirement like need to get assigned user roles(In Assignments) of the task before queue the task .I have only task type id.Please help in this.

Thanks in advance.
Bala