Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
How to set the access right? I don't see any other option except Upload File -- View this message in context: http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025091.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
[Sorry - something distracted my attention real good.] The example is running perfectly fine, both tests, and using 5.2.0 or 5.5.0. As to style: * Patterns should not be based on values stored in a global. There are too many subtle issues for this to work reliably. * not exists(...) is poor style - not alone is the negated existential quantifier, so omit the exists. (This doesn't cause any problems - Drools removes the exists for you.) -W On 23/07/2013, Sammi sammi_t...@yahoo.com.hk wrote: How to set the access right? I don't see any other option except Upload File -- View this message in context: http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025091.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
Have you tried to amend the file on the fly during runtime? It's running fine but failed to compile for any ad-hoc amendment. -- View this message in context: http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025095.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
Yes, I can reproduce this by running the second test bug2.execute(). Happens up to 5.3.0, gone in 5.4.0 and later. -W On 23/07/2013, Sammi sammi_t...@yahoo.com.hk wrote: Have you tried to amend the file on the fly during runtime? It's running fine but failed to compile for any ad-hoc amendment. -- View this message in context: http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025095.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Change Notification doesn't work with eval(true) in one of the rules
All the rules defined in a single DRL were running fine until one day we added eval(manager.isEnabledSomeSettings()) into one of the rule in drl, which causing an issue for change update on the fly (see below error stacks). When we changed that eval to Boolean(this == Boolean.TRUE) from manager.isEnabledSomeSettings() then the change notification getting back to work properly. Any ideas? KnowledgeAgent adding KnowledgeDefinitionsPackage com.baml.investxa.rule.order Exception in thread Thread-15 java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796) at java.util.HashMap$EntryIterator.next(HashMap.java:834) at java.util.HashMap$EntryIterator.next(HashMap.java:832) at org.drools.reteoo.EvalConditionNode.doRemove(EvalConditionNode.java:311) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:372) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.RightInputAdapterNode.doRemove(RightInputAdapterNode.java:254) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:368) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:429) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:232) at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:414) at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:836) at org.drools.common.AbstractRuleBase.mergePackage(AbstractRuleBase.java:628) at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:541) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:427) at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:434) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1031) at org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:909) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:648) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:192) at org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1202) at java.lang.Thread.run(Thread.java:662) Exception in thread Thread-22 java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796) at java.util.HashMap$EntryIterator.next(HashMap.java:834) at java.util.HashMap$EntryIterator.next(HashMap.java:832) at org.drools.reteoo.EvalConditionNode.doRemove(EvalConditionNode.java:311) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:372) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.RightInputAdapterNode.doRemove(RightInputAdapterNode.java:254) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:368) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:429) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:232) at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:414) at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:836) at org.drools.common.AbstractRuleBase.mergePackage(AbstractRuleBase.java:628) at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:541) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:427) at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:434) at
Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
On 22/07/2013, Sammi sammi_t...@yahoo.com.hk wrote: All the rules defined in a single DRL were running fine until one day we added eval(manager.isEnabledSomeSettings()) into one of the rule in drl, which causing an issue for change update on the fly (see below error stacks). When we changed that eval to Boolean(this == Boolean.TRUE) from manager.isEnabledSomeSettings() then the change notification getting back to work properly. Any ideas? Yes: provide a complete (!) example demonstrating this effect, and don't forget to add the Drools version. -W KnowledgeAgent adding KnowledgeDefinitionsPackage com.baml.investxa.rule.order Exception in thread Thread-15 java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796) at java.util.HashMap$EntryIterator.next(HashMap.java:834) at java.util.HashMap$EntryIterator.next(HashMap.java:832) at org.drools.reteoo.EvalConditionNode.doRemove(EvalConditionNode.java:311) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:372) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.RightInputAdapterNode.doRemove(RightInputAdapterNode.java:254) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:368) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:429) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:232) at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:414) at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:836) at org.drools.common.AbstractRuleBase.mergePackage(AbstractRuleBase.java:628) at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:541) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:427) at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:434) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1031) at org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:909) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:648) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:192) at org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1202) at java.lang.Thread.run(Thread.java:662) Exception in thread Thread-22 java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796) at java.util.HashMap$EntryIterator.next(HashMap.java:834) at java.util.HashMap$EntryIterator.next(HashMap.java:832) at org.drools.reteoo.EvalConditionNode.doRemove(EvalConditionNode.java:311) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:372) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.RightInputAdapterNode.doRemove(RightInputAdapterNode.java:254) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:368) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.FromNode.doRemove(FromNode.java:390) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:429) at org.drools.common.BaseNode.remove(BaseNode.java:105) at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:232) at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:414) at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:836) at org.drools.common.AbstractRuleBase.mergePackage(AbstractRuleBase.java:628) at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:541) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:427) at
Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
Version is 5.2.0.Final I am using. I am not able to reproduce the issue when I wrote a small test to simulate the problem. But really by changing the line from eval(...) to Boolean(this == Boolean.TRUE) then the issue was gone. The problematic programs are too complicated to be shown here, and it's not appropriate as there are business logic in it. What might be the issue causing this? if anyone could shed some light It would be greatly appreciated... -- View this message in context: http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025069.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
Try some later version. 5.2.0 was the version after a major rework, and your problem might disappear using 5.[345].0 etc. If this doesn't help, consider posting the rule, after systematically obfuscating app-specific names *without removing anything*. -W On 22/07/2013, Sammi sammi_t...@yahoo.com.hk wrote: Version is 5.2.0.Final I am using. I am not able to reproduce the issue when I wrote a small test to simulate the problem. But really by changing the line from eval(...) to Boolean(this == Boolean.TRUE) then the issue was gone. The problematic programs are too complicated to be shown here, and it's not appropriate as there are business logic in it. What might be the issue causing this? if anyone could shed some light It would be greatly appreciated... -- View this message in context: http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025069.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
Replacing eval( true) with Boolean( this == Boolean.TRUE ) results in a different network configuration: the former requires an EvalNode, the latter a JoinNode. A few issues with EvalNode dynamic additions/removals have been found and fixed over time, including one that was found last week. Please do check with later versions. Davide p.s. there may be more robust ways to control which rules are enabled or not at a given moment. On 07/22/2013 11:37 AM, Wolfgang Laun wrote: Try some later version. 5.2.0 was the version after a major rework, and your problem might disappear using 5.[345].0 etc. If this doesn't help, consider posting the rule, after systematically obfuscating app-specific names *without removing anything*. -W On 22/07/2013, Sammi sammi_t...@yahoo.com.hk wrote: Version is 5.2.0.Final I am using. I am not able to reproduce the issue when I wrote a small test to simulate the problem. But really by changing the line from eval(...) to Boolean(this == Boolean.TRUE) then the issue was gone. The problematic programs are too complicated to be shown here, and it's not appropriate as there are business logic in it. What might be the issue causing this? if anyone could shed some light It would be greatly appreciated... -- View this message in context: http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025069.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
I am able to reproduce it (test_common.drl line 28), could you please confirm an upgrade will fix the issue? Many thanks! -- View this message in context: http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025087.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules
test.zip http://drools.46999.n3.nabble.com/file/n4025089/test.zip -- View this message in context: http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025089.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users