[Re:] No return from Guvnor
by J Michael Dean
Just a couple additional comments. The binary package DOES get loaded
into the localCache that is in my properties file; when I shut down
JBoss, the app does try to hit the cache file. I also downloaded the
DRL from Guvnor, and when I point at the DRL directly, the code all
executes properly. I hope this might be helpful but I do not
understand why I do not get an agent back in my previously posted code.
15 years, 9 months
StatefulKnowledgeSession and J2EE
by Dan Seaver
Is there any recommended "Best Practice" for instantiating and accessing a
StatelfulKnowledgeSession in a J2EE environment?
One use case for this type of session is it will act as a Complex Event
Processor - taking in low-level events from all over the system and throwing
complex events based on Fusion rules. The session is intended to be global
in nature as ALL events will flow through this CEP processor.
Another use case would be for long running processes or work-flows that
interact with data streams.
The 3 patterns I'm looking at are:
- the Singleton pattern
- use of JMS and MDBs
- use of external rule server(s)
Any thoughts about scalability issues?
--
View this message in context: http://www.nabble.com/StatefulKnowledgeSession-and-J2EE-tp21968423p219684...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 9 months
No return from Guvnor
by J Michael Dean
I have an app that can run with a local DRL file and with 4.07 and
BRMS, all has been working. Migrating to 5 to take advantage of
Guvnor. However, when I try to instantiate a RuleAgent using a
properties file, my code goes to heaven (or the other place). From
the code below, the subsequent console output results, which indicates
connection to Guvnor and apparent creation of the rulebase, but the
code never returns.
public RulesEngine() throws RulesEngineException {
super();
try {
System.out.println("Instantiating an agent with properties file");
RuleAgent agent = RuleAgent.newRuleAgent("/glucoseRules.properties");
System.out.println("Should have instantiated an agent");
rules = agent.getRuleBase();
System.out.println("Have a rule base from the agent");
} catch (Exception e) {
System.out.println(e.toString());
throw new RulesEngineException("Could not load/compile rules files:
", e);
}
}
Instantiating an agent with properties file
RuleAgent(default) INFO (Thu Feb 12 06:18:02 MST 2009): Configuring
with newInstance=false, secondsToRefresh=30
RuleAgent(default) INFO (Thu Feb 12 06:18:02 MST 2009): Configuring
package provider : URLScanner monitoring URLs: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/gluc...
with local cache dir of /rules
RuleAgent(default) INFO (Thu Feb 12 06:18:02 MST 2009): Applying
changes to the rulebase.
RuleAgent(default) INFO (Thu Feb 12 06:18:02 MST 2009): Adding package
called glucose.decision.rules
The properties file:
url=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/glucose.decision.rules/LATEST
localCacheDir=/rules
poll=30
Again, this code all worked as written when I was using 4.07 and
BRMS. Any assistance is greatly appreciated!
15 years, 9 months
RE: Guvnor Enumerations in Web-Based Decision tables
by Vikrant Yagnick
Sorry,
Found the answer to this one. I should have played around a little more.
Just in case anyone is interested if a column is defined as an enumeration it automatically appears as a drop down list in Guvnor Web Based Tables.
Cheers,
Vikrant
From: Vikrant Yagnick
Sent: Thursday, February 12, 2009 3:03 PM
To: Rules Users List
Subject: Guvnor Enumerations in Web-Based Decision tables
Hi All,
I was wondering if it is possible to use Enumerations for a column in the Web-Based decision tables?
Currently, the column configuration uses a static list of values, but it would be really cool if we could specify an Enumeration name there and the enumeration could itself come from the database thus making the columns show a list of values dynamically.
Cheers,
Vikrant Yagnick
Software Designer - CLICO
MajescoMastek Ltd | Mastek Millennium Center,Millennium Business Park, Mahape, Navi Mumbai 400-710 |
(T) 91 22 66952222 Extn - 5230 | Mobile: +919833490598 | www.mastek.com
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 years, 9 months
Guvnor Enumerations in Web-Based Decision tables
by Vikrant Yagnick
Hi All,
I was wondering if it is possible to use Enumerations for a column in the Web-Based decision tables?
Currently, the column configuration uses a static list of values, but it would be really cool if we could specify an Enumeration name there and the enumeration could itself come from the database thus making the columns show a list of values dynamically.
Cheers,
Vikrant Yagnick
Software Designer - CLICO
MajescoMastek Ltd | Mastek Millennium Center,Millennium Business Park, Mahape, Navi Mumbai 400-710 |
(T) 91 22 66952222 Extn - 5230 | Mobile: +919833490598 | www.mastek.com
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 years, 9 months
Shadow facts
by J Michael Dean
I am migrating from 4.07 to 5 and my previous DRL file does not
function correctly; I previousliy inserted facts with the dynamic
Boolean set true. I understand that this is no longer done because
shadow facts are "not needed" in Drools 5, but is it necessary to do
anything different in the RHS when modifying facts? My fact POJOs
have a method for adding text to themselves. I believe my rules are
not working properly because nothing is being modified - only the
initial activation set fires and then nothing happens.
Restated, the documentation talks about how to "avoid" shadow facts in
Drools 4.07 - are the restrictions in this part of the docs necessary
in Drools 5?
Thanks.
15 years, 9 months
InvalidRulePackage versus the number
by Hong-Qiang Gao
Hi All,
I tried to migrate Drools 2.1 to 4.0.7 using SpreadsheetCompiler.
What do these numbers mean in following exception?
org.drools.rule.InvalidRulePackage: [9,18]: unknown:9:18 mismatched token:
[@44,188:188='.',<8>,9:18]; expecting type THEN[20,18]: unknown:20:18
mismatched token: [@90,402:402='.',<8>,20:18]; expecting type THEN[31,18]:
unknown:31:18 mismatched token: [@136,606:606='.',<8>,31:18]; .
Thanks,
Hong
15 years, 9 months
drools-solver XML schema/detailed description?
by Andrew Waterman
Hi,
My apologies for my earlier double post, I'm having some troubles with
my mail client.
I'm writing to see if anyone has any detailed information on an XML-
schema, or, a more detailed break-down of the drools-solver
configuration files. Basically, I'm trying to find out the set of
available tags in drools-solver without going through the XML parsing
code. In particular, I'm curious about the options with regards to
the "<selector>" tag. In the "curriculumCourseSolverConfig.xml" file
for the curriculum drools-solver example, the sub-tag "topSize' is
used in the selector configuration:
<selector>
<selector>
<topSize>10</topSize>
</selector>
<selector>
<selector>
<moveFactoryClass>
org
.drools
.solver
.examples
.itc2007.curriculumcourse.solver.move.factory.RoomChangeMoveFactory
</moveFactoryClass>
<relativeSelection>0.002</relativeSelection>
</selector>
.... [list of further move factories]
</selector>
In addition, the "relativeSelection" subtag is used as well.
What do these subtags mean? Is there a way to let the selector move
through different weighted MoveFactories?
Thanks!
best wishes,
Andrew
---------------------------------
Andrew Waterman
San Cristóbal de las Casas, Chiapas, Mexico
+52 1 967 107 5902
+1 510 342 5693
15 years, 9 months
Drools-solver -- solution questions
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
15 years, 9 months
Defining facts declaratively with TypeDeclaration and assert facts from java
by Ronald Brindl
Referring to threads
http://thread.gmane.org/gmane.comp.java.drools.devel/2860
Dynamic Facts: how to get jar wih Facts declared in drl
http://thread.gmane.org/gmane.comp.java.drools.devel/2595
TypeDeclaration plugin heirarchy
I am just in the process of evaluating the possibilities of using Drools.
Our use case is the following:
We have a dynamic metamodel, which gets generated from database during
application initialisation phase. Then a runtime model gets instantiated,
which is fed from incoming messages (files, jms, etc.)
Both models are highly generic, basically maps of maps (lists of lists, for
model instances)
Now, i would like to publish the metamodel to Guvnor as fact model, so that
business rules users can use it there and define
In the last 2 days i dived into the sources, read the mailing list entries
above, documentation and so on, but i still don't have a clear vision on
how to accomplish that.
Our first approach was to use TypeDeclaration, i.e. to dynamically create
DRL that defines the fact types as defined in our metamodel, but i don't
have a clue on how to assert data for those types, since i don't have the
resulting java classes available in Java.
(There was also some confusion: in the documentation (M5) it says, bytecode
is generated for declaratively defined Facts, but i could not find anything
in the code, where this byte code is generated)
Our next approach was to generate interfaces as Fact types and create
proxies to access the data. This would also allow us to implement another
use case, that demands access to messages already stored in the database
with the same id as the incoming messages, and compare what fields are new
and to provide merging of new and old data.
I also had a quick look at the new Pipeline concept, but as far as i
understand that, it builds on a statically defined FactModel.
Then i dived a little bit more into the code and saw code generation for
accessing Java class facts, which also might be a reasonable solution for
us.
However, what i was asking myself was, if there is some entry point for
functionality like that, some existing API.
Thank you,
ron.
--
Ronald Brindl
Sr. Software Developer
Member of Architecture Team
The Goldensource Corporation
15 years, 9 months