Examples of update()


Examples of org.drools.core.common.InternalWorkingMemoryActions.update()

        final Activation item = ((ActivationCreatedEvent) created.get( 2 ))
                .getActivation();

        // simulate a modify inside a consequence
        wm.update( stiltonHandle, stilton, Long.MAX_VALUE, Object.class, item );

        // with true modify, no reactivations should be triggered
        assertEquals( 3, created.size() );
        assertEquals( 0, cancelled.size() );
    }
View Full Code Here

Examples of org.drools.core.impl.StatefulKnowledgeSessionImpl.update()

        assertTrue( eval.isAllowed( tuple,
                                    ksession,
                                    evalContext ) );

        cheddar.setPrice( 9 );
        ksession.update( f0,
                   cheddar );
        assertFalse( eval.isAllowed( tuple,
                                     ksession,
                                     evalContext ) );
    }
View Full Code Here

Examples of org.drools.core.reteoo.ReteooWorkingMemoryInterface.update()

        assertNull( fh1.getFirstLeftTuple() );
        assertNull( fh1.getLastLeftTuple() );
        assertNull( fh2.getFirstLeftTuple() );
        assertNull( fh2.getLastLeftTuple() );
        wm.update( fh1,a1 );
        wm.update( fh2,a2 );
        wm.fireAllRules();

        assertEquals( 0, list.size() );
    }
View Full Code Here

Examples of org.drools.core.reteoo.RuleTerminalNodeLeftTuple.update()

                if (!rtnLeftTuple.isQueued() ) {
                    // not queued, so already fired, so it's effectively recreated
                    EventSupport es = (EventSupport) wm;
                    es.getAgendaEventSupport().fireActivationCreated(rtnLeftTuple, wm);

                    rtnLeftTuple.update(salienceInt, pctx);
                    executor.addLeftTuple(leftTuple);
                }
            }

        } else {
View Full Code Here

Examples of org.drools.core.spi.KnowledgeHelper.update()

        if (modificationMask.isSet(PropertySpecificUtil.TRAITABLE_BIT)) {
            calculateModificationMask(knowledgeHelper, (WithNode)node);
        }

        knowledgeHelper.update(value, modificationMask, value.getClass());
        return 0;
    }

    private void calculateModificationMask(KnowledgeHelper knowledgeHelper, WithNode node) {
        Class<?> nodeClass = node.getEgressType();
View Full Code Here

Examples of org.drools.persistence.info.WorkItemInfo.update()

       
        PersistenceContext context = ((PersistenceContextManager) env.get( EnvironmentName.PERSISTENCE_CONTEXT_MANAGER )).getCommandScopedPersistenceContext();
        context.persist( workItemInfo );

        ((WorkItemImpl) workItem).setId(workItemInfo.getId());
        workItemInfo.update();
       
        if (this.workItems == null) {
            this.workItems = new HashMap<Long, WorkItemInfo>();
        }
        workItems.put(workItem.getId(), workItemInfo);
View Full Code Here

Examples of org.drools.reteoo.ReteooWorkingMemoryInterface.update()

        // each x is blocker in turn up to x99
        for ( int i = 0; i < 99; i++ ) {
            fh = peeps.get("x" + i);
            p = (Person) fh.getObject();
            p.setAge( 90 );
            wm.update( fh, p );
            assertEquals( "i=" + i, 1, map.get("inserted").intValue() );
        }

        // x99 is still the blocker, everything else is just added
        for ( int i = 0; i < 99; i++ ) {
View Full Code Here

Examples of org.drools.runtime.KnowledgeRuntime.update()

                }               
            }
        }
        if (isInversionOfControl()) {
            KnowledgeRuntime kruntime = ((ProcessInstance) getProcessInstance()).getKnowledgeRuntime();
            kruntime.update(kruntime.getFactHandle(this), this);
        } else {
            triggerCompleted();
        }
    }
 
View Full Code Here

Examples of org.drools.runtime.StatefulKnowledgeSession.update()

        session.retract( handle );

        handle = session.insert( new MyObject( "myObj2" ) );

        session.update( handle,
                        new MyObject( "myObj3" ) );

        fired = session.fireAllRules();

        remoteN1.dispose();
View Full Code Here

Examples of org.drools.runtime.rule.WorkingMemoryEntryPoint.update()

       
        Object object = wmep.getObject( this.handle );
        MVEL.eval( getMvelExpr(),
                   object );

        wmep.update( handle,
                        object );
        return object;
    }

    public FactHandle getFactHandle() {
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.