private void assertEntryPointIdExists(final String entryPointIdName) { final Optional<EntryPointId> entryPointId = ruleUnitDescr.getEntryPointId(entryPointIdName); Assert.assertTrue(entryPointId.isPresent()); Assert.assertEquals(TestRuleUnit.class.getName() + "." + entryPointIdName, entryPointId.get().getEntryPointId()); }
kBase.getConfiguration().isMultithreadEvaluation(), rete, new EntryPointId( "xxx" ) );
String entryPoint = handle.getEntryPoint().getEntryPoint().getEntryPointId(); if ( entryPoint != null && !entryPoint.equals( "" ) ) { stream.writeBoolean( true );
@Before public void setUp() { InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase(); ksession = (StatefulKnowledgeSessionImpl)kBase.newKieSession(); tms = ((NamedEntryPoint)ksession.getWorkingMemoryEntryPoint( EntryPointId.DEFAULT.getEntryPointId() ) ).getTruthMaintenanceSystem(); }
ksession.getObjects().size() ); TruthMaintenanceSystem tms = ((NamedEntryPoint)ksession.getEntryPoint(EntryPointId.DEFAULT.getEntryPointId()) ).getTruthMaintenanceSystem();
list.size() ); TruthMaintenanceSystem tms = ((NamedEntryPoint)ksession.getEntryPoint(EntryPointId.DEFAULT.getEntryPointId()) ).getTruthMaintenanceSystem();
NamedEntryPoint nep = ( (NamedEntryPoint) kSession.getEntryPoint( EntryPointId.DEFAULT.getEntryPointId() ) ); ObjectTypeNode otn = nep.getEntryPointNode().getObjectTypeNodes().get( new ClassObjectType( Entity.class ) ); assertNotNull( otn );
if ( epNode.getEntryPoint().getEntryPointId().equals( "DEFAULT" ) ) { defaultEntryPointNode = epNode; break;
list.size() ); TruthMaintenanceSystem tms = ((NamedEntryPoint)ksession.getEntryPoint(EntryPointId.DEFAULT.getEntryPointId()) ).getTruthMaintenanceSystem(); assertTrue(tms.getEqualityKeyMap().isEmpty()); } finally {
@Test(timeout=10000) public void testLogicalInsertOrder() throws Exception { // JBRULES-1602 // "rule 1" is never logical inserted, as it's rule is unmatched prior to calling logical insert KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory.newClassPathResource( "test_LogicalInsertOrder.drl", getClass() ), ResourceType.DRL ); InternalKnowledgeBase kbase = (InternalKnowledgeBase) getKnowledgeBase(); kbase.addPackages( kbuilder.getKnowledgePackages() ); kbase = SerializationHelper.serializeObject(kbase); final KieSession session = createKnowledgeSession(kbase); try { RuleRuntimeEventListener wmel = mock( RuleRuntimeEventListener.class ); session.addEventListener( wmel ); Person bob = new Person( "bob" ); bob.setStatus( "hungry" ); Person mark = new Person( "mark" ); mark.setStatus( "thirsty" ); session.insert( bob ); session.insert( mark ); int count = session.fireAllRules(); assertEquals( 2, count ); assertEquals(2, session.getObjects().size()); TruthMaintenanceSystem tms = ((NamedEntryPoint)session.getEntryPoint(EntryPointId.DEFAULT.getEntryPointId()) ).getTruthMaintenanceSystem(); assertTrue(tms.getEqualityKeyMap().isEmpty()); } finally { session.dispose(); } }
String entryPoint = ((InternalWorkingMemoryEntryPoint) handle.getEntryPoint()).getEntryPoint().getEntryPointId(); if ( entryPoint != null && !entryPoint.equals( "" ) ) { stream.writeBoolean( true );
StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newKieSession(); final TruthMaintenanceSystem tms = ((NamedEntryPoint)ksession.getWorkingMemoryEntryPoint(EntryPointId.DEFAULT.getEntryPointId()) ).getTruthMaintenanceSystem(); final String string = "test";
if ( epNode.getEntryPoint().getEntryPointId().equals( "DEFAULT" ) ) { defaultEntryPointNode = epNode; break;
TruthMaintenanceSystem tms = ((NamedEntryPoint)ksession.getWorkingMemoryEntryPoint( EntryPointId.DEFAULT.getEntryPointId() ) ).getTruthMaintenanceSystem();
TruthMaintenanceSystem tms = ((NamedEntryPoint)ksession.getWorkingMemoryEntryPoint( EntryPointId.DEFAULT.getEntryPointId() ) ).getTruthMaintenanceSystem();
TruthMaintenanceSystem tms = ((NamedEntryPoint)ksession.getWorkingMemoryEntryPoint( EntryPointId.DEFAULT.getEntryPointId() ) ).getTruthMaintenanceSystem();