Examples of DefaultAgendaEventListener


Examples of org.drools.core.event.DefaultAgendaEventListener

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase( RuleBase.RETEOO );
        ruleBase.addPackage( this.pkg );
        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        final DefaultAgendaEventListener listener = new DefaultAgendaEventListener() {
            private int counter = 0;

            //           public void matchCreated(ActivationCreatedEvent event) {
            //                super.matchCreated( event );
            //                System.out.println( event );
View Full Code Here

Examples of org.drools.core.event.DefaultAgendaEventListener

        ruleBase = SerializationHelper.serializeObject(ruleBase);
        final InternalWorkingMemoryActions wm = (InternalWorkingMemoryActions) ruleBase.newStatefulSession();
        final List created = new ArrayList();
        final List cancelled = new ArrayList();
        final AgendaEventListener l = new DefaultAgendaEventListener() {
            @Override
            public void activationCreated(ActivationCreatedEvent event,
                                          WorkingMemory workingMemory) {
                created.add( event );
            }
View Full Code Here

Examples of org.drools.core.event.DefaultAgendaEventListener

        ruleBase = SerializationHelper.serializeObject(ruleBase);
        final InternalWorkingMemoryActions wm = (InternalWorkingMemoryActions) ruleBase.newStatefulSession();
        final List created = new ArrayList();
        final List cancelled = new ArrayList();
        final AgendaEventListener l = new DefaultAgendaEventListener() {
            @Override
            public void activationCreated(ActivationCreatedEvent event,
                                          WorkingMemory workingMemory) {
                created.add( event );
            }
View Full Code Here

Examples of org.drools.core.event.DefaultAgendaEventListener

        ruleBase = SerializationHelper.serializeObject(ruleBase);
        final InternalWorkingMemoryActions wm = (InternalWorkingMemoryActions) ruleBase.newStatefulSession();
        final List created = new ArrayList();
        final List cancelled = new ArrayList();
        final AgendaEventListener l = new DefaultAgendaEventListener() {
            @Override
            public void activationCreated(ActivationCreatedEvent event,
                                          WorkingMemory workingMemory) {
                created.add( event );
            }
View Full Code Here

Examples of org.drools.event.DefaultAgendaEventListener

        final List<String> list = new ArrayList<String>();
        workingMemory.setGlobal( "list",
                                 list );

        final List<Activation> activations = new ArrayList<Activation>();
        AgendaEventListener listener = new DefaultAgendaEventListener() {
            public void activationCancelled(ActivationCancelledEvent event,
                                            WorkingMemory workingMemory) {
                activations.add( event.getActivation() );
            }
        };
View Full Code Here

Examples of org.drools.event.DefaultAgendaEventListener

        }
    }

    private void initProcessActivationListener() {
        addEventListener( new DefaultAgendaEventListener() {
            public void activationCreated(ActivationCreatedEvent event,
                                          WorkingMemory workingMemory) {
                String ruleFlowGroup = event.getActivation().getRule().getRuleFlowGroup();
                if ( "DROOLS_SYSTEM".equals( ruleFlowGroup ) ) {
                    // new activations of the rule associate with a state node
View Full Code Here

Examples of org.drools.event.DefaultAgendaEventListener

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase( RuleBase.RETEOO );
        ruleBase.addPackage( this.pkg );
        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        final DefaultAgendaEventListener listener = new DefaultAgendaEventListener() {
            private int counter = 0;

            //           public void activationCreated(ActivationCreatedEvent event) {
            //                super.activationCreated( event );
            //                System.out.println( event );
View Full Code Here

Examples of org.drools.event.DefaultAgendaEventListener

        final DefaultAgenda agenda = (DefaultAgenda) workingMemory.getAgenda();

        final Boolean[] filtered = new Boolean[]{false};

        workingMemory.addEventListener( new DefaultAgendaEventListener() {

            public void activationCancelled(ActivationCancelledEvent event,
                                            WorkingMemory workingMemory) {
                if ( event.getCause() == MatchCancelledCause.FILTER ) {
                    filtered[0] = true;
View Full Code Here

Examples of org.drools.event.DefaultAgendaEventListener

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase( RuleBase.RETEOO );
        ruleBase.addPackage( this.pkg );
        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        final DefaultAgendaEventListener listener = new DefaultAgendaEventListener() {
            private int counter = 0;

            //           public void activationCreated(ActivationCreatedEvent event) {
            //                super.activationCreated( event );
            //                System.out.println( event );
View Full Code Here

Examples of org.drools.event.DefaultAgendaEventListener

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase( RuleBase.RETEOO );
        ruleBase.addPackage( this.pkg );
        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        final DefaultAgendaEventListener listener = new DefaultAgendaEventListener() {
            private int counter = 0;

            //           public void matchCreated(ActivationCreatedEvent event) {
            //                super.matchCreated( event );
            //                System.out.println( event );
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.