Upload Models to Guvnor
by S.M.H.Jamali
Hello All
I want to create a test scenario in Guvnor but it can not detect my uploaded models! can you help me ? i look at the package properties and i can see my Models
Thanks
S.M.H.Jamali
14 years, 11 months
Dummy question from a new comer
by cross.cy
Hi, I only started using Guvnor recently. Just wonder if anyone could clarify
one question. A good benefit of using Guvnor to manage rules is to decouple
the rules from application code. However, the RHS of some rules may involve
actions related to other logic classes in application. For example, there's
a rule that sends out an email in the action, which uses methods defined
elsewhere in the project, and these should not be known by Guvnor. So my
solution for that is, create a declarative model containing an "Email" fact
in Guvnor. When the rule fires, logical insert an "Email" object. And back
in java code I'll try to check if there's an "Email" object created after
the fireAllRules() call. If there is, call my email sending method.
Is this the right way? If so, what's the best way to look for the newly
created "Email" object in Java code? There are methods to getFactHandles()
and getObjects(). Are they the area to look for?
Any comment will be highly appreciated!
Yu
--
View this message in context: http://drools.46999.n3.nabble.com/Dummy-question-from-a-new-comer-tp32481...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 11 months
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, 11 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, 11 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, 11 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, 11 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, 11 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, 11 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, 11 months