This sequence of statements disagrees with the documentation:<br><br> WorkingMemoryEntryPoint entryPoint = kSession.getWorkingMemoryEntryPoint( "epn" );<br> FactHandle fh = entryPoint.insert( fact );<br> kSession.update( fh, fact ); // should be done using entryPoint.update<br>
<br>But this causes (in 5.1.1) a NPE <br>Exception in thread "main" java.lang.NullPointerException<br> at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1379)<br> at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1338)<br>
at org.drools.impl.StatefulKnowledgeSessionImpl.update(StatefulKnowledgeSessionImpl.java:266)<br> at event.Main.execute(Main.java:153)<br> at event.Main.main(Main.java:164)<br><br>This is the line: <br> if ( this.maintainTms ) {<br>
status = ((InternalFactHandle) factHandle).getEqualityKey().getStatus();<br> }<br><br>and similar code can be found in trunk, so I suppose this is still possible.<br><br>-W<br><br>