[rules-users] Ruleflows

Kris Verlaenen kris.verlaenen at cs.kuleuven.be
Mon Apr 14 09:25:59 EDT 2008


A RuleFlow simply makes sure your rules are evaluated in a specific order.  Both strategies are possible, but I believe there are some small differences:
 - If you first insert all your debts and then activate the ruleflow, all orders will progress through the ruleflow at the same time (e.g. first apply all rules of set1 and then set2).  If you would use separate ruleflows per debt, each debt can be handled independently.
 - It will sometimes be harder to identify one specific debt if you insert all your debts at once
I think using a separate ruleflow for each of the orders would be the best solution here, as each debt can and will be handled independently (you could have multiple working memories working in parallel to handle the load).

If you want to make sure only one rule gets activated in a specific ruleflow group, you can, as already stated earlier, use an activation group.  This will make sure only one of the rules in that activation group will be executed for that debt.  You could also manually deactivate the ruleflow-group in the rule consequence (using drools.getWorkingMemory().getAgenda().deactivateRuleFlowGroup("name")), but I would suggest using activation groups if possible (as they are more powerful and built for these kinds of things specifically).

Kris

  ----- Original Message ----- 
  From: Jonathan Guéhenneux 
  To: Rules Users List 
  Sent: Thursday, April 10, 2008 12:36 PM
  Subject: [rules-users] Ruleflows


  Hi,

  I have to compute the gravity of a debt according to a set of rules organized in a ruleflow. I will have to process about ten thousands debts every minute.
  There is no dependency between the debts. All the rules are applied to one debt.

  What is the best strategy?

  - Insert all the debts, and start the ruleflow process
   or
  - (Insert one debt, start the ruleflow process) for each debt

  Another question:

  If a rule "r1" in the ruleflow group "rfg1" is fired on a debt "d1", can a second rule "r2" in the same ruleflow group be fired on the same debt "d1"?


------------------------------------------------------------------------------
  Discutez gratuitement avec vos amis en vidéo ! Téléchargez Messenger, c'est gratuit ! 


------------------------------------------------------------------------------


  _______________________________________________
  rules-users mailing list
  rules-users at lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080414/e4edac43/attachment.html 


More information about the rules-users mailing list