Package org.apache.ode.jacob

Examples of org.apache.ode.jacob.ReceiveProcess


        public void run() {
            if (!_active.isEmpty() || _pickResponseChannel != null) {
                CompositeProcess mlset = ProcessUtil.compose(null);

                if (!_terminated) {
                    mlset.or(new ReceiveProcess() {
                        private static final long serialVersionUID = 7666910462948788042L;
                    }.setChannel(_tc).setReceiver(new Termination() {
                        public void terminate() {
                            terminateActive();
                            _terminated = true;
                            if (_pickResponseChannel != null)
                                getBpelRuntimeContext().cancel(_pickResponseChannel);
                            instance(WAITING.this);
                        }
                    }));
                }

                if (!_stopped) {
                    mlset.or(new ReceiveProcess() {
                        private static final long serialVersionUID = -1050788954724647970L;
                    }.setChannel(_ehc).setReceiver(new EventHandlerControl() {
                        public void stop() {
                            _stopped = true;
                            if (_pickResponseChannel != null)
                                getBpelRuntimeContext().cancel(_pickResponseChannel);
                            instance(WAITING.this);
                        }
                    }));
                }

                for (final ActivityInfo ai : _active) {
                    mlset.or(new ReceiveProcess() {
                        private static final long serialVersionUID = 5341207762415360982L;
                    }.setChannel(ai.parent).setReceiver(new ParentScope() {
                        public void compensate(OScope scope, Synch ret) {
                            _psc.compensate(scope, ret);
                            instance(WAITING.this);
                        }

                        public void completed(FaultData faultData, Set<CompensationHandler> compensations) {
                            _active.remove(ai);
                            _comps.addAll(compensations);
                            if (faultData != null && _fault == null) {
                                _fault = faultData;
                                terminateActive();
                                // ODE-511; needs to clean up the route
                                if (_pickResponseChannel != null)
                                    getBpelRuntimeContext().cancel(_pickResponseChannel);
                                _psc.completed(_fault, _comps);
                            } else
                                instance(WAITING.this);
                        }

                        public void cancelled() { completed(null, CompensationHandler.emptySet()); }
                        public void failure(String reason, Element data) { completed(null, CompensationHandler.emptySet()); }
                    }));
                }

                if (_pickResponseChannel != null)
                    mlset.or(new ReceiveProcess() {
                        private static final long serialVersionUID = -4929999153478677288L;
                    }.setChannel(_pickResponseChannel).setReceiver(new PickResponse() {
                         public void onRequestRcvd(int selectorIdx, String mexId) {
                            // The receipt of the message causes a new scope to be created:
                            ScopeFrame ehScopeFrame = new ScopeFrame(_oevent,
View Full Code Here


            _oprocess.procesScope,
            newChannel(Termination.class), newChannel(ParentScope.class));
        ScopeFrame processFrame = new ScopeFrame(_oprocess.procesScope, scopeInstanceId, null, null,_globals);
        instance(new SCOPE(child, processFrame, new LinkFrame(null)));

        object(new ReceiveProcess() {
            private static final long serialVersionUID = -8564969578471906493L;
        }.setChannel(child.parent).setReceiver(new ParentScope() {
            public void compensate(OScope scope, Synch ret) {
                assert false;
            }
View Full Code Here

TOP

Related Classes of org.apache.ode.jacob.ReceiveProcess

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.