O'Reilly logo

Alfresco One 5.x Developer's Guide - second edition by Jeff Potts, Benjamin Chevallereau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Logic to Workflows with Listeners and Process Variables

So far you've seen that a process can be modeled as a collection of nodes connected via paths or transitions. A common requirement is to be able to execute some code or business logic at certain points within the process. For example, maybe you want to send an e-mail or want to increment a counter that keeps track of how many times a node has been executed. We already used the concept of service tasks to execute some codes, but now we are going to use event listeners.

An event mechanism has been introduced in Activiti to get notified when various events occur within the engine. In our use case, we are going to focus on the Task Listener. A task listener is used to execute custom Java ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required