*/
public class SwitchDeployer extends ActivityDeployer {
protected void processSpecificElements(Element element, Activity activity) throws DeploymentException {
Switch aSwitch = (Switch) activity;
for (Iterator i = element.elementIterator("case"); i.hasNext();) {
Element caseElement = (Element) i.next();
String s = caseElement.valueOf("@condition");
log.debug("<case " +s +">");
Element activityElement = getActivityElement(caseElement);
log.debug("<" + activityElement.getName() + ">");
ActivityDeployer ad = ActivityDeployerFactory.getActivityDeployer(activityElement.getName());
aSwitch.addCondition(s, ad.deploy(activityElement, aSwitch));
log.debug("</" + activityElement.getName() + ">");
log.debug("</case>");
}
log.debug("<otherwise>");
Element otherwiseElement = element.element("otherwise");
Element activityElement = getActivityElement(otherwiseElement);
log.debug("<" + activityElement.getName() + ">");
ActivityDeployer ad = ActivityDeployerFactory.getActivityDeployer(activityElement.getName());
aSwitch.setOtherwise(ad.deploy(activityElement, aSwitch));
log.debug("</" + activityElement.getName() + ">");
log.debug("</otherwise>");
processChildren = false;
}