Examples of Termination


Examples of org.apache.ode.bpel.runtime.channels.Termination

            Iterator<ChildInfo> active = active();
            // Continuing as long as a child is active
            if (active().hasNext()) {
                CompositeProcess mlSet = ProcessUtil.compose(new ReceiveProcess() {
                    private static final long serialVersionUID = 2554750257484084466L;
                }.setChannel(_self.self).setReceiver(new Termination() {
                    public void terminate() {
                        // Terminating all children before sepuku
                        for (Iterator<ChildInfo> i = active(); i.hasNext(); )
                            replication(i.next().activity.self).terminate();
                        _terminateRequested = true;
View Full Code Here

Examples of org.apache.ode.bpel.runtime.channels.Termination

                dpe(_oactivity);
            }
        } else /* don't know all our links statuses */ {
            CompositeProcess mlset = compose(new ReceiveProcess() {
                private static final long serialVersionUID = 5094153128476008961L;
            }.setChannel(_self.self).setReceiver(new Termination() {
                public void terminate() {
                    // Complete immediately, without faulting or registering any comps.
                    _self.parent.completed(null, CompensationHandler.emptySet());
                    // Dead-path activity
                    dpe(_oactivity);
View Full Code Here

Examples of org.apache.ode.bpel.runtime.channels.Termination

                                faultData = createFault(OFailureHandling.FAILURE_FAULT_NAME, _self.o, _failure.reason);
                            completed(faultData, CompensationHandler.emptySet());
                        }
                    })).or(new ReceiveProcess() {
                        private static final long serialVersionUID = 2148587381204858397L;
                    }.setChannel(_self.self).setReceiver(new Termination() {
                        public void terminate() {
                            if (__log.isDebugEnabled())
                                __log.debug("ActivityRecovery: Cancelling activity " + _self.aId + " (terminated by scope)");
                            getBpelRuntimeContext().unregisterActivityForRecovery(recoveryChannel);
                            cancelled();
View Full Code Here

Examples of org.apache.ode.bpel.runtime.channels.Termination

        public void run() {
            if (_child != null || !_eventHandlers.isEmpty()) {
                CompositeProcess mlSet = ProcessUtil.compose(new ReceiveProcess() {
                    private static final long serialVersionUID = 1913414844895865116L;
                }.setChannel(_self.self).setReceiver(new Termination() {
                    public void terminate() {
                        _terminated = true;

                        // Forward the termination request to the nested activity.
                        if (_child != null && !_childTermRequested) {
View Full Code Here

Examples of org.apache.ode.bpel.runtime.channels.Termination

        }

        public void run() {
            object(false, compose(new ReceiveProcess() {
                private static final long serialVersionUID = -5471984635653784051L;
            }.setChannel(_self.self).setReceiver(new Termination() {
                public void terminate() {
                    _terminated = true;
                    replication(_child.self).terminate();
                    instance(WAITER.this);
                }
View Full Code Here

Examples of org.apache.ode.bpel.runtime.channels.Termination

                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);
View Full Code Here

Examples of org.drools.planner.core.termination.Termination

    // ************************************************************************
    // Builder methods
    // ************************************************************************

    public Termination buildTermination(ScoreDefinition scoreDefinition, Termination chainedTermination) {
        Termination termination = buildTermination(scoreDefinition);
        if (termination == null) {
            return chainedTermination;
        }
        return new OrCompositeTermination(chainedTermination, termination);
    }
View Full Code Here

Examples of org.drools.planner.core.termination.Termination

    }

    public Termination buildTermination(ScoreDefinition scoreDefinition) {
        List<Termination> terminationList = new ArrayList<Termination>();
        if (terminationClass != null) {
            Termination termination  = ConfigUtils.newInstance(this, "terminationClass", terminationClass);
            terminationList.add(termination);
        }
        Long maximumTimeMillisSpendTotal = calculateMaximumTimeMillisSpendTotal();
        if (maximumTimeMillisSpendTotal != null) {
            TimeMillisSpendTermination termination = new TimeMillisSpendTermination();
            termination.setMaximumTimeMillisSpend(maximumTimeMillisSpendTotal);
            terminationList.add(termination);
        }
        if (scoreAttained != null) {
            ScoreAttainedTermination termination = new ScoreAttainedTermination();
            termination.setScoreAttained(scoreDefinition.parseScore(scoreAttained));
            terminationList.add(termination);
        }
        if (maximumStepCount != null) {
            StepCountTermination termination = new StepCountTermination();
            termination.setMaximumStepCount(maximumStepCount);
            terminationList.add(termination);
        }
        if (maximumUnimprovedStepCount != null) {
            UnimprovedStepCountTermination termination = new UnimprovedStepCountTermination();
            termination.setMaximumUnimprovedStepCount(maximumUnimprovedStepCount);
            terminationList.add(termination);
        }
        if (!CollectionUtils.isEmpty(terminationConfigList)) {
            for (TerminationConfig terminationConfig : terminationConfigList) {
                Termination termination = terminationConfig.buildTermination(scoreDefinition);
                if (termination != null) {
                    terminationList.add(termination);
                }
            }
        }
View Full Code Here

Examples of org.drools.planner.core.termination.Termination

        SolutionDescriptor solutionDescriptor = buildSolutionDescriptor();
        ScoreDirectorFactory scoreDirectorFactory = scoreDirectorFactoryConfig.buildScoreDirectorFactory(
                environmentMode, solutionDescriptor);
        solver.setScoreDirectorFactory(scoreDirectorFactory);
        ScoreDefinition scoreDefinition = scoreDirectorFactory.getScoreDefinition();
        Termination termination = terminationConfig.buildTermination(scoreDefinition, basicPlumbingTermination);
        solver.setTermination(termination);
        BestSolutionRecaller bestSolutionRecaller = buildBestSolutionRecaller(environmentMode);
        solver.setBestSolutionRecaller(bestSolutionRecaller);
        if (CollectionUtils.isEmpty(solverPhaseConfigList)) {
            throw new IllegalArgumentException(
View Full Code Here

Examples of org.drools.planner.core.termination.Termination

        solutionDirector.setSolutionDescriptor(solutionDescriptor);
        solutionDirector.setRuleBase(buildRuleBase());
        ScoreDefinition scoreDefinition = scoreDefinitionConfig.buildScoreDefinition();
        solutionDirector.setScoreDefinition(scoreDefinition);
        solver.setSolutionDirector(solutionDirector);
        Termination termination = terminationConfig.buildTermination(scoreDefinition, basicPlumbingTermination);
        solver.setTermination(termination);
        BestSolutionRecaller bestSolutionRecaller = new BestSolutionRecaller();
        solver.setBestSolutionRecaller(bestSolutionRecaller);
        if (solverPhaseConfigList == null || solverPhaseConfigList.isEmpty()) {
            throw new IllegalArgumentException(
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.