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] Getting deadlock-like thread state
Hey drools users, I'm running drools multiple times in parallel with ECJ (genetic algorithm framework). Also I'm running ECJ multiple times in parallel (evaluation purpose). But each time I want to run ECJ, after an unspecific time, one thread is running infinite long while ECJ waits for it to finish. Additionally to this my working memory is steadily growing while hanging in this deadlock-like state, though this might not be due to drools. This goes on until I get an gc out of memory exception. I've created a threaddump which always looks so: java.lang.Thread.State: RUNNABLE at java.lang.Object.notifyAll(Native Method) at org.drools.common.DefaultAgenda.notifyHalt(DefaultAgenda.java:1478) - locked 0x2af5f3b0fe88 (a java.util.concurrent.atomic.AtomicBoolean) at org.drools.common.DefaultAgenda.addActivation(DefaultAgenda.java:466) at org.drools.common.DefaultAgenda.addActivation(DefaultAgenda.java:326) at org.drools.reteoo.RuleTerminalNode.assertLeftTuple(RuleTerminalNode.java:259) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71) at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:107) at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71) at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:107) at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71) at org.drools.reteoo.JoinNode.propagateFromRight(JoinNode.java:159) at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:148) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847) at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269) at rulevolution.RulEvolution.runDrools(RulEvolution.java:343) at rulevolution.RulEvolution.evaluate(RulEvolution.java:185) at ec.simple.SimpleEvaluator.evalPopChunk(SimpleEvaluator.java:259) at ec.simple.SimpleEvaluator$SimpleEvaluatorThreadCG.run(SimpleEvaluator.java:341) at ec.util.ThreadPool$PoolThread.run(ThreadPool.java:57) Locked ownable synchronizers: - 0x2af5f3ae95d0 (a java.util.concurrent.locks.ReentrantLock$NonfairSync) To my Programm: Rules are generated in parallel and for each rule, a new KnowledgeBase, KnowledgeBuilder and StatefulKnowledgeSession is created. Objects are inserted into the session and the rule is fired. The session will be disposed after no facts matches my rule or 1000 conclusions are fired. I've searched the net for a similar problem, but with no success. Does someone know why Drools get into such a thread state and how to get out of it? I appreciate any help. Bojan ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Getting deadlock-like thread state
If you run each of these sessions alone does you get the same problem? or this only happens when you try to run multiple sessions in parallel?? On Tue, Jul 23, 2013 at 1:33 PM, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote: Hey drools users, I'm running drools multiple times in parallel with ECJ (genetic algorithm framework). Also I'm running ECJ multiple times in parallel (evaluation purpose). But each time I want to run ECJ, after an unspecific time, one thread is running infinite long while ECJ waits for it to finish. Additionally to this my working memory is steadily growing while hanging in this deadlock-like state, though this might not be due to drools. This goes on until I get an gc out of memory exception. I've created a threaddump which always looks so: java.lang.Thread.State: RUNNABLE at java.lang.Object.notifyAll(Native Method) at org.drools.common.DefaultAgenda.notifyHalt(DefaultAgenda.java:1478) - locked 0x2af5f3b0fe88 (a java.util.concurrent.atomic.AtomicBoolean) at org.drools.common.DefaultAgenda.addActivation(DefaultAgenda.java:466) at org.drools.common.DefaultAgenda.addActivation(DefaultAgenda.java:326) at org.drools.reteoo.RuleTerminalNode.assertLeftTuple(RuleTerminalNode.java:259) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71) at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:107) at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71) at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:107) at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71) at org.drools.reteoo.JoinNode.propagateFromRight(JoinNode.java:159) at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:148) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847) at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269) at rulevolution.RulEvolution.runDrools(RulEvolution.java:343) at rulevolution.RulEvolution.evaluate(RulEvolution.java:185) at ec.simple.SimpleEvaluator.evalPopChunk(SimpleEvaluator.java:259) at ec.simple.SimpleEvaluator$SimpleEvaluatorThreadCG.run(SimpleEvaluator.java:341) at ec.util.ThreadPool$PoolThread.run(ThreadPool.java:57) Locked ownable synchronizers: - 0x2af5f3ae95d0 (a java.util.concurrent.locks.ReentrantLock$NonfairSync) To my Programm: Rules are generated in parallel and for each rule, a new KnowledgeBase, KnowledgeBuilder and StatefulKnowledgeSession is created. Objects are inserted into the session and the rule is fired. The session will be disposed after no facts matches my rule or 1000 conclusions are fired. I've searched the net for a similar problem, but with no success. Does someone know why Drools get into such a thread state and how to get out of it? I appreciate any help. Bojan ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- - MyJourney @ http://salaboy.com http://salaboy.wordpress.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Getting deadlock-like thread state
If you run each of these sessions alone does you get the same problem? or this only happens when you try to run multiple sessions in parallel?? I've never had any problems while running Drools single threaded. But that is not the case, I cannot run one only one session at the same time. The performance deficit would be enormous. Also I'm creating everything from scratch if I want to use Drools. Each time I'm creating a KnowledgeBuilder, putting my rule into it. Generating a KnowledgeBase and putting the KnowledgePackages into it and getting a StatefulKnowledgeSession where I'm inserting my objects. I don't reuse any code. Could the reason of the deadlock be, that the synchronization of notifyHalt() doesn't work properly because I'm running multiple sessions? But the sessions shouldn't have any contentions to each other, I wanted them completely separated. But then is the question, how can I start drools to run multiple sessions? Thanks and greetings Bojan - Ursprüngliche Mail - Von: Mauricio Salatino sala...@gmail.com An: Rules Users List rules-users@lists.jboss.org Gesendet: Dienstag, 23. Juli 2013 14:44:57 Betreff: Re: [rules-users] Getting deadlock-like thread state If you run each of these sessions alone does you get the same problem? or this only happens when you try to run multiple sessions in parallel?? On Tue, Jul 23, 2013 at 1:33 PM, Bojan Janisch bojan.jani...@scai.fraunhofer.de wrote: Hey drools users, I'm running drools multiple times in parallel with ECJ (genetic algorithm framework). Also I'm running ECJ multiple times in parallel (evaluation purpose). But each time I want to run ECJ, after an unspecific time, one thread is running infinite long while ECJ waits for it to finish. Additionally to this my working memory is steadily growing while hanging in this deadlock-like state, though this might not be due to drools. This goes on until I get an gc out of memory exception. I've created a threaddump which always looks so: java.lang.Thread.State: RUNNABLE at java.lang.Object.notifyAll(Native Method) at org.drools.common.DefaultAgenda.notifyHalt(DefaultAgenda.java:1478) - locked 0x2af5f3b0fe88 (a java.util.concurrent.atomic.AtomicBoolean) at org.drools.common.DefaultAgenda.addActivation(DefaultAgenda.java:466) at org.drools.common.DefaultAgenda.addActivation(DefaultAgenda.java:326) at org.drools.reteoo.RuleTerminalNode.assertLeftTuple(RuleTerminalNode.java:259) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71) at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:107) at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71) at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:107) at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71) at org.drools.reteoo.JoinNode.propagateFromRight(JoinNode.java:159) at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:148) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847) at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269) at rulevolution.RulEvolution.runDrools(RulEvolution.java:343) at rulevolution.RulEvolution.evaluate(RulEvolution.java:185) at ec.simple.SimpleEvaluator.evalPopChunk(SimpleEvaluator.java:259) at ec.simple.SimpleEvaluator$SimpleEvaluatorThreadCG.run(SimpleEvaluator.java:341) at ec.util.ThreadPool$PoolThread.run(ThreadPool.java:57) Locked ownable synchronizers: - 0x2af5f3ae95d0 (a java.util.concurrent.locks.ReentrantLock$NonfairSync) To my Programm: Rules are generated in parallel and for each rule, a new KnowledgeBase, KnowledgeBuilder and StatefulKnowledgeSession is created. Objects are inserted into the session and the rule is fired.
[rules-users] Manage dynamically rules in KnowledgeBase
Hello :) How can I manage dynamically rules in KnowledgeBase ? I mean remove, add or update rules without rebuilding a new KnowledgeBase or a new KnowledgeSession. Is it possible ? I tried with a basic example: KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add(ResourceFactory.newClassPathResource(rule.DRL), ResourceType.DRL); KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); // insertion of facts ksession.fireAllRules(); kbase.removeRule(package, myRule); ksession.fireAllRules(); But the rules don't seem to be fired the second time. I also tried to create a new session but the result is the same. I don't wanna use a KnowledgeAgent because the modification of the rules is not very frequent. But when there is one, it has to be applied immediately and shouldn't wait for the interval of time of the scan. If anyone has an idea :) Thank you ! -- View this message in context: http://drools.46999.n3.nabble.com/Manage-dynamically-rules-in-KnowledgeBase-tp4025108.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] 'last modified' and 'created by' attributes for a asset showing wrong userid in Guvnor 5.4.0.final
On 2013/7/23 7:39, vadlam wrote: we noticed the behavior that the userid of the user who logs in first into Guvnor after it is started up is the one that shows up for all subsequent updates to assets irrespective of who modifies the asset. In the RepositoryAssetService class in guvnor-webapp-core module, the getCurrentUserName() always shows the same userid ( whoever logs in first ) log.info( USER: + getCurrentUserName() + CHECKING IN asset: [ + asset.getName() + ] UUID: [ + asset.getUuid() + ] ); Hi, I've filed https://issues.jboss.org/browse/GUVNOR-2027 for this issue. Thanks. Cheers, Jervis ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users