Package org.uengine.smcp.twister.engine.priv.core.definition

Examples of org.uengine.smcp.twister.engine.priv.core.definition.Switch


*/
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;
    }
View Full Code Here

TOP

Related Classes of org.uengine.smcp.twister.engine.priv.core.definition.Switch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.