initialNodeName = root.attributeValue("initial");
}
protected void readSwimlanes(Element processDefinitionElement) {
Iterator iter = processDefinitionElement.elementIterator("swimlane");
TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
while (iter.hasNext()) {
Element swimlaneElement = (Element) iter.next();
String swimlaneName = swimlaneElement.attributeValue("name");
if (swimlaneName==null) {
addWarning("there's a swimlane without a name");
} else {
Swimlane swimlane = new Swimlane(swimlaneName);
Element assignmentElement = swimlaneElement.element("assignment");
if (assignmentElement!=null) {
if ( (assignmentElement.attribute("actor-id")!=null)
|| (assignmentElement.attribute("pooled-actors")!=null)
) {
swimlane.setActorIdExpression(assignmentElement.attributeValue("actor-id"));
swimlane.setPooledActorsExpression(assignmentElement.attributeValue("pooled-actors"));
} else {
Delegation assignmentDelegation = readAssignmentDelegation(assignmentElement);
swimlane.setAssignmentDelegation(assignmentDelegation);
}
} else {
Task startTask = taskMgmtDefinition.getStartTask();
if ( (startTask==null)
|| (startTask.getSwimlane()!=swimlane)
) {
addWarning("swimlane '"+swimlaneName+"' does not have an assignment");
}
}
taskMgmtDefinition.addSwimlane(swimlane);
}
}
}