Project address: activiti-workflow
The process itself is to simplify some human operations. Activiti provides good support for the process, as well as the Activiti-explorer online design process.
Activiti-explorer can directly download the WAR package for deployment. After the deployment is completed, create a new test model, as shown in the figure for a process information
- Process identifier: Process ID, start a process based on this ID
The picture below is the link information
- ID: link ID
- Task listeners: link monitoring events
Click the + sign to add a new event
Event: create (new), assignment (distribution), complete (complete), delete (delete).
Some business processing can be done after the link is generated or approved.
Class: The full path of the class, which implements TaskListener .
@Service()
public class MyTaskListener implements TaskListener {
@Override
public void notify(DelegateTask delegateTask) {
String eventName = delegateTask.getEventName();
if ("create".endsWith(eventName)) {
System.out.println("create=========");
}else if ("assignment".endsWith(eventName)) {
System.out.println("assignment========"+delegateTask.getAssignee());
}else if ("complete".endsWith(eventName)) {
System.out.println("complete===========");
}else if ("delete".endsWith(eventName)) {
System.out.println("delete=============");
}
}
}