You won't - not till JSR94 update the spec. Now you are starting to see why the Drools team have always said to stay away from JSR94, its completely pointless. We only support it as idiot managers who really don't have a clue insist on using JSR94.

Mark

Juergen wrote:
While Drools 3 WorkingMemory does now support logical assertion of objects, there is yet no way to choose which assertion function is used via JSR 94 addObject (its currently non-logical, non-dynamic).

When can we expect support for some kind of properties in org.drools.jsr94.rulesRuleRuntimeImpl.createRuleSession to set assertion parameters? like { org.drools.jsr94.rules.assertLogical=TRUE|FALSE, org.drools.jsr94.rules.assertDynamic=TRUE|FALSE }. At best the properties would be re-read in addObject/addObjects, so it would be possible to change assertion behaviour during a stateful rule session.

Thanks, Juergen

Michael Neale wrote:
Short answer, not easily with Drools 2. But yes, with Drools 3.

On 3/22/06, Juergen <[EMAIL PROTECTED]> wrote:

I recently looked into drools after experimenting with JESS and got a
few questions I could not look up in the drools documentation:

- Exists a condition to test for non-existence of a matching
object/fact?
-- If yes, how to use it for own domain specific language conditions

- How is sharing of conditions/nodes between productions implemented in
drools, one of the main benefits of the rete algorithm?
-- How is the equality of conditions defined for java smf? via textual
equality of the condition's java code?
-- How can equality of conditions for sharing be defined for domain
specific language conditions?
e.g. Conway's game of life (slightly modified dsl)
<rule name="kill the overcrowded">
       <conway:cellIsAlive cellName="cell"/>
       <conway:cellIsOverCrowded cellName="cell"/>
       <conway:killCell cellName="cell"/>
</rule>
<rule name="kill the lonely">
       <conway:cellIsAlive cellName="cell"/>
       <conway:cellIsLonely cellName="cell"/>
       <conway:killCell cellName="cell"/>
</rule>

The conway:cellIsAlive condition could be shared between these two
productions. Would it?

- When will the properties map be supported in drools implementation of
JSR 94 javax.rules API?
-- e.g. to be able to set conflict resolver of a rule base and other
settings that can be set via drools native API

- Can object equality for assertion be customized?
-- Currently, org.drools.util.IdentityMap
(org.drools.reteoo.WorkingMemoryImpl) makes use of
System.identityHashCode(). There seems to be no way to customize that,
e.g. make drools use equals() instead, neither via native nor JSR 94
API.

My apologies if some questions have already been answered in other
postings, I made no thorough search in this newsgroup yet.

Thanks a lot, Juergen




Reply via email to