[rules-users] Collect all occurrences of resulting data.

2014-04-21 Thread Ephemeris Lappis
Hello. I'm looking for the better way to write a rule that collects data only when they have been all processed. For example, two input objects classes as facts : *Data* and *Category*. I declare a local type to memorize the result of the evaluation for each pair of fact. Some rule evaluates

[rules-users] Generics in local declared types (Drools 6.0.1 final)

2014-04-21 Thread Ephemeris Lappis
Hello.I've tried to declare fields with generics in local types, but it seems to be always rejected.For example :I've also tried with ArrayList or other concrete classes, but the syntax seems to produce syntax errors.Is this a limitation in type declaration ?An idea ?Thanks for your help.Regards.

Re: [rules-users] Collect all occurrences of resulting data.

2014-04-21 Thread Wolfgang Laun
This is one of the (rare) cases where I'd advocate salience. rule Collect results when complete salience -99 when $all : List from collect(Result()) then ...do something with $all... end -W On 21/04/2014, Ephemeris Lappis ephemeris.lap...@gmail.com

Re: [rules-users] Collect all occurrences of resulting data.

2014-04-21 Thread Ephemeris Lappis
Hello. Thanks for this advice. I've tried it with a small test case, and it actually works fine : the collecting rule seems to be fired at the end. Nonetheless, I'm not confident at all with salience, since in my real use case I have many rules before and after that, and I worry that

Re: [rules-users] (Hot?) rules production deployment

2014-04-21 Thread Pykhtin, Alex
Anyone can tell if Drools supports hot deployment of rules and fact types? We are using Drools rules (No Guvnor/Workbench), and the whole cycle Development-Test-Production takes a very long time. Ideally we would like business users to add or modify rules in Production without risk of crashing

Re: [rules-users] Collect all occurrences of resulting data.

2014-04-21 Thread Wolfgang Laun
I recommend at most 3 levels of salience, and only if you have a very limited scenario of insert / fire. Alternatively, you can use agenda groups. If I understand you correctly, you have some rules that execute Before and others that should execute After. In your .drl, activation-group Before

[rules-users] Unit testing a Single rule from a large set of DRL and DSL files.

2014-04-21 Thread alanvarghese
Hi There, I want to unit test a single rule from a set of multiple rules within multiple DRL files. Is there a way to do that? I am using Drools 6.0.0.Final and StatelessKieSession Thanks Alan -- View this message in context:

Re: [rules-users] Unit testing a Single rule from a large set of DRL and DSL files.

2014-04-21 Thread Wolfgang Laun
Implement the interface org.kie.api.runtime.rule.AgendaFilter and pass it in with fireAllRules. -W On 21/04/2014, alanvarghese avargh...@verisk.com wrote: Hi There, I want to unit test a single rule from a set of multiple rules within multiple DRL files. Is there a way to do that? I am

Re: [rules-users] Collect all occurrences of resulting data.

2014-04-21 Thread Ephemeris Lappis
Hello again. It seems clear that too many salience levels would make it all worse ! My ruleset executes over a simple list of initial facts, and proceeds more or less as you say in three phases : 1) Analise initial facts using several deduced facts to make intermediary conclusions implemented

Re: [rules-users] Collect all occurrences of resulting data.

2014-04-21 Thread Wolfgang Laun
Just an additional hint: it's possible to switch between agenda groups (sorry for using the wrong term, but I didn't confuse you, did I?) from within rules as well. -W On 21/04/2014, Ephemeris Lappis ephemeris.lap...@gmail.com wrote: Hello again. It seems clear that too many salience levels

Re: [rules-users] Unit testing a Single rule from a large set of DRL and DSL files.

2014-04-21 Thread alanvarghese
Thank you that was a big help. But I see that I cannot use a StatelessKieSession to do that. I have to use a Stateful Session. Is there anyway I can use a StatelessKieSession to unit test a single rule? -- View this message in context:

Re: [rules-users] Unit testing a Single rule from a large set of DRL and DSL files.

2014-04-21 Thread Wolfgang Laun
You don't lose anything when you use a stateful session, most certainly not for unit-testing a rule. -W On 21/04/2014, alanvarghese avargh...@verisk.com wrote: Thank you that was a big help. But I see that I cannot use a StatelessKieSession to do that. I have to use a Stateful Session. Is

Re: [rules-users] Unit testing a Single rule from a large set of DRL and DSL files.

2014-04-21 Thread alanvarghese
OK Agreed. I can definitely work with that. Thanks Again. But my main problem is that the LHS for all the rules in my dslr files fires as soon as I execute. kieSession.insert(output); I want only the LHS for the rule that I am unit testing to fire. Is there any way to do that? -- View this

Re: [rules-users] Unit testing a Single rule from a large set of DRL and DSL files.

2014-04-21 Thread Wolfgang Laun
If you do that, you won't be unit-testing the rule as it operates in cahoots with all other rules :-) You could put that rule on a DRL file of its own and compile, create the KB and run the session. There should be a way to manipulate a Knowledge Package, handle rules one by one. But that's not

[rules-users] Drools Fusion Dropping Actions to Events?

2014-04-21 Thread chandu_divi
I am using Drools Fusion 6.0.1.Final version, it looks like some (rather several) actions to the events are dropped. I am sending about 100K events and expecting an action to all the events, but only 5000 actions are performed, which means about 95K actopms are dropped. The same issue was posted