Package org.apache.ode.bpel.o

Examples of org.apache.ode.bpel.o.OScope


        assertNull(_fault);
    }

    public void testSingleElementFlow() {
        OProcess proc = new OProcess("2.0");
        proc.procesScope = new OScope(proc, null);
        OFlow flow = new OFlow(proc, proc.procesScope);
        proc.procesScope.activity = flow;
        flow.parallelActivities.add(new OEmpty(proc, flow));

        run(proc);
View Full Code Here


        assertNull(_fault);
    }

    public void testTwoElementFlow() {
        OProcess proc = new OProcess("2.0");
        proc.procesScope = new OScope(proc, null);
        OFlow flow = new OFlow(proc, proc.procesScope);
        proc.procesScope.activity = flow;
        flow.parallelActivities.add(new OEmpty(proc, flow));
        flow.parallelActivities.add(new OEmpty(proc, flow));
View Full Code Here

        assertNull(_fault);
    }

    public void testFlowTermination() {
        OProcess proc = new OProcess("2.0");
        proc.procesScope = new OScope(proc, null);
        OFlow flow = new OFlow(proc, proc.procesScope);
        proc.procesScope.activity = flow;
        OThrow othrow = new OThrow(proc, flow);
        othrow.faultName = new QName("foo", "bar");
        flow.parallelActivities.add(othrow);
View Full Code Here

        super(self, scopeFrame, linkFrame);
        _ocompact = (OCompensate) self.o;
    }

    public final void run() {
        OScope scopeToCompensate = _ocompact.compensatedScope;
        Synch sc = newChannel(Synch.class);
        _self.parent.compensate(scopeToCompensate,sc);
        object(new ReceiveProcess() {
            private static final long serialVersionUID = 3763991229748926216L;
        }.setChannel(sc).setReceiver(new Synch() {
View Full Code Here

    }

    public OScope resolveCompensatableScope(final String scopeToCompensate) throws CompilationException {
        if (_recoveryContextStack.isEmpty())
            throw new CompilationException(__cmsgs.errCompensateNAtoContext());
        OScope recoveryContext = _recoveryContextStack.peek();

        OScope scopeToComp = CollectionsX.find_if(recoveryContext.compensatable, new MemberOfFunction<OScope>() {
            public boolean isMember(OScope o) {
                return o.name != null && o.name.equals(scopeToCompensate);
            }
        });
        if (scopeToComp == null)
View Full Code Here

            for (PropertyAlias propertyAlias : def1.getPropertyAliases()) {
                compile(propertyAlias);
            }
        }

        OScope procesScope = new OScope(_oprocess, null);
        procesScope.name = "__PROCESS_SCOPE:" + process.getName();
        procesScope.debugInfo = createDebugInfo(process, null);
        _oprocess.procesScope = compileScope(procesScope, process, new Runnable() {
            public void run() {
                if (process.getRootActivity() == null) {
                    throw new CompilationException(__cmsgs.errNoRootActivity());
                }
                // Process custom properties are created as variables associated
                // with the top scope
                if (_customProcessProperties != null) {
                    for (Map.Entry<QName, Node> customVar : _customProcessProperties.entrySet()) {
                        final OScope oscope = _structureStack.topScope();
                        OVarType varType = new OConstantVarType(_oprocess, customVar.getValue());
                        OScope.Variable ovar = new OScope.Variable(_oprocess, varType);
                        ovar.name = customVar.getKey().getLocalPart();
                        ovar.declaringScope = oscope;
                        ovar.debugInfo = createDebugInfo(null, "Process custom property variable");
                        oscope.addLocalVariable(ovar);
                        if (__log.isDebugEnabled())
                            __log.debug("Compiled custom property variable " + ovar);
                    }
                }
                _structureStack.topScope().activity = compile(process.getRootActivity());
View Full Code Here

        activity.debugInfo = createDebugInfo(source, desc);
        return activity;
    }

    public OScope compileSLC(final ScopeLikeActivity source, final OScope.Variable[] variables) {
        final OScope implicitScope = new OScope(_oprocess, getCurrent());
        implicitScope.implicitScope = true;
        implicitScope.name = createName(source, "implicit-scope");
        implicitScope.debugInfo = createDebugInfo(source, "Scope-like construct " + source);
        compileScope(implicitScope, source.getScope(), new Runnable() {
            public void run() {
                compileLinks(source);
                for (OScope.Variable v : variables) {
                    v.declaringScope = implicitScope;
                    implicitScope.addLocalVariable(v);
                }
                if (source instanceof ScopeActivity) {
                    Activity scopeChild = ((ScopeActivity) source).getChildActivity();
                    if (scopeChild == null)
                        throw new CompilationException(__cmsgs.errEmptyScope().setSource(source));
View Full Code Here

            throw ce;
        }
    }

    private void compile(CorrelationSet cset) {
        OScope oscope = _structureStack.topScope();
        OScope.CorrelationSet ocset = new OScope.CorrelationSet(_oprocess);
        ocset.name = cset.getName();
        ocset.declaringScope = oscope;
        ocset.debugInfo = createDebugInfo(cset, cset.toString());
        QName[] setprops = cset.getProperties();
        for (int j = 0; j < setprops.length; ++j)
            ocset.properties.add(resolveProperty(setprops[j]));
        oscope.addCorrelationSet(ocset);
    }
View Full Code Here

            run.run();
        } finally {
            OActivity popped = _structureStack.pop();

            OActivity newtop = _structureStack.topActivity();
            OScope topScope = _structureStack.topScope();

            if (newtop != null) {
                newtop.nested.add(popped);
                // Transfer outgoing and incoming links, excluding the locally defined links.
                newtop.incomingLinks.addAll(popped.incomingLinks);
View Full Code Here

        return oscope;
    }

    private void compile(final OnAlarm onAlarm) {
        OScope oscope = _structureStack.topScope();
        assert oscope.eventHandler != null;

        final OEventHandler.OAlarm oalarm = new OEventHandler.OAlarm(_oprocess);
        oalarm.debugInfo = createDebugInfo(onAlarm, "OnAlarm Event Handler: " + onAlarm);
View Full Code Here

TOP

Related Classes of org.apache.ode.bpel.o.OScope

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.