The purpose of a TaskListener is the possibility to execute external Java code when certain events occur during process execution. Therefore TaskListeners can be attached to events within the user task lifecycle, for example the creation or completion of a user task.
As explained in Camunda BPM Connector the TaskanaTaskListener executes custom external java code to persist events in an event store, using the transactional outbox pattern. The events contain all relevant information about the corresponding user task that triggered them.
...