}
return activityElement;
}
protected Element scope2XML(Activity activity) {
Scope scope = (Scope)activity;
Element activityElement = createBPELElement("scope");
if (scope.isSetIsolated())
activityElement.setAttribute("isolated", BPELUtils.boolean2XML(scope.getIsolated()));
if (scope.isSetExitOnStandardFault())
activityElement.setAttribute("exitOnStandardFault", BPELUtils.boolean2XML(scope.getExitOnStandardFault()));
if (scope.getVariables() != null && !scope.getVariables().getChildren().isEmpty())
activityElement.appendChild(variables2XML(scope.getVariables()));
if (scope.getCorrelationSets() != null && !scope.getCorrelationSets().getChildren().isEmpty())
activityElement.appendChild(correlationSets2XML(scope.getCorrelationSets()));
if (scope.getPartnerLinks() != null && !scope.getPartnerLinks().getChildren().isEmpty())
activityElement.appendChild(partnerLinks2XML(scope.getPartnerLinks()));
if (scope.getFaultHandlers() != null )
activityElement.appendChild(faultHandlers2XML(scope.getFaultHandlers()));
if (scope.getCompensationHandler() != null )
activityElement.appendChild(compensationHandler2XML(scope.getCompensationHandler()));
if (scope.getTerminationHandler() != null )
activityElement.appendChild(terminationHandler2XML(scope.getTerminationHandler()));
if (scope.getEventHandlers() != null)
activityElement.appendChild(eventHandler2XML(scope.getEventHandlers()));
if (scope.getMessageExchanges() != null)
activityElement.appendChild(messageExchanges2XML(scope.getMessageExchanges()));
if (scope.getActivity() != null )
activityElement.appendChild(activity2XML(scope.getActivity()));
return activityElement;
}