# Need to Update Next Task Assignee in current task

**URL:** <https://forum.flowable.org/t/need-to-update-next-task-assignee-in-current-task/1042>\
**Category:** Flowable Engine\
**Created:** [October 9, 2017, 1:23pm UTC](https://forum.flowable.org/t/need-to-update-next-task-assignee-in-current-task/1042 "2017-10-09T13:23:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vzy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/vzy/32/1158_2.png) [@Vzy](https://forum.flowable.org/u/Vzy)\
**Post date:** [October 9, 2017, 1:23pm UTC](https://forum.flowable.org/t/need-to-update-next-task-assignee-in-current-task/1042/1 "2017-10-09T13:23:33Z")

</div>

Hi,  
i am having two tasks (Task1,Task2) and initially Task1 is assigned to User1 and Task2 Assigned to User2.

So, if i am currently in Task1 with User1 and due to some scenarios, i need to change Task2 (initially assigned to User2) to User3 at runtime.

is it possible in flowable and can i have REST api call for this?

Thanks,  
VZY

---

<div class="post-metadata">

**Author:** ![Vzy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/vzy/32/1158_2.png) [@Vzy](https://forum.flowable.org/u/Vzy)\
**Post date:** [October 9, 2017, 1:54pm UTC](https://forum.flowable.org/t/need-to-update-next-task-assignee-in-current-task/1042/2 "2017-10-09T13:54:08Z")

</div>

Is there anybody having idea on this,

---

<div class="post-metadata">

**Author:** ![martin.grofcik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/martin.grofcik/32/71_2.png) [@martin.grofcik](https://forum.flowable.org/u/martin.grofcik)\
**Post date:** [October 10, 2017, 5:32am UTC](https://forum.flowable.org/t/need-to-update-next-task-assignee-in-current-task/1042/3 "2017-10-10T05:32:59Z")

</div>

Hi Vzy,

for http calls you can use [http://www.flowable.org/docs/userguide/index.html#bpmnHttpTask](http://www.flowable.org/docs/userguide/index.html#bpmnHttpTask).

Regards  
Martin

---

<div class="post-metadata">

**Author:** ![Vzy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/vzy/32/1158_2.png) [@Vzy](https://forum.flowable.org/u/Vzy)\
**Post date:** [October 10, 2017, 7:33am UTC](https://forum.flowable.org/t/need-to-update-next-task-assignee-in-current-task/1042/4 "2017-10-10T07:33:27Z")

</div>

Hi Martin,  
Thanks for your reply, here my intention is that, i am always calling Flowable application by REST api calls from Java application,  
as said above, BEFORE calling ‘complete’ action for Task1, how to update user assignee for Task2 by REST api?

Thanks in Advance,  
-Vzy

---

<div class="post-metadata">

**Author:** ![martin.grofcik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/martin.grofcik/32/71_2.png) [@martin.grofcik](https://forum.flowable.org/u/martin.grofcik)\
**Post date:** [October 10, 2017, 7:37am UTC](https://forum.flowable.org/t/need-to-update-next-task-assignee-in-current-task/1042/5 "2017-10-10T07:37:08Z")

</div>

Vzy,

you can specify task assignee for the Task2 on Task1 form (create a form with variable). And use the expression with this variable in the process model Task2.

Regards  
Martin

---

<div class="post-metadata">

**Author:** ![Vzy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/vzy/32/1158_2.png) [@Vzy](https://forum.flowable.org/u/Vzy)\
**Post date:** [October 10, 2017, 7:40am UTC](https://forum.flowable.org/t/need-to-update-next-task-assignee-in-current-task/1042/6 "2017-10-10T07:40:54Z")

</div>

you mean expression ${task2Assignee} right?, but expressions are not working in model screen,  
i think, another way is to pass task2Assignee=“User3” as variable with rest api call on complete Task1 right?  
any config. i need to do for making work expressions in my model?

---

<div class="post-metadata">

**Author:** ![martin.grofcik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/martin.grofcik/32/71_2.png) [@martin.grofcik](https://forum.flowable.org/u/martin.grofcik)\
**Post date:** [October 10, 2017, 7:45am UTC](https://forum.flowable.org/t/need-to-update-next-task-assignee-in-current-task/1042/7 "2017-10-10T07:45:57Z")

</div>

Have a look on the following jUnit test

> <https://github.com/flowable/flowable-engine/blob/ca85b57c9a116a0914882a770b5b678786677016/modules/flowable-engine/src/test/java/org/flowable/engine/test/api/form/FormServiceTest.java#L251>

Change variable address to your variable name used for user task2 assignee.

Martin
