Package org.drools.spi

Examples of org.drools.spi.PropagationContext


            out.writeObject( leftTuple );
        }

        public void execute(InternalWorkingMemory workingMemory) {

            final PropagationContext context = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                           PropagationContext.ASSERTION,
                                                                           this.ruleOrigin,
                                                                           this.leftTuple,
                                                                           this.factHandle );
            ReteooRuleBase ruleBase = (ReteooRuleBase) workingMemory.getRuleBase();
            ruleBase.assertObject( this.factHandle,
                                   this.factHandle.getObject(),
                                   context,
                                   workingMemory );
            context.evaluateActionQueue( workingMemory );
        }
View Full Code Here


                    workingMemory.queueWorkingMemoryAction( this );
                    return;
                }

                // if the fact is still in the working memory (since it may have been previously retracted already
                final PropagationContext context = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                               PropagationContext.EXPIRATION,
                                                                               null,
                                                                               null,
                                                                               this.factHandle );

                eventHandle.setExpired( true );
                this.node.retractObject( factHandle,
                                         context,
                                         workingMemory );

                context.evaluateActionQueue( workingMemory );
                // if no activations for this expired event
                if ( eventHandle.getActivationsCount() == 0 ) {
                    // remove it from the object store and clean up resources
                    eventHandle.getEntryPoint().retract( factHandle );
                }
                context.evaluateActionQueue( workingMemory );
            }

        }
View Full Code Here

                .getObjectTypeConf( this.defaultEntryPoint.entryPoint, initialFact );

        this.initialFactHandle = ruleBase.getConfiguration().getComponentFactory().getFactHandleFactoryService().newFactHandle(
                0, initialFact, 0, otc, this, this.defaultEntryPoint );

        final PropagationContext pctx = new PropagationContextImpl( 0,
                                                                    PropagationContext.ASSERTION,
                                                                    null,
                                                                    null ,
                                                                    initialFactHandle,
                                                                    0,
                                                                    0,
                                                                    defaultEntryPoint.getEntryPoint(),
                                                                    context );

        otc.getConcreteObjectTypeNode().assertObject( this.initialFactHandle, pctx, this );
        // ADDED, NOT IN THE ORIGINAL 6.x COMMIT
        pctx.evaluateActionQueue( this );
        ruleBase.unlock();
    }
View Full Code Here

                                                                 new ClassObjectType( Collection.class ),
                                                                 buildContext );
        final MockObjectSink collectionSink = new MockObjectSink();
        collectionOtn.addObjectSink( collectionSink );

        final PropagationContext mockPropagationContext = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                                      PropagationContext.RULE_ADDITION,
                                                                                      null,
                                                                                      null,
                                                                                      null );
View Full Code Here

            out.writeObject( leftTuple );
        }

        public void execute(InternalWorkingMemory workingMemory) {

            final PropagationContext context = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                           PropagationContext.ASSERTION,
                                                                           this.ruleOrigin,
                                                                           this.leftTuple,
                                                                           this.factHandle );
            ReteooRuleBase ruleBase = (ReteooRuleBase) workingMemory.getRuleBase();
View Full Code Here

        }

        public void execute(InternalWorkingMemory workingMemory) {
            if ( this.factHandle.isValid() ) {
                // if the fact is still in the working memory (since it may have been previously retracted already
                final PropagationContext context = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                               PropagationContext.EXPIRATION,
                                                                               null,
                                                                               null,
                                                                               this.factHandle );
                ((EventFactHandle) factHandle).setExpired( true );
View Full Code Here

        if ( activation != null ) {
            // release resources so that they can be GC'ed
            activation.getPropagationContext().releaseResources();
        }
        final PropagationContext propagationContext = new PropagationContextImpl( this.wm.getNextPropagationIdCounter(),
                                                                                  PropagationContext.ASSERTION,
                                                                                  rule,
                                                                                  (activation == null) ? null : (LeftTuple) activation.getTuple(),
                                                                                  handle,
                                                                                  -1,
View Full Code Here

            if ( activation != null ) {
                // release resources so that they can be GC'ed
                activation.getPropagationContext().releaseResources();
            }
            // Nowretract any trace of the original fact
            final PropagationContext propagationContext = new PropagationContextImpl( this.wm.getNextPropagationIdCounter(),
                                                                                      PropagationContext.MODIFICATION,
                                                                                      rule,
                                                                                      (activation == null) ? null : (LeftTuple) activation.getTuple(),
                                                                                      handle,
                                                                                      -1,
View Full Code Here

            if ( activation != null ) {
                // release resources so that they can be GC'ed
                activation.getPropagationContext().releaseResources();
            }
            final PropagationContext propagationContext = new PropagationContextImpl( this.wm.getNextPropagationIdCounter(),
                                                                                      PropagationContext.RETRACTION,
                                                                                      rule,
                                                                                      (activation == null) ? null : (LeftTuple) activation.getTuple(),
                                                                                      handle,
                                                                                      -1,
View Full Code Here

            if ( activation != null ) {
                // release resources so that they can be GC'ed
                activation.getPropagationContext().releaseResources();
            }
            // Nowretract any trace of the original fact
            final PropagationContext propagationContext = new PropagationContextImpl( this.wm.getNextPropagationIdCounter(),
                                                                                      PropagationContext.MODIFICATION,
                                                                                      rule,
                                                                                      (activation == null) ? null : (LeftTuple) activation.getTuple(),
                                                                                      handle,
                                                                                      -1,
View Full Code Here

TOP

Related Classes of org.drools.spi.PropagationContext

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.