for (Element taskListenerElement : taskListenerElements) {
String eventName = taskListenerElement.attribute("event");
if (eventName != null) {
if (TaskListener.EVENTNAME_CREATE.equals(eventName) || TaskListener.EVENTNAME_ASSIGNMENT.equals(eventName)
|| TaskListener.EVENTNAME_COMPLETE.equals(eventName) || TaskListener.EVENTNAME_DELETE.equals(eventName)) {
TaskListener taskListener = parseTaskListener(taskListenerElement);
taskDefinition.addTaskListener(eventName, taskListener);
} else {
addError("Attribute 'event' must be one of {create|assignment|complete|delete}", userTaskElement);
}
} else {