return linkElement;
}
protected Element if2XML(Activity activity) {
If _if = (If)activity;
Element ifElement = createBPELElement("if");
if (_if.getActivity() != null) {
Element activityElement = activity2XML(_if.getActivity());
ifElement.appendChild(activityElement);
}
if (_if.getCondition() != null) {
ifElement.appendChild(expression2XML(_if.getCondition(), "condition"));
}
List elseIfs = _if.getElseIf();
if (!elseIfs.isEmpty()) {
for (Iterator i = elseIfs.iterator(); i.hasNext();) {
ElseIf elseIf = (ElseIf)i.next();
Element elseIfElement = createBPELElement("elseif");
ifElement.appendChild(elseIfElement);
if (elseIf.getCondition() != null) {
elseIfElement.appendChild(expression2XML(elseIf.getCondition(), "condition"));
}
if (elseIf.getActivity() != null) {
elseIfElement.appendChild(activity2XML(elseIf.getActivity()));
}
// serialize local namespace prefixes to XML
bpelNamespacePrefixManager.serializePrefixes(elseIf, elseIfElement);
extensibleElement2XML(elseIf, elseIfElement);
}
}
Else _else = _if.getElse();
if (_else != null) {
Element elseElement = else2XML(_else);
ifElement.appendChild(elseElement);
}