I am actually using ChangeSet, because we did not wanted the rule files to
loaded many times, rather load at once and use scanner to look for any
changes.
--
View this message in context:
http://drools.46999.n3.nabble.com/fireUntilHalt-is-halt-forever-tp4019146p4019317.html
Sent from the Drools
This is what I want
If the Generic Name is AndroGel, then focus on firing AndroGel rules only,
non other. If it is not AndroGel, it should check for other Generic Name and
if it matched it should only focus on firing that rules only.
rule "AndroGel Generic Name"
no-loop true
auto-
Here is the example
rule "AndroGel Provider State"
no-loop true
salience 95
agenda-group "AndroGel"
when
eval( droolsRequest.address.stateCode == "MA" )
then
logging();
drools.halt();
end
the other rule is ver
Ok, it is working now. I don't know what was the problem. I guess the rules
were not right before.
One question, my rules have the same facts, and this is why it is activating
all the satisfied rules before firing. is there anyway to stop this.
I mean think about it. If I have million rules with
I have a requirement which says that only few rules should be fired based on
the user group. How am I suppose to do that.
Only thing I think of is that I have to setFocus in the rules on either
Agenda-group or Activation-group.
please let me know.
Thanks.
--
View this message in context:
htt
Ok, for my rule files, the facts for all the rules are same. That is the
problem. I guess I have to merge everything into one rule file.
So can a rule have multiple agenda Group, something like this.
rule
agenda-group A,B,...
when
//condition
then
//consequence
end
or
C
I mean to say is that, control does not come back to
workingMemory.fireUntillHalt(). It just hangs in the rule file itself. Does
not do anything at all.
What is the use of that.
If I write like halt in the rule then it should stop the rule firing and
control should be sent back to workingMemory.f
I am using Working Memory instead of kSession. And it is not working at all.
It just hangs after drools.halt();
Please let me know about it.
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/fireUntilHalt-is-halt-forever-tp4019146p4019290.html
Sent from the Drools: Us
Hi David, you told me we can tweak the engine to know what are the failed
rules. Can you please let me know how to do that.
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/modify-and-update-is-not-working-in-the-rule-file-tp4019158p4019287.html
Sent from the Drools:
Ok, for my rule files, the facts for all the rules are same. That is the
problem. I guess I have to merge everything into one rule file.
So can a rule have multiple ruleFlow Group, something like this.
rule
ruleflow-group A,B,...
when
//condition
then
//consequence
end
Because I
Yes, but I don't want all the rules to fire, right.
You told me the drools will take care of what the rules to fire based on the
request. This is what you told
"
But a rule (as you have it) with
Drug( brandName == "AndroGel" )
will take care of that automaticaliy. This can co-exist with lots
I have written rule files and added to ChangeSet. Now when I fire the rules
on Working Memory, it fires all the rules of all the rule files.
I tried to use Fire Until Halt if the execution of rules are satisfies or if
any rules failed, but it stops the execution forever.
Please let me know how to
Ok it worked when I changed the rule file a little to add the negative rules.
But this should be dynamic so I am guessing I should write if-else stmts to
focus on for different drugs?
ksession.getAgenda().getAgendaGroup( "AndroGel" ).setFocus();
* Logging is also not working in
Yes I have that, but no luck. But again this should be dynamic so I am
guessing I should write if-else stmts to focus on?
ksession.getAgenda().getAgendaGroup( "AndroGel" ).setFocus();
* Logging is also not working in the rule file.
Logger logger = Logger.getRootL
Thanks for reply to all.
I would like to learn how to do that, but I don't want to implement now,
since I do not have time for that. But please do let me know about it.
Again, @Laune has helped me fix issues about I am getting null into
response, but I am back to that. Please find the rule file
That's what our Business doesn't want me to do to write negative rules. In
this way there will be 2 rules to be written for 1 business rule.
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/modify-and-update-is-not-working-in-the-rule-file-tp4019158p4019250.html
Sent
ok, thank you so much for your help. It works. Thanks.
But one tough question for you.
How can I know what was the reason a rule condition failed. Lets say
rule
when
test( a == "b" )
then
//consequence
end
I want to know what caused the condition a=="b" to fail was the value of a
I have done this. Please find the rule file attached.
http://drools.46999.n3.nabble.com/file/n4019243/Rule.txt Rule.txt
But it is still not setting the values for Program Fact in the rule file. I
am getting null as output. Do I need to return that object. If yes please
let me know and how can I
ok I have done this, please find the rule file
http://drools.46999.n3.nabble.com/file/n4019241/Rule.txt Rule.txt
But it is still not setting the values for Program Fact in the rule file. I
am getting null as output. Do I need to return that object. If yes please
let me know and how can I get t
How to use boolean variables in the rule. I want to do this
rule
when
//condition
then
set a boolean to true
end
Then check at the last rule if all the boolean in the rules are true, which
tells me that all the rules have passed.
Thanks.
--
View this message in context:
ht
ok but why is it not able to find my function written and why is it not able
to find my global variable with it's name given.
Please help me fix this global variable thing. Rest I will look into it
later.
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/modify-and-up
ok so what is the flow of the failed condition of the rule. Also you did not
answer the first question of the function. It is not able to find my
function in the rule file.
--
View this message in context:
http://drools.46999.n3.nabble.com/modify-and-update-is-not-working-in-the-rule-file-tp40
I have written a function
function boolean logging(String actualValue, String ruleValue) {
progRuleValidationLog.setActualValue(actualValue); //this is a pojo
which
will give me what are the failed rules.
progRuleValidationLog.setRuleValue(ruleValue);
return true;
}
ru
How can I fire one rule file if I have lot of rule files defined in my change
set. Right now I have written an if-else condition and checking if the input
is Androgel then fire Angrogel rule fire.
But how can I do that in real time.
Also I have a requirement which says it needs the reason why the
Please find the project attached. Please check and help me out. I am now like
cat on that wall. The project team needs it and this is giving me hard time.
Please help
http://drools.46999.n3.nabble.com/file/n4019196/pi-affiliate-drools-rule-engine.zip
pi-affiliate-drools-rule-engine.zip
Please
This is the log I get, it is not able to set the values at all. I even try to
update in the code. but still there is no data that I am setting in rule is
set at all.
0[main] INFO com.drfirst.pi.affiliate.drools.DroolsKnowledgeObject -
Drools Resource Scanner is set to 60 seconds
6[main
Hi this is my rule file, can you help me modify to make it work please.
http://drools.46999.n3.nabble.com/file/n4019187/Rule.txt Rule.txt
Please let me know
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/modify-and-update-is-not-working-in-the-rule-file-tp4019158
How can I add the rules to Verifier. I could not get a examples.
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/Anyway-to-get-Failed-Reason-for-Failed-Rule-tp4019070p4019164.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
__
Please let me know what is the problem in this. It does not update the values
when I get the values, it gives me null in my unit test method.
rule "Drug Strength" extends "Provider State"
no-loop true
dialect "mvel"
agenda-group "AndroGel"
when
Drug
Nope it is not working like that.
I removed it. Using fireAll
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/fireUntilHalt-is-halt-forever-tp4019146p4019153.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
__
Thanks for your reply.
Once all the rules of that file is good, then it should retrieve the
resources in the rule file but not the session. and then may be fire other
rule file.
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/fireUntilHalt-is-halt-forever-tp4019146p
Hi my rule file is halt for ever. Can anybody tell me why. I debugged and saw
that it is going into this method in DefaultAgenda.class
public void fireUntilHalt(final AgendaFilter agendaFilter) {
synchronized ( this.halt ) {
if( !this.halt.get() ) this.halt.wait(); //it
ok I have used "Classpath:" but now it is saying this.
The file is there in the specified location.
java.lang.RuntimeException: Unable to get LastModified for ClasspathResource
at
org.drools.io.impl.ClassPathResource.getLastModified(ClassPathResource.java:179)
at
org.drools.io.i
I reads my changeSet file but it is again not able to read the drl file that
is specified in the changeSet.xml.
My STS (Eclipse) and Workspace is in D: drive, so that files are also in D:
drive.
Caused by: java.lang.IllegalArgumentException:
'D:/Venkat/workspace/pi-affiliate-drools-rule-engine/bi
Strangely it did work for this
kagent.applyChangeSet(ResourceFactory.newFileResource(ruleFile));
but I get this exception now.
My change set file has folder locations of drools files
java.lang.RuntimeException: Unable to parse ChangeSet
at
org.drools.agent.impl.KnowledgeAgentImpl.get
This is the place I am getting the NPE.
URL url =
this.getClass().getResource("/src/main/resources/DroolsChangeSet.xml");
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/Getting-Null-pointer-exception-for-applying-change-set-tp4019117p4019121.html
Sent from
Having trouble getting the URL, getting null when getting the ChangeSet file.
Please let me know what is the problem.
ResourceChangeScannerConfiguration conf =
ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
conf.setProperty("drools.resou
Hi, I want to know how to load the rule file dynamically from the change set
based on the user inputs.
I have created the kBase and kSession, but I want to know how can I just
make a knowledge session on the rule file that will be loaded into the
memory based on the user input.
For example.
if u
ok this is what I have done.
I have create a ResourceChangeScannerConfiguration and applying the
changeSet to load the files dynamically.
then I have created a KnowledgeAgent and then knowledgebase from Agent.
Then in another class I have created knowledgeSession adding EventListeners
and logging
Hi Davide, your second guess is right. Sorry I should have said failed
condition.
I wanted to know which rule got fired and which one did not (because the
condition failed in when clause).
I wanted to know those, because we have requirement which asks for what are
the rules which have passed and
40 matches
Mail list logo