Activation group and list of contained objects
by Wishing Carebear
Hi,
I have an employee object that contains list of Address.Activation group is
defined on the Address rules. The Address list contains 4 address and 3 of
them satisfies the Rule1. But all the rules are defined in the same
activation group.
Observe that only one Address element executes the first rule. Is the
expected bahvior of Activation group?
Thanks for your time,
15 years
One rule calling another rule
by Roger Smith
I am involved in a project in which one rule needs to call another re-usable
rule. Have anyone had experience using Drools to support such cascaded
rules? If yes, any pointers as to how to do it?
Roger
15 years
Nested objects
by Amin Mohammed-Coleman
Hello there
I have the following object model
ClassA
String name
ClassB classB
ClassB
String status
String context
Before upgrading drools 5.2.0.Final I had the following rule:
when
ClassA ( classB.status =='Open' && name =='Hello' && classB.context='jump')
then
System.out.println("Hit rule");
end
However after upgrading to 5.2.0 the above rule does not get fired, instead I have to do the following:
when
ClassA ( name =='Hello' && classB.status =='Open' && classB.context='jump')
then
System.out.println("Hit rule");
end
or
when
ClassA ( classB.status =='Open' && classB.context='jump' && name=='Hello')
then
System.out.println("Hit rule");
end
Has there been a change causing the original rule not to work? Or should the approach always be to use
when
ClassA ( name =='Hello' && classB.status =='Open' && classB.context='jump')
then
System.out.println("Hit rule");
end
or
when
ClassA ( classB.status =='Open' && classB.context='jump' && name=='Hello')
then
System.out.println("Hit rule");
end
Any help would be appreciated
Thanks
Amin
15 years
FireAllRules and threads
by echirulli
Hi there,
I've got a question regarding statefull session and threads.
I searched a lot about this topic but I'm still a bit confused so...
When a StatefullSession - fireAllRules() returns, can I be sure that the
entire rules processing has ended?
I red something about the fact that this is true unless rules inference
happens, is it correct?
My simple purpose is to insert a fact into a statefullsession working
memory, fire rules, wait until the end of rules processing and than retract
that fact.
How can i do it?
Thank you
Errico
--
View this message in context: http://drools.46999.n3.nabble.com/FireAllRules-and-threads-tp3151572p3151...
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years
Best practise, configuration in DB or in a BRMS
by thornpw
Hello,
I have a lot of processes that uses DB Tables for mapping purposes. For
exmplae in a table is sotred, that users of a special location put in a
spezified OU in the directory. This works fine, Such a table could be editet
with SQL Statements, I don't have to deploy something etc.
But I think, that it should be the better solution to have this in drools,
because I get a user interface in the guvnor for free and I could use ACL to
define which Business User could change which kind of mappings, while I have
to code this stuff in a SQL Solution.
I tried out to do such mappings in the Guvnor and it worked fine, but I
deploy such a mapping is much more compley to the Business User then
changing some SQL (would be done by admins). Do I miss something? Is there a
way to let Business people change Decision Tables on the fly and nothing has
to be deployed?
thanks for your help
--
View this message in context: http://drools.46999.n3.nabble.com/Best-practise-configuration-in-DB-or-in...
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years
Guvnor another few questions...
by Justin Case
Hi all,
I played a bit with 5.2.0.Final and I have a couple of more questions, I don't
know whether I misread the documentation or I just expect too much...
1. Can I use functions in a web decision table columns? Because if yes, I just
can't figure out how... Either way would be good, calling a function defined in
Guvnor or calling a static function of some model class (like
ModelClass.getMyParameter(...) ). Anything which would result to an eval()
block... or should I use a "formula" caclulation type then enter in each cell
the same eval(function()) call? Even so, I still need a rule like:
rule"mine"
when
eval($var.myFunction($date.lastTime))...
2. I see discussions about translations of Guvnor GUI, and I see them mentioning
a certain Constants.properties file. I can't see that file anywhere in my
installation, nor any other language translation for that matter although French
and Spanish were mentioned. Is there by chance a German translation around, and
even if no, how can one generate and use one?
3. I have the feeling that uploading a new version of the POJO model jar updates
the existing classes only. That is, if I remove a class from the Java model and
upload it again, then package validation will fail because it doesn't find the
old class (even when NOT used by any rule or anything I know of). Wasn't there
somewhere a Guvnor dialog where one could remove POJO model classes by hand one
by one? I kind of remember such a class list...
4. And is it really that way that uploading a new POJO model requires an
application restart to actually use it?
5. If I upload something from Eclipse it lands under "Other assets,
documentation" even if they are Java classes which I hoped would land under
Model... is there anything I can do about that? A Java POJO model once uploaded
is just a jar blob afterwards, not usable from Eclipse anymore...
6. The declarative model defined in Guvnor is not much usable in Eclipse either,
comes as an unrecognized text file. I didn't try to edit it in Eclipse, the lack
of integration in the application classes would bring nothing. Could the
declarative model mapped somehow to some Java classes (or generate classes out
of it)?
7. Clicking a Guvnor repository business rule file in Eclipse throws a WebDav
error "not found", both for brl and gdsl files. Could it have to do with the
fact that the package doesn't validate at the moment?
8. Clicking in Eclipse in the Guvnor perspective a freshly created rule flow
(nothing uploaded yet) throws an exception as well...
9. If I have a model class with a field called aThing, it will have an accessor
called getAThing(). Guvnor after POJO import will keep both capitals - thus in
the field selection dropdowns I will have the field AThing... should this be my
only problem.
Thank you for any answers,
JC
15 years