Package org.drools.time.impl

Examples of org.drools.time.impl.Timer


        }             
                              
        // adds item to activation group if appropriate
        addItemToActivationGroupitem );           
       
        final Timer timer = rule.getTimer();
        if ( timer != null ) {
            scheduleItem( (ScheduledAgendaItem) item,
                          workingMemory );
        } else {               
            AgendaItem agendaItem =  ( AgendaItem ) item;
View Full Code Here


        }             
                              
        // adds item to activation group if appropriate
        addItemToActivationGroupitem );           
       
        final Timer timer = rule.getTimer();
        if ( timer != null ) {
            scheduleItem( (ScheduledAgendaItem) item,
                          workingMemory );
        } else {               
            AgendaItem agendaItem =  ( AgendaItem ) item;
View Full Code Here

            return true;
        }


        AgendaItem item = null;
        final Timer timer = this.rule.getTimer();
        if ( timer != null ) {
            if ( reuseActivation ) {
                item = ( AgendaItem ) tuple.getObject();               
            } else {
                item = agenda.createScheduledAgendaItem( tuple,
View Full Code Here

            repeatLimit = Integer.parseInt( timerString.substring( equalsPos + 1, p ).trim() );            
        }                               
                    
        String body = timerString.substring( colonPos + 1, optionsPos ).trim();       
       
        Timer timer = null;
        if ( "cron".equals( protocol ) ) {
            try {
                timer = new CronTimer( startDate, endDate, repeatLimit, new CronExpression( body ) );
            } catch ( ParseException e ) {
                context.getErrors().add( "Unable to build set timer '" + timerString + "'");
View Full Code Here

            Declaration target = constraint.getRequiredDeclarations()[0];
            if ( target.isPatternDeclaration() && target.getPattern().getObjectType().isEvent() ) {
                long uplimit = ((IntervalProviderConstraint) constraint).getInterval().getUpperBound();
                // only makes sense to add the new timer if the uplimit is not infinity (Long.MAX_VALUE)
                if( uplimit < Long.MAX_VALUE ) {
                    Timer timer = context.getRule().getTimer();
                    DurationTimer durationTimer = new DurationTimer( uplimit );

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

        }             
                              
        // adds item to activation group if appropriate
        addItemToActivationGroupitem );           
       
        final Timer timer = rule.getTimer();
        if ( timer != null && item instanceof ScheduledAgendaItem ) {
            scheduleItem( (ScheduledAgendaItem) item,
                          workingMemory );
        } else {               
            InternalAgendaGroup agendaGroup = (InternalAgendaGroup) this.getAgendaGroup( rule.getAgendaGroup() );
View Full Code Here

            return true;
        }

        final Rule rule = rtn.getRule();
        AgendaItem item;
        final Timer timer = rule.getTimer();
        if ( timer != null ) {
            if ( reuseActivation ) {
                item = ( AgendaItem ) tuple.getObject();  
                item.setPropagationContext( context );
            } else {
View Full Code Here

TOP

Related Classes of org.drools.time.impl.Timer

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.