The rule language. More about the agenda-group and ruleflow-group attributes
by Maxim Kolchin
Hi,
I've only been working with drools about couple of months. I've read the
documentation and some articles about drools.
But, I've not found the detail information about the agenda-group and
ruleflow-group attributes, or examples showing how to work with them.
Have I missed something? Will be grateful for any useful information.
Regards,
Maxim Kolchin,
Laboratory of Intellectual Systems,
National Research University ITMO,
Saint-Petersburg.
http://ailab.ifmo.ru/
Email: kolchinmax(a)gmail.com
13 years, 8 months
traits - don more than 3 pojos, got IllegalArgumentException
by Michal Bali
Hi all,
I came across this issue when trying out 'traits' with POJOs (not declared
types). An IllegalArgumentException is being thrown when I apply the third
'don'. Here is how to reproduce:
as the POJO I am using the Message class that comes with the project
created by the Eclipse plugin.
now the rule file:
declare Message
@Traitable
end
declare NiceMessage
@format(trait)
end
rule load
when
then
Message message = new Message();
message.setMessage("Hello World");
insert(message);
don(message, NiceMessage.class);
Message unreadMessage = new Message();
unreadMessage.setMessage("unread");
insert(unreadMessage);
don(unreadMessage, NiceMessage.class);
Message oldMessage = new Message();
oldMessage.setMessage("old");
insert(oldMessage);
System.out.println("don " + oldMessage);
don(oldMessage, NiceMessage.class); //*<--- exception happens here*
System.out.println("wont reach this point");
end
When I run this and rule 'load' fires the third 'don' will throw the
following exception:
Exception executing consequence for rule "load" in com.mycompany.app:
java.lang.IllegalArgumentException: argument type mismatch
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1101)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1029)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1251)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:709)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:673)
at
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:221)
at com.mycompany.app.DroolsTest.main(DroolsTest.java:44)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at
org.drools.factmodel.traits.TraitFactory.getProxy(TraitFactory.java:92)
at
org.drools.base.DefaultKnowledgeHelper.don(DefaultKnowledgeHelper.java:502)
at
org.drools.base.DefaultKnowledgeHelper.don(DefaultKnowledgeHelper.java:522)
at
com.mycompany.app.Rule_load_86ecf966a4c14d8486844cfae2e1e0d8.defaultConsequence(Rule_load_86ecf966a4c14d8486844cfae2e1e0d8.java:21)
at
com.mycompany.app.Rule_load_86ecf966a4c14d8486844cfae2e1e0d8DefaultConsequenceInvokerGenerated.evaluate(Unknown
Source)
at
com.mycompany.app.Rule_load_86ecf966a4c14d8486844cfae2e1e0d8DefaultConsequenceInvoker.evaluate(Unknown
Source)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1091)
... 6 more
Am I doing something wrong or is this a bug. I am running with 5.4.0.Beta2.
BTW traits are a great piece of functionality. Thank you!
Best regards,
Michal
13 years, 8 months
Drools verifier
by FrankVhh
Hi all,
Triggered by a post on this forum, I decided to try a testcase
implementation of Drool Verifiier.
I manage to write some code that does not produce any errors at runtime,
which is good. Unfortunately, it doesn't produce any errors/warnings/notes
on my rulefile either, which isn't good.
The drl file consists of some duplicate rules, and since the file is only
part of a ruleset, there might be some gaps as well.
I pasted the java-code below. Does anyone see where I am going wrong?
Thanks in advance!
Regards,
Frank
VerifierBuilder vBuilder =
VerifierBuilderFactory.newVerifierBuilder();
Verifier verifier = vBuilder.newVerifier();
String ruleText =
"C:\\Users\\Frank\\Documents\\DroolsWorkSpaces\\EmpiricalExperiments\\Financial
Rules\\src\\main\\rules\\clearancerules.drl";
verifier.addResourcesToVerify( ResourceFactory.newReaderResource(
new StringReader( ruleText ) ), ResourceType.DRL );
verifier.fireAnalysis();
VerifierReport result = verifier.getResult();
for(VerifierMessageBase base: result.getBySeverity(
Severity.ERROR ) ){
System.out.println( base );
}
for(VerifierMessageBase base: result.getBySeverity(
Severity.WARNING ) ){
System.out.println( base );
}
for(VerifierMessageBase base: result.getBySeverity( Severity.NOTE )
){
System.out.println( base );
}
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-verifier-tp268...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 8 months
can't put formula on Guvnor screen
by zeeshan khan
Hi Team !
Earlier I sent this mail to rules-dev(a)lists.jboss.org. Mark
Proctor asked me to mail here so I am mailing here in the hope of reply.
Since yesterday only I started learning Drools with the help of
Google and *JBOSS DROOLS BUSINESS RULES pdf file*. I faced many problems to
understand the concept but now its going smooth. But the problem is
the *version
of PDF file of the book* and the *Govener version*. *Its quite different*.
I request you all to please provide me the latest version of PDF as I am
unable to find on net. The problem I am facing is to put the formula as
given in the screen shot in the book.
I am unable to put the *formula* as described in JBOSS DROOLS
BUSINESS RULES pdf file on page no. 102.....the formula is *salesValue-10
as the box is not capable of taking cahracters. *It is taking only integer.
Thanks in Advance for all the help and material !!!!
13 years, 9 months
Guvnor 5.4 CR1 role based authentication with JBossAS 7
by bhochhi
Hello,
Has anybody successfully set up the role based authentication on Guvnor 5.4
CR1 hosted on Jboss AS7? I tried all possible way I could think of but in
vain. I modified bean.xml(commented <security:IdentityImpl> in whole and
uncommented <security:jaas.JaasAuthenticator> and
<guvnorSecurity:RoleBasedPermissionResolver> ). I also replaced
code="UsersRoles" for <security-domain name="other" cache-type="default">
under <login-module> in standalone.xml. Could anyone please help me how to
configure role-based authentication for guvnor based on properties files? Is
was so obvious on 5.3 or former. But this new 5.4 looks so different.
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-4-CR1-role-based-authenticatio...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
drools.packagebuilder.conf
by Matteo Cusmai
Hi all,
i have developed some custom evaluators, and all worked fine with drools
5.3.
I put the file in object under my home folder.
I would like to pass to 5.4 final, but it doesn't read that file.
Where does it find the file?
Thanks a lot,
Matteo.
13 years, 9 months
need help or any links customizing guvnor
by Abdullah Shaikh
Hi,
I am new to drools & guvnor. I was able to create simple drl file and
run from classpath and from guvnor too using url.
I saw that we can create rules in guvnor but I want to know if we can
provide UI for creating rules ? I am not sure but I think what I want
is guided editor ?
Thanks,
Abdullah
13 years, 9 months
Papers about Drools Verifier
by Jackson Cunha
Anyone knows about academic papers involving drools verifier? I'm working
in a project where will be produced a paper and I need to cite some
caracteristics of it.
Thanks.
----------------------------------------------------------------------------------------------------------------
Jackson Cunha Cassimiro (CereB)
Bacharel em Ciencia da Computação - UFPI
MSN: jackson.cereb(a)gmail.com
Telefone Móvel +55 86 9928 1251
Analista de Sistemas - Infoway - http://www.infoway-pi.com.br
Missão Infoway - "Influenciar a Gestão de Sistemas de Saúde através de
e-health"
("A vida é um combate que os fracos abate, aos bravos, aos fortes só pode
exaltar" - Canção do Tamoio, Gonçalves Dias)
----------------------------------------------------------------------------------------------------------------
13 years, 9 months