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

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


            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

        oscope.eventHandler.onAlarms.add(oalarm);
    }

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

        final OEventHandler.OEvent oevent = new OEventHandler.OEvent(_oprocess, oscope);
        oevent.name = "__eventHandler:";
        oevent.debugInfo = createDebugInfo(onEvent, null);
View Full Code Here

        debugInfo.description = str;
        return debugInfo;
    }

    private void compile(final Variable src) {
        final OScope oscope = _structureStack.topScope();

        if (src.getKind() == null)
            throw new CompilationException(__cmsgs.errVariableDeclMissingType(src.getName()).setSource(src));

        if (oscope.getLocalVariable(src.getName()) != null)
            throw new CompilationException(__cmsgs.errDuplicateVariableDecl(src.getName()).setSource(src));

        if (src.getTypeName() == null) throw new CompilationException(__cmsgs.errUnrecognizedVariableDeclaration(src.getName()));
        OVarType varType;
        switch (src.getKind()) {
        case ELEMENT:
            varType = resolveElementType(src.getTypeName());
            break;
        case MESSAGE:
            varType = resolveMessageType(src.getTypeName());
            break;
        case SCHEMA:
            varType = resolveXsdType(src.getTypeName());
            break;
        default:
            throw new CompilationException(__cmsgs.errUnrecognizedVariableDeclaration(src.getName()));
        }

        OScope.Variable ovar = new OScope.Variable(_oprocess, varType);
        ovar.name = src.getName();
        ovar.declaringScope = oscope;
        ovar.debugInfo = createDebugInfo(src, null);
       
        ovar.extVar = compileExtVar(src);

        oscope.addLocalVariable(ovar);

        if (__log.isDebugEnabled())
            __log.debug("Compiled variable " + ovar);
    }
View Full Code Here

            __log.debug("Compiled variable " + ovar);
    }


    private void compile(TerminationHandler terminationHandler) {
        OScope oscope = _structureStack.topScope();
        oscope.terminationHandler = new OTerminationHandler(_oprocess, oscope);
        oscope.terminationHandler.name = "__terminationHandler:" + oscope.name;
        oscope.terminationHandler.debugInfo = createDebugInfo(terminationHandler, null);
        if (terminationHandler == null) {
            oscope.terminationHandler.activity = createDefaultCompensateActivity(null,
                    "Auto-generated 'compensate all' pseudo-activity for default termination handler on "
                            + oscope.toString());
        } else {
            _recoveryContextStack.push(oscope);
            try {
                oscope.terminationHandler.activity = compile(terminationHandler.getActivity());
            } finally {
View Full Code Here

            }
        }
    }

    private void compile(CompensationHandler compensationHandler) {
        OScope oscope = _structureStack.topScope();
        oscope.compensationHandler = new OCompensationHandler(_oprocess, oscope);
        oscope.compensationHandler.name = "__compenationHandler_" + oscope.name;
        oscope.compensationHandler.debugInfo = createDebugInfo(compensationHandler, null);
        if (compensationHandler == null) {
            oscope.compensationHandler.activity = createDefaultCompensateActivity(compensationHandler,
                    "Auto-generated 'compensate all' pseudo-activity for default compensation handler on  "
                            + oscope.toString());
        } else {
            _recoveryContextStack.push(oscope);
            try {
                oscope.compensationHandler.activity = compile(compensationHandler.getActivity());
            } finally {
View Full Code Here

            }
        }
    }

    private void compile(FaultHandler fh) {
        OScope oscope = _structureStack.topScope();
        oscope.faultHandler = new OFaultHandler(_oprocess);
        if (fh == null) {
            // The default fault handler compensates all child activities
            // AND then rethrows the fault!
            final OCatch defaultCatch = new OCatch(_oprocess, oscope);
View Full Code Here

    private static final CommonCompilationMessages __cmsgs =
        MessageBundle.getMessages(CommonCompilationMessages.class);

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

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

    public void compile(OActivity output, Activity src)  {
        OSequence oseq = (OSequence) output;
        compileChildren(oseq, (SequenceActivity) src);
    }
View Full Code Here

            // AND then rethrows the fault!
            final OCatch defaultCatch = new OCatch(_oprocess, oscope);
            defaultCatch.name = "__defaultFaultHandler:" + oscope.name;
            defaultCatch.faultName = null; // catch any fault
            defaultCatch.faultVariable = null;
            OSequence sequence = new OSequence(_oprocess, defaultCatch);
            sequence.name = "__defaultFaultHandler_sequence:" + oscope.name;
            sequence.debugInfo = createDebugInfo(fh, "Auto-generated sequence activity.");
            ORethrow rethrow = new ORethrow(_oprocess, sequence);
            rethrow.name = "__defaultFaultHandler_rethrow:" + oscope.name;
            rethrow.debugInfo = createDebugInfo(fh, "Auto-generated re-throw activity.");
View Full Code Here

TOP

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

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.