Effective Dating of Rules
by MaverickDrools
Is there a way to effective date a rule through a program?
Requirement:
without using the Guvnor UI to write the rules, trying to upload a .drl file
using REST APIs which already has rules specified "without" the
date-effective/date-expire attributes. Is there a way to maintain versions
that could be used by effective dating the entire package itself?
Or in general, how do we effective date the rules in Guvnor without using
date-effective attributes for rules and create a knowledgebase from the
package based on the current date?
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Effective-Dating-of-Rules-tp4022422.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
3 hours, 36 minutes
drools-solver results question
by Andrew Waterman
Hello,
I'm starting to work with the drools-solver to help on a gaming
project. Basically, we have a game that works in two modes: 1) a
competitive game where humans (or agents) compete with one another on
a well defined game board to achieve 24 points by using three (or
four) agricultural development tokens. 2. A puzzle, where all 4
players work cooperatively to create an equitable solution, where all
4 players win with at least 24 points by means of our agricultural
development tokens.
I am starting to work with drools-solver to address the puzzle part of
our game. Basically, we are interested in having the solver do two
things for us: a) find the optimal solution for our game/puzzle,
based upon our requirements [this part seems quite straightforward]
and b) getting the total number of solutions that satisfy our
constraints. We would like, as well, to be able to inspect these
other, sub-optimal, solutions, in order to explore our game and puzzle
further. From my reading of the "Solver" API , it looks like we will
only be able to get the optimal solution. Does anyone have any
suggestions for a workaround in this case? Or is there some
functionality in the solver that I am missing?
I look forward to your feedback.
best wishes,
Andrew
---------------------------------
Andrew Waterman
San Cristóbal de las Casas, Chiapas, Mexico
2 weeks, 5 days
Need help with setFocus
by new2drools
Hi All,
Need some help with understanding setFocus.
I have the following use case:
if (condition1) {
if (condition2) {
} else if (condition3) {
} else if (condition 4) {
}
}
if (condition5) {
if (condition2) {
} else if (condition3) {
} else if (condition 4) {
}
}
I created 3 rules (rule2, rule3, rule4) for checking condition2, condition3,
condition4 and
created 1 agenda group (groupX) for them.
I created 2 rules (rule1, rule5) for checking condition1, condition5 and
created 1 agenda group(groupY) for them.
rule "rule1"
agenda-group "groupY"
when
//
then
drools.setFocus("groupX");
end
rule "rule3"
agenda-group "groupX"
activation-group "someActiveGroup"
when
//
then
//
end
>From the java code:
ksession.getAgenda().getAgendaGroup("groupY").setFocus();
Problem: The first time, drools.setFocus("groupX") is invoked, I see that
it's working fine. rule2 or rule3 or rule4 get triggered. But, the SECOND
time that drools.setFocus("groupX") is invoked, I don't see that any rule in
agenda-group groupX is being invoked...even though one of the rule's LHS
explicitly matches...thinking that the activation-group is cancelling all
the activation's (after one rule in that activation group is fired), I even
removed the activation-group statement. But, it didn't help...ideally, I
would like to bunch rule2, rule3, rule4 in one activation group.
Can you please let me know as to why the second invocation of setFocus is
not working? I even tried to remove everything in LHS of rule2/3/4, to see
if the second invocation would work...it doesn't...
Thanks!!
--
View this message in context: http://www.nabble.com/Need-help-with-setFocus-tp24177742p24177742.html
Sent from the drools - user mailing list archive at Nabble.com.
1 month, 1 week