fusion aggregate functions
by Ahmed Hafsi
Hi guys,
I have found in the documentation examples in sliding windows part, the
average aggregate , I need other aggregates like max. min , standard
deviation ... is there any of those already buitin ? I have searching the
docus. , but havn't found much dealing with the built in aggregate
functions.
Also if I want to implement one of them using normal rules , Is it true that
it will not be as sufficient ?
Thanks,
k-
16 years, 2 months
FUSION jumping windows
by Ahmed Hafsi
Hi Guys,
I see that there is support of sliding windows in drools fusion , my
question is that is it possible to get jumping windows support ? i.e. the
interval gets from (0,10) to (10,20) and so on. instead of (0,10) to (1,11).
If not do you recommand implementing it using rules ? i.e will the
performance hits be too big compared with the builtin support ?
Thanks
k-
16 years, 2 months
Firing only changed object rules in stateful sessions
by Vinay
Hi All ,
I am trying to implement the stateful drools implementation with one big
object (This object has many objects inside needed for rules). I insert this
object in session and fire all rules.
In case the object exist in working memory , I update the object using
facthandler. My problem is as soon as the object gets updated using the fact
handler all rules again gets fired. My business requirement is to only fire
the rules whose value got changed in the update process.
I can't split the object into small objects , since it has all the
relationship and all the rules are already written based on this structure.
Could you please guide me how to implement this requirement. Any help is
really appreciated.
Let me know in case you need any details.
Thanks
Vinay
--
View this message in context: http://n3.nabble.com/Firing-only-changed-object-rules-in-stateful-session...
Sent from the Drools - User mailing list archive at Nabble.com.
16 years, 2 months
Using a global list in a rule
by orchid
Hi All,
I have a question regarding using a global list. I have the following rule:
global java.util.List list List;
Rule "rule1"
when
A
then
list.add("rule1");
When I'm trying to check the list content in LHS of another rule I get a
compilation error: "mismatch input ...":
Rule "rule2"
when
list.contains("rule1") /*or: list contains "rule1"*/
then
...
How do I check the list content from LHS?
Thanks you in advance.
Any help would be appreciated :-)
--
View this message in context: http://n3.nabble.com/Using-a-global-list-in-a-rule-tp115746p115746.html
Sent from the Drools - User mailing list archive at Nabble.com.
16 years, 2 months
Decision table accessing my own methods
by djb
Hi there,
I have been trying for hours now to get a decision table that can call my
own methods.
Lets say I've got a Classroom, and a list of 4 students.
And my rule is to not have Bill and Bob in the same classroom.
I have a method Classroom.hasStudent(String name), which will say whether
the room has Bill or Bob.
But how do I call it???
Imagine this is my decision table:
classroom: Classroom
classroom.hasStudent("$param")
Bob
Bill
How in the world do I get it to not say "no viable alternative at input
"bob" for blah blah blah"?
I've also tried classroom.hasStudent("$param") == true with no success.
Please help,
Thank you...
Daniel
--
View this message in context: http://n3.nabble.com/Decision-table-accessing-my-own-methods-tp114250p114...
Sent from the Drools - User mailing list archive at Nabble.com.
16 years, 2 months
Re: [rules-users] Using groovy classes as Fact Classes in Guvnor
by HonorGod
This seems to be a legitimate issue ....have you found a solution yet ?
Thanks
leesy84 wrote:
>
> Hi
>
> I am currently trying to implement Drools 5.0.CR1 with grails, I have
> created a couple of domain classes which are simple Groovy classes with a
> couple of fields. I want to load these classes as my model into Guvnor and
> then create rules using those classes. I am having a few problems when
> "Saving and Validating" my configuration. I have a war file that is
> generated using maven and it has my classes files inside it in
> /WEB-INF/classes/ . I load the war as my model and the classes are shown
> on the packages main page but the following error is given when pressing
> "Save and Validate configuration"
>
> [ERR 102] Line 1:10 mismatched input '-'
>
> I have also tried using groovyc to compile my class files then jar'ing
> them up and loading that as the model but got another error:-
>
> java.lang.ClassNotFoundException: groovy.lang.GroovyObject
>
>
> I was wondering if it is possible to use groovy compiled class files and
> if it is then does anyone know what my issue might be or how it is meant
> to be done correctly.
>
> Thanks in advance for any help
>
> Daniel Lees
>
--
View this message in context: http://n3.nabble.com/Using-groovy-classes-as-Fact-Classes-in-Guvnor-tp601...
Sent from the Drools - User mailing list archive at Nabble.com.
16 years, 2 months
Fusion , timing and streams
by Khalil Hafsi
Hi guys,
I was experimenting with Drools fusion (last version) and I have a small
question :
What is the difference between the following (down the page) two rules :
(note the "and" between the patterns) , i.e : how one can understand the
"and" , is it a logical or temporal conjunction ? and finally what is
the implied "relation" between pattern as in rule "b" ? I think it is an
"and" , but using drools fusion to detect 2 stocks having a temporal
relation (using the after op.) , I found different results when
explicitly using "and" between the patterns and not using it.
One final question , what is the default event policy in fusion ? I can
not find any docu about that.
Thank you for your time -k
rule "a"
when
--pattern1
and
--pattern2
then
--action
end
rule "b"
when
--pattern1
--pattern2
then
--action
end
16 years, 2 months