# Execution variable in end listener

**URL:** <https://forum.camunda.io/t/execution-variable-in-end-listener/1195>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [July 26, 2016, 6:22am UTC](https://forum.camunda.io/t/execution-variable-in-end-listener/1195 "2016-07-26T06:22:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![hassang](https://forum.camunda.io/user_avatar/forum.camunda.io/hassang/32/16498_2.png) [@hassang](https://forum.camunda.io/u/hassang)\
**Post date:** [July 27, 2016, 11:53am UTC](https://forum.camunda.io/t/execution-variable-in-end-listener/1195/4 "2016-07-27T11:53:26Z")

</div>

Hi Zoltán,

Trying to get the value of the variable at an “end” execution listener of a service task wouldn’t work as the transaction is not yet committed to the database

Please see below post

> [@Process variable history](https://forum.camunda.io/t/process-variable-history/1021/6):
>
> Hi Otto, If you invoke your code shown above in the same transaction as the user task, it is not able to retrieve the data of the usertask, because the transaction is not yet committed to the database. You could mark the servicetask using your code as ‘async:before=true’. This would flush the transaction regarding the usertask to the database and you should be able to get the data then. Cheers, Christian

and below link

> **[Advanced Asynchronous Continuations in camunda BPM](https://camunda.com/blog/2014/07/advanced-asynchronous-continuations/)**
>
> Est. reading time: 3 minutes

---

_[View the full topic](https://forum.camunda.io/t/execution-variable-in-end-listener/1195)._
