[rules-users] How to prevent activation list creation onretracts

Anstis, Michael (M.) manstis1 at ford.com
Thu Sep 17 04:00:28 EDT 2009


Can I just clarify that you *need* truth maintenance on the inserts but not on the retractions?
 

-----Original Message-----
From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Greg Barton
Sent: 16 September 2009 21:28
To: Rules Users List
Subject: Re: [rules-users] How to prevent activation list creation onretracts

You can't have concurrent threads, each with a session?  

Or do you need all transactions processed serially?  Also, can you process simultaneous transactions in the same working memory without retracting objects from the previous one?  Objects from previous transactions could then be cleaned up by low priority rules that ran between transactions. (Of course, there's potential memory build up problems involved with that, but that can be mediated.  A high priority rule could kick in if there are too many completed transactions hanging around.)

You could call halt() then clearAgenda() on the session when you're done with a transaction, then retract all objects.  Maybe that will be faster.  Having the agenda clear might make it faster because there would be no activations to check against the retracted objects. (Though it would still have to remove them from the rete node memories.)  That's just a guess, though.

--- On Wed, 9/16/09, Scott Burrows <scottjburrows at gmail.com> wrote:

> From: Scott Burrows <scottjburrows at gmail.com>
> Subject: Re: [rules-users] How to prevent activation list creation on retracts
> To: "Rules Users List" <rules-users at lists.jboss.org>
> Date: Wednesday, September 16, 2009, 2:00 PM
> Thanks Greg but I have tried that, creating
> a newstatefulsession is slowish, taking around 800
> milliseconds to do.  When milliseconds count 800 is too
> long.  It's faster to do the retracts, they take about
> 400 millis.
> 
> 
> Someone showed a command or configuration recently that
> tells workingmemory not to re-eval the rules.  I'm
> looking for that switch or something equivalent.
> 
> Our system is a live transaction system.  The trans need
> to be  completed and ready for the next one in under a
> second.
> 
> 
> Scott
> 
> 
> 
> On Wed, Sep 16, 2009 at 2:06 PM,
> Greg Barton <greg_barton at yahoo.com>
> wrote:
> 
> Dispose of your session and create another.
> 
> 
> 
> --- On Wed, 9/16/09, Scott Burrows <scottjburrows at gmail.com>
> wrote:
> 
> 
> 
> > From: Scott Burrows <scottjburrows at gmail.com>
> 
> > Subject: [rules-users] How to prevent activation list
> creation on retracts
> 
> > To: "Rules Users List" <rules-users at lists.jboss.org>
> 
> > Date: Wednesday, September 16, 2009, 12:50 PM
> 
> > I think this question
> was asked recently
> 
> > but I cant seem to find it.
> 
> >
> 
> > Using 4.0.7
> 
> >
> 
> > I have a large number of facts I need to retract from
> 
> > working memory after all rules have been processed
> 
> > (transaction is completed) so I can insert new facts
> for the
> 
> > next transaction.  Milliseconds count.
> 
> >
> 
> >
> 
> > I know that drools recalc's which rules are
> eligible to
> 
> > be run after each retraction.  Since all facts are
> being
> 
> > removed its unneeded processing and time that could
> be
> 
> > saved.
> 
> >
> 
> > How can I tell drools that until I tell it otherwise
> do not
> 
> > re-evaluate the rules to save time?
> 
> >
> 
> >
> 
> > Scott
> 
> >
> 
> >
> 
> >
> 
> >
> 
> > -----Inline Attachment Follows-----
> 
> >
> 
> > _______________________________________________
> 
> > 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
> 
> 
> 
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> 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




More information about the rules-users mailing list