String namespace = activity.eClass().getEPackage().getNsURI();
QName qName = new QName(namespace, localName);
BPELActivitySerializer serializer = extensionRegistry.getActivitySerializer(qName);
if (serializer != null) {
DocumentFragment fragment = document.createDocumentFragment();
serializer.marshall(qName, activity, fragment, process, this);
Element child = (Element)fragment.getFirstChild();
activityElement.appendChild(child);
// Standard attributes
addStandardAttributes(child, activity);
// Standard elements