# Task Listener and Execution Listener Samples / Examples

**URL:** <https://forum.flowable.org/t/task-listener-and-execution-listener-samples-examples/9529>\
**Category:** Flowable Engine\
**Created:** [July 13, 2022, 11:49am UTC](https://forum.flowable.org/t/task-listener-and-execution-listener-samples-examples/9529 "2022-07-13T11:49:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpmn](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@bpmn](https://forum.flowable.org/u/bpmn)\
**Post date:** [July 13, 2022, 11:49am UTC](https://forum.flowable.org/t/task-listener-and-execution-listener-samples-examples/9529/1 "2022-07-13T11:49:38Z")

</div>

Hello,

I need to implement a TaskListener on _assign_ event for an User Task and an ExecutionListener on the _start_ event. It will be great if someone can point me to some example / sample which I can refer to implement these.

Also, say, if I want to call a REST API or push an event to a Kafka topic when an user task event (assign or create) occurs, is that possible? Do I need to implement my own TaskListener for that as well or is there any other way?

Thanks in advance.

Regards,  
Ben

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [July 20, 2022, 9:04am UTC](https://forum.flowable.org/t/task-listener-and-execution-listener-samples-examples/9529/2 "2022-07-20T09:04:36Z")

</div>

> [@bpmn](#):
>
> It will be great if someone can point me to some example / sample which I can refer to implement these.

For task listeners, the org.flowable.engine.delegate.TaskListener interface needs to be implemented. ExecutionListener for the execution listener. You then reference the class in the BPMN model.

> [@bpmn](#):
>
> Do I need to implement my own TaskListener for that as well or is there any other way?

Yes, indeed. There’s no out of the box task listener for that.
