Examples of DurationTimer


Examples of org.drools.time.impl.DurationTimer

            public String getName() {
                return "default";
            }
        } );
               
        rule.setTimer( new DurationTimer( 10000 ) );
        rule.setPackage("test");
        impl.pkg.addRule(rule);
       
        knowledgeBase.addKnowledgePackages(Collections.singleton((KnowledgePackage) impl));
        SessionConfiguration config = new SessionConfiguration();
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

            Declaration target = constraint.getRequiredDeclarations()[0];
            if ( target.isPatternDeclaration() && target.getPattern().getObjectType().isEvent() ) {
                long uplimit = ((VariableConstraint) constraint).getInterval().getUpperBound();

                Timer timer = context.getRule().getTimer();
                DurationTimer durationTimer = new DurationTimer( uplimit );

                if ( timer instanceof CompositeMaxDurationTimer ) {
                    // already a composite so just add
                    ((CompositeMaxDurationTimer) timer).addDurationTimer( durationTimer );
                } else {
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

            Declaration target = constraint.getRequiredDeclarations()[0];
            if ( target.isPatternDeclaration() && target.getPattern().getObjectType().isEvent() ) {
                long uplimit = ((VariableConstraint) constraint).getInterval().getUpperBound();

                Timer timer = context.getRule().getTimer();
                DurationTimer durationTimer = new DurationTimer( uplimit );

                if ( timer instanceof CompositeMaxDurationTimer ) {
                    // already a composite so just add
                    ((CompositeMaxDurationTimer) timer).addDurationTimer( durationTimer );
                } else {
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

            public String getName() {
                return "default";
            }
        } );

        rule.setTimer( new DurationTimer( 10000 ) );
        rule.setPackage( "test" );
        impl.pkg.addRule( rule );

        knowledgeBase.addKnowledgePackages( Collections.singleton( (KnowledgePackage) impl ) );
        SessionConfiguration config = new SessionConfiguration();
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

            public String getName() {
                return "default";
            }
        } );

        rule.setTimer( new DurationTimer(100) );

        final PropagationContext context = new PropagationContextImpl( 0,
                                                                       PropagationContext.ASSERTION,
                                                                       null,
                                                                       null,
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

                                                                        null );

        final LeftTuple tuple1 = new LeftTuple( new DefaultFactHandle( 1,
                                                                       "cheese" ), null,
                                                                       true  );
        rule.setTimer( new DurationTimer(50) );

        node.assertLeftTuple( tuple1,
                          context1,
                          workingMemory );
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

                                                            new MockTupleSource( idGenerator.getNextId() ),
                                                            rule,
                                                            rule.getLhs(),
                                                            buildContext );

        rule.setTimer( new DurationTimer(100) );
        rule.setNoLoop( true );

        // add consequence
        rule.setConsequence( new org.drools.spi.Consequence() {
            private static final long serialVersionUID = 510l;
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

        assertEquals( 0,
                      agenda.getFocus().size() );

        rule1.setNoLoop( false );
        rule2.setTimer( new DurationTimer( 5000 ) );

        node1.assertLeftTuple( tuple,
                               context1,
                               workingMemory );
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

            Declaration target = constraint.getRequiredDeclarations()[0];
            if ( target.isPatternDeclaration() && target.getPattern().getObjectType().isEvent() ) {
                long uplimit = ((VariableConstraint) constraint).getInterval().getUpperBound();

                Timer timer = context.getRule().getTimer();
                DurationTimer durationTimer = new DurationTimer( uplimit );

                if ( timer instanceof CompositeMaxDurationTimer ) {
                    // already a composite so just add
                    ((CompositeMaxDurationTimer) timer).addDurationTimer( durationTimer );
                } else {
View Full Code Here

Examples of org.drools.time.impl.DurationTimer

            public String getName() {
                return "default";
            }
        } );
               
        rule.setTimer( new DurationTimer( 10000 ) );
        rule.setPackage("test");
        impl.pkg.addRule(rule);
       
        knowledgeBase.addKnowledgePackages(Collections.singleton((KnowledgePackage) impl));
        SessionConfiguration config = new SessionConfiguration();
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.