Package org.drools.core.common

Examples of org.drools.core.common.PropagationContextImpl


        if (context == null || context.getRuleBase().getConfiguration().isPhreakEnabled() ) {
            return;
        }

        for ( InternalWorkingMemory workingMemory : context.getWorkingMemories() ) {
            final PropagationContext propagationContext = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                                      PropagationContext.RULE_ADDITION,
                                                                                      null,
                                                                                      null,
                                                                                      null );
            this.leftInput.updateSink( this,
View Full Code Here


        if (context == null || context.getRuleBase().getConfiguration().isPhreakEnabled() ) {
            return;
        }

        for ( InternalWorkingMemory workingMemory : context.getWorkingMemories() ) {
            final PropagationContext propagationContext = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                                      PropagationContext.RULE_ADDITION,
                                                                                      null,
                                                                                      null,
                                                                                      null );
            this.leftInput.updateSink( this,
View Full Code Here

        // we need to call updateSink on Rete, because someone
        // might have already added facts matching this ObjectTypeNode
        // to working memories
        for ( InternalWorkingMemory workingMemory : context.getWorkingMemories() ) {
            final PropagationContextImpl propagationContext = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                                          PropagationContext.RULE_ADDITION,
                                                                                          null,
                                                                                          null,
                                                                                          null );
            propagationContext.setEntryPoint( ((EntryPointNode) this.source).getEntryPoint() );
            this.source.updateSink( this,
                                    propagationContext,
                                    workingMemory );
        }
    }
View Full Code Here

                }
            } else {
                // retract
                // we can't use the expiration context here, because it wouldn't cancel existing activations
                // however, isAllowed is false so activations should not fire
                PropagationContext cancelContext = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                               org.kie.api.runtime.rule.PropagationContext.DELETION,
                                                                               (Rule) context.getRule(),
                                                                               context.getLeftTupleOrigin(),
                                                                               (InternalFactHandle) context.getFactHandle() );
                this.sink.propagateRetractLeftTuple( leftTuple,
View Full Code Here

        if (context == null || context.getRuleBase().getConfiguration().isPhreakEnabled() ) {
            return;
        }

        for ( InternalWorkingMemory workingMemory : context.getWorkingMemories() ) {
            final PropagationContext propagationContext = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
                                                                                      PropagationContext.RULE_ADDITION,
                                                                                      null,
                                                                                      null,
                                                                                      null );
            getLeftTupleSource().updateSink( this, propagationContext, workingMemory );
View Full Code Here

        if (context == null || context.getRuleBase().getConfiguration().isPhreakEnabled() ) {
            return;
        }

        for ( InternalWorkingMemory workingMemory : context.getWorkingMemories() ) {
            final PropagationContext propagationContext = new PropagationContextImpl(workingMemory.getNextPropagationIdCounter(),
                    PropagationContext.RULE_ADDITION,
                    null,
                    null,
                    null);
View Full Code Here

    public RightBuilder insert(Object... objects) {
        for ( Object object : objects ) {
            InternalFactHandle fh = (InternalFactHandle) wm.insert( object );
            RightTuple rightTuple =  new RightTuple( fh, sink );
            rightTuple.setPropagationContext( new PropagationContextImpl() );
            rightTuples.addInsert( rightTuple );
        }
        return this;
    }
View Full Code Here

    public RightBuilder update(Object... objects) {
        for ( Object object : objects ) {
            InternalFactHandle fh = (InternalFactHandle) wm.insert( object );
            RightTuple rightTuple = fh.getFirstRightTuple();
            rightTuple.setPropagationContext( new PropagationContextImpl() );
            rightTuples.addUpdate( rightTuple );
        }
        return this;
    }
View Full Code Here

    public RightBuilder delete(Object... objects) {
        for ( Object object : objects ) {
            InternalFactHandle fh = (InternalFactHandle) wm.insert( object );
            RightTuple rightTuple = fh.getFirstRightTuple();
            rightTuple.setPropagationContext( new PropagationContextImpl() );
            rightTuples.addDelete( rightTuple );
        }
        return this;
    }
View Full Code Here

       

        final AgendaItem item = new AgendaItem( 0,
                                                tuple,
                                                10,
                                                new PropagationContextImpl( 1,
                                                                            1,
                                                                            null,
                                                                            tuple,
                                                                            null ),
                                                new RuleTerminalNode(0, new CompositeObjectSinkAdapterTest.MockBetaNode(), context.getRule(), subrule, 0, new BuildContext( (InternalRuleBase) ruleBase, null )), null);
View Full Code Here

TOP

Related Classes of org.drools.core.common.PropagationContextImpl

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.