activities.clear();
Iterator<Element> iter = activitElements.iterator();
while (iter.hasNext()) {
Element activityElement = iter.next();
Activity activity = new Activity(wp, activityElement.getAttribute(NAME));
activity.setSn(UUID.randomUUID().toString());
activity.setDisplayName(activityElement.getAttribute(DISPLAY_NAME));
activity.setDescription(Util4JAXPParser.elementAsString(
activityElement, DESCRIPTION));
activity.setCompletionStrategy(activityElement.getAttribute(COMPLETION_STRATEGY));
loadEventListeners(activity.getEventListeners(), Util4JAXPParser.child(activityElement, EVENT_LISTENERS));
loadExtendedAttributes(activity.getExtendedAttributes(),
Util4JAXPParser.child(activityElement, EXTENDED_ATTRIBUTES));
loadTasks(activity, activity.getInlineTasks(), Util4JAXPParser.child(
activityElement, TASKS));
loadTaskRefs((WorkflowProcess) activity.getParent(), activity, activity.getTaskRefs(), Util4JAXPParser.child(activityElement, TASKREFS));
activities.add(activity);
}
}