# Actor

**URL:** <https://community.ofelia.com/t/actor/4330>\
**Category:** Q&A\
**Created:** [3 April 2014 21:41 UTC](https://community.ofelia.com/t/actor/4330 "2014-04-03T21:41:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrandres1995](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@mrandres1995](https://community.ofelia.com/u/mrandres1995)\
**Post date:** [3 April 2014 21:41 UTC](https://community.ofelia.com/t/actor/4330/1 "2014-04-03T21:41:15Z")

</div>

how do I assign a task to a specific user, and that at the end, it is assigned to another user in particular.

---

<div class="post-metadata">

**Author:** ![Dibyajit.Roy](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@Dibyajit.Roy](https://community.ofelia.com/u/Dibyajit.Roy)\
**Post date:** [9 February 2017 09:42 UTC](https://community.ofelia.com/t/actor/4330/2 "2017-02-09T09:42:54Z")

</div>

Hi

I did a similar Scenario in my Process .

In a particular task, the User was asked to choose a name from a list.  
Upon selecting the Particular person , the task would be Allocated to him Only.

You could Return the Name of the Person to whom you want to Assign the task to.

Save the Value inside a Variable ( Process Variable)  
Then Assign the next task to that person .  
I achieved this by Using a Actor Filter.

Here demandHeads is a Process variable where the name of the Person to whom the task should be assigned is saved .

import org.bonitasoft.engine.api.IdentityAPI;  
import org.bonitasoft.engine.identity.User;

IdentityAPI identity = apiAccessor.getIdentityAPI();  
User user = identity.getUserByUserName(demandHeads);

return user.getId();

Hope this helps

---

<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:** [4 April 2014 15:14 UTC](https://community.ofelia.com/t/actor/4330/3 "2014-04-04T15:14:05Z")

</div>

Hello,  
Can you explain and give more details please? What do you mean by “at the end”: automatic reassignation,…?  
Thanks,

---

<div class="post-metadata">

**Author:** ![mrandres1995](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@mrandres1995](https://community.ofelia.com/u/mrandres1995)\
**Post date:** [4 April 2014 16:06 UTC](https://community.ofelia.com/t/actor/4330/4 "2014-04-04T16:06:16Z")

</div>

Yes, I want is to assign an activity to a user when the user finishes the task, another task is assigned to another user
