Hide Forgot
Date of First Response: 2009-09-10 01:29:29 Workaround: Workaround Exists Workaround Description: As a workaround one can do (in a on-exit action): drools.getIdentityMap().put(someFact, drools.getWorkingMemory().getFactHandle(someFact)); and then it is safe to call update(someFact); securitylevel_name: Public Hi, org.drools.base.DefaultKnowledgeHelper uses newly added identityMap to keep track of fact handles. It looks like this identityMap is updated before a rule's consequence is called. However it is not updated before a Drools Flow on-exit action. This means that calling update(someFact) in a on-exit ruleflow action causes exception ("org.drools.FactException: Update error: handle not found for object: XXXXX. Is it in the working memory?"). this was tested on drools-core-5.0.0.20090417.044049-485.jar Thanking you in advance. Best Regards, Michal
Link: Added: This issue is related to JBRULES-2077
Fix in place.
For documenting this in the Release Notes, can you please confirm the following and fill in the missing information. Dot point explanations are fine: The CAUSE (what was actually broken) * the org.drools.base.DefaultKnowledgeHelper's identityMap was not updating before a Drools Flow "on-exit action" occurred. CONSEQUENCES of the bug (how it impacts users.) * This meant that calling update(someFact) in an on-exit ruleflow action caused an exception error. The FIX (what was changed to eliminate this bug) and * RESULTS of the fix (what now happens for users.) *
We are still awaiting the outstanding information for the Release Notes on this one. Please provide it as soon as possible. Thanks.
The CAUSE (what was actually broken) * the org.drools.base.DefaultKnowledgeHelper's identityMap was not updating before a Drools Flow "on-exit action" occurred. CONSEQUENCES of the bug (how it impacts users.) * This meant that calling update(someFact) in an on-exit ruleflow action caused an exception error. The FIX (what was changed to eliminate this bug) and * making sure the identityMap is updated before on-exit actions are called RESULTS of the fix (what now happens for users.) * update(fact) can now also be used in on-exit actions