[rules-users] equality-based assert behavior and findFactHandle

Edson Tirelli tirelli at post.com
Mon Oct 29 17:40:53 EDT 2007


   Thanks. Marked it as released.

2007/10/29, Adam Lewandowski <adam at alewando.com>:
>
> Done. JIRA-1308 (http://jira.jboss.com/jira/browse/JBRULES-1308).
>
> BTW, version 4.0.3 showed up under 'Unreleased Versions'
>
> Edson Tirelli wrote:
> >
> >     Adam,
> >
> >     Yes, you are right. I'm not sure why it uses the identity map
> > instead of assert map, but maybe we should change that or at least
> > providing an alternative method for that. May I ask you please to open
> > a JIRA for it?
> >
> >     Mark, are you ok with changing the behavior?
> >
> >     []s
> >     Edson
> >
> >
> > 2007/10/29, Adam Lewandowski <adam at alewando.com
> > <mailto:adam at alewando.com>>:
> >
> >     If I set my rule base to use equality-based assert behavior, I'm
> >     expecting to be able to use the getFactHandle(object) method to
> >     retrieve
> >     a previously asserted fact by providing an equivalent (by equals()
> and
> >     hashCode()) object as an argument. This appears to not be the case,
> as
> >     AbstractWorkingMemory uses it's identityMap and associated
> >     IdentityAssertMapComparator to do the getFactHandle lookup instead
> of
> >     the assertMap and EqualityAssertMapComparator. This causes the
> >     lookup to
> >     be done with the system hashCode() method and not the overridden
> >     version
> >     supplied in my fact class. The lookup thus fails and returns null.
> >
> >     Is there a way to have getFactHandle or some equivalent code do what
> I
> >     want? This is with 4.0.3.
> >
> >     Thanks,
> >     Adam Lewandowski
> >     _______________________________________________
> >     rules-users mailing list
> >     rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
> >     https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
> >
> >
> > --
> >   Edson Tirelli
> >   Software Engineer - JBoss Rules Core Developer
> >   Office: +55 11 3529-6000
> >   Mobile: +55 11 9287-5646
> >   JBoss, a division of Red Hat @ www.jboss.com <http://www.jboss.com>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071029/369b9cd1/attachment.html 


More information about the rules-users mailing list