Guvnor Repository Directory with Replicated Database
by Robert Morse
Our Seam 2.2.x application uses Drools 5.2 and Guvnor 5.2 running under JBoss 5.1.0.GA. We use an external MySql database set up in a master slave configuration. The repository.xml file points to the master MySql database (obviously).
Here's my question: Let's assume the database master fails, and we promote the slave so it's now the master. The repository.xml file would now need to point to the slave's database instance. Does anything in the Guvnor created repository directory need to be modified? Is it safe to switch simply by changing the values in repository.xml?
Thanks.
-robert.
The human mind is an iterative processor, it never does anything right the first time. What it does well is to make improvements on every iteration (deMarco)
14 years, 8 months
Putting breakpoints in JBoss server
by Hezi Stern
Hi,
I am trying to debug my rules running on my JBoss server. Unfortunately the
breakpoints do not work (although I am running in debug mode), I am able to
mark a breakpoint but it has no effect (Marking in the Java classes does
work).
When I run JUnit locally all works fine, I am able to put breakpoints and
the debugger stops as expected in the DRL file.
In JUnit I have an option to Debug as Drools JUnit test (and I also have a
Debug as Junit test) but when I wish to run my sever I only have "Start" or
"Debug" options (nothing indicating debug with Drools)
Is possible at all to breakpoint on JBoss? If yes is there something
specific that should be configured?
I am running:
- Drools 5.2.0
- Eclipse Helios
- JBoss 5.1.0
Thanks
Hezi
14 years, 8 months
working with version 5.0
by Oli Blub
hello,
i work with drools guvnor and expert version 5.0.0.
I hat the problem with stateless session in comibnation with rule flow
componentet.
So i use stateful session and build a second delete ruleflow to delete all
objects in memory. Is there a better solution?
I installed v. 5.2 but the import of the repository from 5.0 caused many
compilation problems. Is there a workaround?
I'm interested in working with GWT and fix some little bugs of Guvnor V 5.0.
Is there a good guidence to get started?
14 years, 8 months
What would you call a Fact that is only evaluated once?
by Mark Proctor
What would you call a fact that is inserted once and the conflict set
computed (the rules that can fire). The fact is then retracted so no
more matches can take place, but the conflict set itself is allowed to
fire (assuming their other facts remain true).
I think this is quite a common use case and most users will handle this
via a lower salience and retracting the fact manually, but I think it's
useful enough to build in as a keyword on type declaration. We just need
a name for it :)
Mark
14 years, 8 months
Error in Guvnor with Enumerations (5.1.1)
by John Peterson
Hi,
I'm trying to utilize a "load method" for Guvnor, but I can't seem to get it working. His is my DataHelper class (modeling it off the documentation):
package com.enumerations;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class DataHelper {
public List<String> getQuestionNumberList(){
ArrayList returnList = new ArrayList();
Iterator it = com.enumerations.DroolsTest.questionList.iterator();
while (it.hasNext()){
QuestionAndAnswer qAndA = (QuestionAndAnswer)it.next();
if (!returnList.contains(qAndA.getQuestionNumber())){
returnList.add((String)qAndA.getQuestionNumber());
}
}
return (List<String>)returnList;
}
}
I've placed this (both as a .jar and .class file) in my JBoss installation under \jboss-4.2.3.GA\server\default\deploy\drools-guvnor.war\WEB-INF\classes\com\enumerations.
Using this syntax as an enumeration in Guvnor:
'QuestionAndAnswer.questionNumber' : (new com.enumerations.DataHelper()).getQuestionNumberList()
I get the following errors:
[Enumerations] Unable to load enumeration data.
[Enumerations] [Error: failed to access property: getQuestionNumberList(): [Error: unable to invoke method: getQuestionNumberList] [Near : {... Unknown ....}] ^[Line: 1, Column: 0]][Near : {... r()).getQuestionNumberList() ....}] ^ [Line: 1, Column: 0]
[Enumerations] Error type: org.mvel2.PropertyAccessException
I am using Drools 5.1.1. Does anyone have any suggestions on what to do to correct this error?
jp
14 years, 8 months
Collect with same value
by wendy
Hi,
I'm trying to write the following rule but am having some trouble.
We have a object say Shape and which has attributes size and color. I
want to get a list of all shapes with the same color that have size > 5.
How can I make sure the color is the same for all objects in the collect
without having different rules for 'red', 'green'...?
Thank you,
Wendy
--
View this message in context: http://drools.46999.n3.nabble.com/Collect-with-same-value-tp3242904p32429...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
New Fact Role
by Isaac Pereira
Hi,
I would like to know if there's a way to add new role types without change
the drools core? The reason is to build a module that handles situations
(state of affairs) to support context aware systems. Situation would be the
new role and then adds all specific handling for this type of fact.
Thanks,
Isaac Pereira
14 years, 8 months
Drools Queries with relation to the LHS and RHS syntax of the rule
by Dibya
I have the below two requirement for Drools implementation.
1. To use a java method(with single argument) of my application class in the
'LHS' of the rule .
2. To pass the object set in 'RHS' of the rule back to my application.
Is it possible to implement point 1 and point 2 as below ?
Example :
Application class is defined as :
//Class for getting various types from my application
package application.custom;
public class Project
{
public string getStringValue(String name) {
<Logic of the application>
return ;
}
}
//Class 2 for setting the rule result
package application.customresults;
public class ProjectResults
{
public void setResult(String name) {
<Logic of the application>
}}
===========================================================================
Drl file like :
package application.rules
#I shall set the object 'projRes' in my appl using setGlobal
global application.customresults.ProjectResults projRes ;
import application.custom.Project;
rule "project-1.option1"
when
$proj : application.custom.Project();
eval ($proj.getStringValue("Drools") .equals ("ABC")) # Logic specific to my
application
then
#Requirement is to set and make use of the object 'projRes' in my
application
modify (projRes) {projRes.setResult("Drools project"); }
end
rule "project-1.option2"
when
$proj : application.custom.Project();
$projRes : application.customresults.ProjectResults();
eval ($proj.getStringValue("Java") .equals ("DEF")) # Logic specific to my
application
then
#Requirement is to set and make use of the object 'projRes' in my
application
modify (projRes) {projRes.setResult("Java project");
}
end
Please let me know if the above way of writing the drl would suffice both
the requirements (or) is there a better way to implement it.
Thanks
Dibya
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Queries-with-relation-to-the-LHS...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Drools 4.0.7 compatible with Jboss 3.2.7
by Dibya Ranjan
Thanks for the update.
Would like to know if Drools version 4.0.7 is compatible with J-boss version
3.2.7.
/BR
Dibya
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools5-2-2-integration-with-scala2-9-0...
> Sent from the Drools: User forum mailing list archive at Nabble.com.
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 7 Aug 2011 14:33:25 +0200
> From: Dibya Ranjan <dibya.tcs(a)gmail.com>
> Subject: [rules-users] Regd Drools compatibility with Jboss version
> To: rules-users(a)lists.jboss.org
> Message-ID:
> <CAK=+3B9m73RKWQB951Ze1Ca-rpFbB+a+gds4aHVmaGNB4TZ+Vg(a)mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi
>
> We have a requirement to implement Drools in an application ,which is
> hosting the application server in Jboss with version as 3.2.7.
>
> It further uses java 1.4 version with the application being build and
> deployed with Ant 1.6.2.
>
> Could anyone help me in providing the Drools version that is compatible
> with
> above .
>
> --
> With Warm Regards
>
> Dibya Ranjan
> -
> *******************************************
>
14 years, 8 months