Examples of Duration


Examples of org.drools.decisiontable.model.Duration

    private void createDuration(int column,
            String value,
            ActionType actionType)
  {

    Duration dur = new Duration( );
    dur.setSnippet( value );
    dur.setComment( cellComment( column ) );
    _currentRule.setDuration( dur );
  }
View Full Code Here

Examples of org.drools.spi.Duration

       
       
       
       

        Duration dur = rule.getDuration( );

        if ( dur != null && dur.getDuration( tuple ) > 0 )
        {
            // check if item has been retracted as part of a modify
            AgendaItem item = null;
            if ( !this.scheduledItemsToRetract.isEmpty( ) )
            {
View Full Code Here

Examples of org.drools.spi.Duration

        Configuration config = this.ruleSetReader.endConfiguration( );
        SemanticModule module = this.ruleSetReader.lookupSemanticModule( uri,
                                                                    localName );

        DurationFactory factory = module.getDurationFactory( localName );
        Duration duration;
        try
        {
            Rule rule = (Rule) this.ruleSetReader.getParent( Rule.class );

            duration = factory.newDuration( rule,
View Full Code Here

Examples of org.drools.spi.Duration

                data.add( "tested" );
            }
        } );

        /* 1/10th of a second */
        Duration duration = new Duration()
        {
            public long getDuration(Tuple tuple)
            {
                return 100;
            }
View Full Code Here

Examples of org.drools.spi.Duration

        final Rule rule = new Rule( "test-rule" );
        final List data = new ArrayList();

        /* 1/10th of a second */
        Duration duration = new Duration()
        {
            public long getDuration(Tuple tuple)
            {
                return 100;
            }
View Full Code Here

Examples of org.drools.spi.Duration

        final Rule rule = new Rule( "test-rule" );
        final List data = new ArrayList();

        /* 1/10th of a second */
        Duration duration = new Duration()
        {
            public long getDuration(Tuple tuple)
            {
                return 100;
            }
View Full Code Here

Examples of org.drools.spi.Duration

                                                rule );
            }
        } );

        /* 1/10th of a second */
        Duration duration = new Duration()
        {
            public long getDuration(Tuple tuple)
            {
                return 100;
            }
View Full Code Here

Examples of org.drools.spi.Duration

        if ( rule.getNoLoop( ) && rule.equals( context.getRuleOrigin( ) ) )
        {
            return;
        }

        Duration dur = rule.getDuration( );

        AgendaItem item = new AgendaItem( tuple,
                                          context,
                                          rule );
       
        /* set the focus if rule autoFocus is true */
        if ( rule.getAutoFocus() )
        {
            setFocus( rule.getModule() );
        }

        if ( dur != null && dur.getDuration( tuple ) > 0 )
        {
            this.scheduledItems.put( item.getKey( ),
                                     item );
            scheduleItem( item );
            this.workingMemory.getAgendaEventSupport( ).fireActivationCreated( rule,
View Full Code Here

Examples of org.drools.spi.Duration

    {
        Rule rule = new Rule( "test-rule" );

        rule.setDuration( 42L );

        Duration dur = rule.getDuration( );

        assertNotNull( dur );

        assertTrue( dur instanceof FixedDuration );
View Full Code Here

Examples of org.drools.spi.Duration

                      rule.getDuration( ).getDuration( null ) );
    }

    public void testDuration_WithObject() throws Exception
    {
        Duration dur = new FixedDuration( 42 );

        Rule rule = new Rule( "test-rule" );

        rule.setDuration( dur );
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.