[jboss-jira] [JBoss JIRA] (DROOLS-1654) Don'ing a Map-Based Fact Loses the Fact
KimJohn Quinn (JIRA)
issues at jboss.org
Sat Jul 8 10:59:00 EDT 2017
[ https://issues.jboss.org/browse/DROOLS-1654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433156#comment-13433156 ]
KimJohn Quinn edited comment on DROOLS-1654 at 7/8/17 10:58 AM:
----------------------------------------------------------------
I've documented more details on Google Groups @ https://groups.google.com/forum/?fromgroups=#!topic/drools-usage/S27hlbLoXeM.
I have attached my latest DRL test files. The test case is relatively the same with the exception of passing in my custom map, a class, or just a HashMap directly.
It seems that if I use a HashMap directly I can make progress but after don'ing I have 2 map facts in WM vs. the 1 I would expect.
Output using a Map directly:
{quote}Rule 1
Rule 2A: 1.0 (before don)
Rule 2B: 1.0 (after don)
Rule 2C: 1.0
Rule 2D: 1
Rule 3: 1.0
Rule 3A: 2
Rule 4A: 2.0
Rule 4B: 1.0
Rule 4A: 2.0
Rule 4B: 1.0
Rule 5: 3.0
Rule 3: 1.0
Rule 3A: 2
Rule 4A: 2.0
Rule 4B: 1.0
*Model: 2*
Trait: 1{quote}
At this point, I am completely out of ideas...
was (Author: kj.quinn):
I've documented more details on Google Groups @ https://groups.google.com/forum/?fromgroups=#!topic/drools-usage/S27hlbLoXeM.
I have attached my latest DRL test files. The test case is relatively the same with the exception of passing in my custom map, a class, or just a HashMap directly.
It seems that if I use a HashMap directly I can make progress but after don'ing I have 2 map facts in WM vs. the 1 I would expect.
At this point, I am completely out of ideas...
> Don'ing a Map-Based Fact Loses the Fact
> ---------------------------------------
>
> Key: DROOLS-1654
> URL: https://issues.jboss.org/browse/DROOLS-1654
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.0.0.Final
> Environment: * Alpine Linux (in a Docker container)
> * Oracle JDK 8
> * Drools 7.0.0.Final
> * Spring Boot v1.5.4.RELEASE (though testing without any Spring)
> Reporter: KimJohn Quinn
> Assignee: Mario Fusco
> Labels: traits
> Attachments: TraitDonningTest.java, traits-with-class.drl, traits-with-maps.drl, traits-with-model.drl, traits.drl
>
>
> It appears that after don'ing the trait the map-based fact it is proxying disappears (or gets retracted).
> There does not seem to be any issue using the trait properties to access the model properties.
> We are trying to use the model, mostly for constraints and updates, then within the rules apply and use traits to give us a stronger-typed fact and easier rule constraining.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list