In the Activiti process engine, the listener is very important.
There are two types of activiti monitoring, one is the task listener and the other is the execution listener.
Task listener: Automatically gets the manager of the department where the "leave" is located when the manager takes a leave task.
Execute listener: Automatically modifies the status of leave slip as approved after the task finishes.
Let me implement the listener specifically.
The first is the task listener.
1. Creating a class to act as a listener requires implementing the Tasklintener interface.
2. In the implemented interface method, complete the logic.
3. Configure the listener in the process.
The following is the configuration
Here's another listener:
Execute listener
The steps to implement the listener are similar to the task listener, but the interface that the execution listener implements is Executionlintener
Then in the configuration.
And then it's configured
This is the use of listeners in the process engine. Hope to learn Activiti friends have help ...