# get the lane actor in groovy

**URL:** <https://community.ofelia.com/t/get-the-lane-actor-in-groovy/4446>\
**Category:** Q&A\
**Created:** [27 March 2014 15:37 UTC](https://community.ofelia.com/t/get-the-lane-actor-in-groovy/4446 "2014-03-27T15:37:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul33](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@paul33](https://community.ofelia.com/u/paul33)\
**Post date:** [27 March 2014 15:37 UTC](https://community.ofelia.com/t/get-the-lane-actor-in-groovy/4446/1 "2014-03-27T15:37:30Z")

</div>

Hi,

I'm using bonita 6.0.4.

I'd like to send an email to the lane actor in my project but I don't find the way...

I've managed ton send the email to the initiator doing :

return BonitaUsers.getUserProfessionalContactInfo(apiAccessor,BonitaUsers.getProcessInstanceInitiator(apiAccessor,processInstanceId).getId()).getEmail();

But I can't get the others actors ...

Does someone has a clue ?

Thanks for any help.

&nbsp;

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [31 March 2014 08:56 UTC](https://community.ofelia.com/t/get-the-lane-actor-in-groovy/4446/2 "2014-03-31T08:56:55Z")

</div>

Hi

The actors configured on the lane is tied to the processDefinition, not the processInstance, which stores the user after execution of the task.

I believe you would need to use [processAPI.getActors]([http://documentation.bonitasoft.com/javadoc/api/6.2/org/bonitasoft/engine/api/ProcessManagementAPI.html#getActors](http://documentation.bonitasoft.com/javadoc/api/6.2/org/bonitasoft/engine/api/ProcessManagementAPI.html#getActors)(long, int, int, org.bonitasoft.engine.bpm.actor.ActorCriterion)) and [getActorMembers]([http://documentation.bonitasoft.com/javadoc/api/6.2/org/bonitasoft/engine/api/ProcessManagementAPI.html#getActorMembers](http://documentation.bonitasoft.com/javadoc/api/6.2/org/bonitasoft/engine/api/ProcessManagementAPI.html#getActorMembers)(long, int, int)) or something similar.

Then you will get the contact information with the method you have refered previously …

---

<div class="post-metadata">

**Author:** ![paul33](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@paul33](https://community.ofelia.com/u/paul33)\
**Post date:** [28 April 2014 16:03 UTC](https://community.ofelia.com/t/get-the-lane-actor-in-groovy/4446/3 "2014-04-28T16:03:51Z")

</div>

Hi,  
for those who are interested, I found the answer there : [http://community.ofelia.com/answers/how-send-emails-users-specific-roles](http://community.ofelia.com/answers/how-send-emails-users-specific-roles)  
Regards

---

<div class="post-metadata">

**Author:** ![paul33](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@paul33](https://community.ofelia.com/u/paul33)\
**Post date:** [2 April 2014 14:45 UTC](https://community.ofelia.com/t/get-the-lane-actor-in-groovy/4446/4 "2014-04-02T14:45:39Z")

</div>

Thanks for your answer !

I’m pretty new to bonita … So I haven’t managed to make it work so far. I’ve tried it in many ways but without success.  
Do you have an example of the use of these methods ?
