Package org.apache.ode.bpel.rtrep.v1

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


        return new OForEach(_context.getOProcess(), _context.getCurrent());
    }

    public void compile(OActivity output, Activity src) {
        if (__log.isDebugEnabled()) __log.debug("Compiling ForEach activity.");
        OForEach oforEach = (OForEach) output;
        ForEachActivity forEach = (ForEachActivity) src;
        oforEach.parallel = forEach.isParallel();
        oforEach.startCounterValue = _context.compileExpr(forEach.getStartCounter());
        oforEach.finalCounterValue = _context.compileExpr(forEach.getFinalCounter());
        if (forEach.getCompletionCondition() != null) {
            oforEach.completionCondition =
                    new OForEach.CompletionCondition(_context.getOProcess());
            oforEach.completionCondition.successfulBranchesOnly
                    = forEach.getCompletionCondition().isSuccessfulBranchesOnly();
            oforEach.completionCondition.branchCount = _context.compileExpr(forEach.getCompletionCondition());
        }

        // ForEach 'adds' a counter variable in inner scope
        if (__log.isDebugEnabled()) __log.debug("Adding the forEach counter variable to inner scope.");
        Scope s = forEach.getChild().getScope();
        // Checking if a variable using the same name as our counter is already defined.
        // The spec requires a static analysis error to be thrown in that case.
        if (s.getVariableDecl(forEach.getCounterName()) != null)
            throw new CompilationException(__cmsgs.errForEachAndScopeVariableRedundant(forEach.getCounterName()).setSource(src));

        OXsdTypeVarType counterType = new OXsdTypeVarType(oforEach.getOwner());
        counterType.simple = true;
        counterType.xsdType = new QName(Namespaces.XML_SCHEMA, "int");
        OScope.Variable counterVar = new OScope.Variable(oforEach.getOwner(), counterType);
        counterVar.name = forEach.getCounterName();

        if (__log.isDebugEnabled()) __log.debug("Compiling forEach inner scope.");
        oforEach.innerScope = _context.compileSLC(forEach.getChild(), new OScope.Variable[]{counterVar});
View Full Code Here


class InvokeGenerator extends DefaultActivityGenerator {

    private static final InvokeGeneratorMessages __imsgs = MessageBundle.getMessages(InvokeGeneratorMessages.class);

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

        return new OInvoke(_context.getOProcess(), _context.getCurrent());
    }

    public void compile(OActivity output, Activity srcx) {
        InvokeActivity src = (InvokeActivity) srcx;
        final OInvoke oinvoke = (OInvoke) output;

        oinvoke.partnerLink = _context.resolvePartnerLink(src.getPartnerLink());
        oinvoke.operation = _context.resolvePartnerRoleOperation(oinvoke.partnerLink, src.getOperation());
        assert oinvoke.operation.getInput() != null; // ensured by
        // resolvePartnerRoleOperation
View Full Code Here

        try {
            String name = variableName.getLocalPart();
            if (_oxpath instanceof OXPath10ExpressionBPEL20
                && ((OXPath10ExpressionBPEL20) _oxpath).isJoinExpression) {
                // these resolve to links
                OLink olink = _cctx.resolveLink(name);
                _oxpath.links.put(name, olink);
                return Boolean.TRUE;
            } else {
                int dot = name.indexOf('.');
                if (dot != -1)
View Full Code Here

            if (params.size() != 1) {
                throw new CompilationException(__msgs
                    .errInvalidNumberOfArguments(Constants.EXT_FUNCTION_GETLINKSTATUS));
            }
            String linkName = (String) params.get(0);
            OLink olink = _cctx.resolveLink(linkName);
            _out.links.put(linkName, olink);

            return "";
        }
View Full Code Here

            throw new CompilationException(__cmsgs.errUndeclaredPortType(portTypeName));
        return portType;
    }

    public OLink resolveLink(String linkName) {
        OLink ret = null;

        // Fist find where the link is declared.
        for (Iterator<OActivity> i = _structureStack.iterator(); i.hasNext();) {
            OActivity oact = i.next();
            if (oact instanceof OFlow)
View Full Code Here

        alias.debugInfo = createDebugInfo(_processDef, src.getMessageType() + " --> " + src.getPropertyName());
        return alias;
    }

    private void compileLinkTarget(LinkTarget target) {
        OLink ol = resolveLink(target.getLinkName());
        assert ol != null;
        ol.debugInfo = createDebugInfo(target, target.toString());
        if (ol.target != null)
            throw new CompilationException(__cmsgs.errDuplicateLinkTarget(target.getLinkName()).setSource(target));
        ol.target = _structureStack.topActivity();
View Full Code Here

        _structureStack.topActivity().targetLinks.add(ol);
    }

    private void compileLinkSource(LinkSource linksrc) {
        OLink ol = resolveLink(linksrc.getLinkName());
        assert ol != null;
        ol.debugInfo = createDebugInfo(linksrc, linksrc.toString());
        if (ol.source != null)
            throw new CompilationException(__cmsgs.errDuplicateLinkSource(linksrc.getLinkName()).setSource(linksrc));
        ol.source = _structureStack.topActivity();
View Full Code Here

    return new OFlow(_context.getOProcess(),_context.getCurrent());
  }

  private void compileLinkDecls(OFlow oflow, FlowActivity flowAct) {
    for (Link link : flowAct.getLinks()) {
      OLink olink = new OLink(_context.getOProcess());
      olink.name = link.getLinkName();
      declareLink(oflow, olink);
    }
  }
View Full Code Here

        public Object evaluate(List args) throws XPathFunctionException {
            if (args.size() != 1)
                throw new XPathFunctionException(new FaultException(new QName(Namespaces.ODE_EXTENSION_NS,
                    "getLinkStatusInvalidSource"), "Illegal Arguments"));

            OLink olink = _oxpath.links.get(args.get(0));
            try {
                return _ectx.isLinkActive(olink) ? Boolean.TRUE : Boolean.FALSE;
            } catch (FaultException e) {
                throw new XPathFunctionException(new FaultException(new QName(Namespaces.ODE_EXTENSION_NS,
                    "getLinkStatusInvalidSource"), e));
View Full Code Here

TOP

Related Classes of org.apache.ode.bpel.rtrep.v1.OReply

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.