) {
task.setActorIdExpression(assignmentElement.attributeValue("actor-id"));
task.setPooledActorsExpression(assignmentElement.attributeValue("pooled-actors"));
} else {
Delegation assignmentDelegation = readAssignmentDelegation(assignmentElement);
task.setAssignmentDelegation(assignmentDelegation);
}
// if no assignment or swimlane is specified
} else {
// the user has to manage assignment manually, so we better warn him/her.
addWarning("warning: no swimlane or assignment specified for task '"+taskElement.asXML()+"'");
}
// notify
String notificationsText = taskElement.attributeValue("notify");
if ( notificationsText!=null
&& ("true".equalsIgnoreCase(notificationsText)
|| "on".equalsIgnoreCase(notificationsText)
|| "yes".equalsIgnoreCase(notificationsText)
)
) {
String notificationEvent = Event.EVENTTYPE_TASK_ASSIGN;
Event event = task.getEvent(notificationEvent);
if (event==null) {
event = new Event(notificationEvent);
task.addEvent(event);
}
Delegation delegation = createMailDelegation(notificationEvent, null, null, null, null);
Action action = new Action(delegation);
action.setProcessDefinition(processDefinition);
action.setName(task.getName());
event.addAction(action);
}