[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2723) Block fireUntilHalt when a fact is inserted/updated/retracted, until all activations in response are complete
Norman Chan (JIRA)
jira-events at lists.jboss.org
Wed Oct 6 02:32:40 EDT 2010
[ https://jira.jboss.org/browse/JBRULES-2723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555452#action_12555452 ]
Norman Chan commented on JBRULES-2723:
--------------------------------------
Posted on Drools mailing list Tue Oct 5 20:27:58 EDT 2010
Norman,
What you say makes sense, but it is not implemented. It is
something I think would be good to have. May I suggest you open a JIRA
for it so we track it?
Meanwhile, the workaround I suggest is that instead of using
fireUntilHalt(), you call fireAllRules() in a loop, either after each
X insertions of every Y seconds, depending on your system's
architecture.
Edson
2010/10/5 Norman C <rent_my_time at yahoo.com>:
>
> Thanks for the suggestions. They all look like good ways to handle the
> situation I described. However, they require modifying all of the rules to
> check for the latch object and its state, which I would prefer not to do and
> doesn't seem like would be necessary.
>
> It seems to me that this is something that Drools can handle internally
> without the rules having to be written this way. Since the rules engine
> processes rules in a single thread, it's a concurrency issue. fireUntilHalt
> should be blocked when a fact is inserted/updated/retracted, until all
> activations as a result of that change in working memory are completed.
>
> Thoughts?
> Block fireUntilHalt when a fact is inserted/updated/retracted, until all activations in response are complete
> -------------------------------------------------------------------------------------------------------------
>
> Key: JBRULES-2723
> URL: https://jira.jboss.org/browse/JBRULES-2723
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core
> Affects Versions: 5.1.1.FINAL
> Reporter: Norman Chan
> Assignee: Mark Proctor
>
> fireUntilHalt starts executing rule consequences as soon as any rule has been activated. This can be a problem if an event insertion, etc causes many rules to be activated in response. The agenda should determine which activated rule is executed first based on rule properties (e.g. salience), but because not all activations are complete when fireUntilHalt starts executing, the rule that is fired first may not be the one that should fire first.
> By blocking fireUntilHalt until all activations in response to a change in working memory are complete, activated rules will be executed in the correct order.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list