| Summary: | update(fact) doesn't work in ruleflow | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | nwallace <nwallace> |
| Component: | unspecified | Assignee: | Kris Verlaenen <kris.verlaenen> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | urgent | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Target Release: | 5.0.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/BRMS-178 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-09-01 12:27:45 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
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 |
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