Examples of OSwitch


Examples of org.apache.ode.bpel.rtrep.v1.OSwitch

  public OActivity newInstance(Activity src) {
        return new OSwitch(_context.getOProcess(), _context.getCurrent());
  }

  public void compile(OActivity output, Activity src) {
    OSwitch oswitch = (OSwitch) output;
    SwitchActivity switchDef = (SwitchActivity)src;

    for (SwitchActivity.Case ccase : switchDef.getCases()) {
      OSwitch.OCase ocase = new OSwitch.OCase(_context.getOProcess());
      ocase.activity = _context.compile(ccase.getActivity());
      ocase.expression = (ccase.getCondition() == null ? _context.constantExpr(true) : _context.compileExpr(ccase.getCondition()));
      oswitch.addCase(ocase);
    }
  }
View Full Code Here

Examples of org.apache.ode.bpel.rtrep.v2.OSwitch

*/
class IfGenerator extends DefaultActivityGenerator {
    private static final IfGeneratorMessages __cmsgs = MessageBundle.getMessages(IfGeneratorMessages.class);

    public OActivity newInstance(Activity src) {
        return new OSwitch(_context.getOProcess(), _context.getCurrent());
    }
View Full Code Here

Examples of org.apache.ode.bpel.rtrep.v2.OSwitch

    public OActivity newInstance(Activity src) {
        return new OSwitch(_context.getOProcess(), _context.getCurrent());
    }

    public void compile(OActivity output, Activity src) {
        OSwitch oswitch = (OSwitch) output;
        IfActivity switchDef = (IfActivity)src;

        if (switchDef.getCondition() == null)
            throw new CompilationException(__cmsgs.errIfWithNoCondition());

        boolean first = true;
        if (switchDef.getActivity() != null) {
            OSwitch.OCase ocase = new OSwitch.OCase(_context.getOProcess());
            ocase.activity = _context.compile(switchDef.getActivity());
            ocase.expression = _context.compileExpr(switchDef.getCondition());
            oswitch.addCase(ocase);
            first = false;
        }

        for (IfActivity.Case ccase : switchDef.getCases()) {
            OSwitch.OCase ocase = new OSwitch.OCase(_context.getOProcess());
            ocase.activity = _context.compile(ccase.getActivity());
            ocase.expression = first ? _context.compileExpr(switchDef.getCondition())
                    : (ccase.getCondition() == null ? _context.constantExpr(true) : _context.compileExpr(ccase.getCondition()));
            oswitch.addCase(ocase);
            first = false;
        }
    }
View Full Code Here

Examples of org.apache.ode.bpel.rtrep.v2.OSwitch

* @author Maciej Szefler - m s z e f l e r @ g m a i l . c o m
*
*/
public class SwitchGenerator extends DefaultActivityGenerator {
  public OActivity newInstance(Activity src) {
        return new OSwitch(_context.getOProcess(), _context.getCurrent());
  }
View Full Code Here

Examples of org.apache.ode.bpel.rtrep.v2.OSwitch

  public OActivity newInstance(Activity src) {
        return new OSwitch(_context.getOProcess(), _context.getCurrent());
  }

  public void compile(OActivity output, Activity src) {
    OSwitch oswitch = (OSwitch) output;
    SwitchActivity switchDef = (SwitchActivity)src;

    for (SwitchActivity.Case ccase : switchDef.getCases()) {
      OSwitch.OCase ocase = new OSwitch.OCase(_context.getOProcess());
      ocase.activity = _context.compile(ccase.getActivity());
      ocase.expression = (ccase.getCondition() == null ? _context.constantExpr(true) : _context.compileExpr(ccase.getCondition()));
      oswitch.addCase(ocase);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.