Fórum

How to get role and associated members from Workflow object

Raghu k, modificado 10 Anos atrás.

How to get role and associated members from Workflow object

Junior Member Postagens: 58 Data de Entrada: 10/08/12 Postagens Recentes
Hi all,
I am running a scheduler job in which I need to find out all workflow tasks which are not approved and I need to check how long they are pending. if they are pending for 2 days, I need to send a reminder mail to assignee.
My workflow has 2 roles to which a task is assigned. I have written code to get assigned roles. But from this I am not getting 2 roles. So my logic is failing to send mail to both roles instead I it is sending mail to only one role.
Can some one please tell me how can we find all assigned roles of each and every task?