Element activityElement = createBPELElement("opaqueActivity");
return activityElement;
}
protected Element forEach2XML(Activity activity) {
ForEach forEach = (ForEach)activity;
Element activityElement = createBPELElement("forEach");
if (forEach.getParallel() != null)
activityElement.setAttribute("parallel", BPELUtils.boolean2XML(forEach.getParallel()));
if (forEach.getCounterName() != null) {
activityElement.setAttribute("counterName", forEach.getCounterName().getName());
}
if (forEach.getStartCounterValue() != null) {
activityElement.appendChild(expression2XML(forEach.getStartCounterValue(), "startCounterValue"));
}
if (forEach.getFinalCounterValue() != null) {
activityElement.appendChild(expression2XML(forEach.getFinalCounterValue(), "finalCounterValue"));
}
CompletionCondition completionCondition = forEach.getCompletionCondition();
if (completionCondition != null) {
Element completionConditionElement = completionCondition2XML(completionCondition);
activityElement.appendChild(completionConditionElement);
}
if (forEach.getActivity() != null ){
activityElement.appendChild(activity2XML(forEach.getActivity()));
}
return activityElement;
}