Mapping fields of all theses facts takes too much times
by ronan.quintin
Hello / Bonjour
I recently updated my version of Drools from 3 to the 5.4 Final. My drools
integration in version 3 intend to directly insert (or more precisely
"assert") our business objects to working session. Our *b*usiness *o*bjects
had and still have some getters which directly performs SQL request.
Our current problem is that with a 5.4 declarative model we have to map all
fields from our bo model to the declarative model. But we have a lot of BO
(over 3K) which all have to be inserted to the session, so a lot of SQL
queries are performed which increases (a lot) the execution time.
That's why i wondered if there isn't any way to directy insert our BO into
the session using the Guvnor's POJO model. It's seems that guvnor refuse to
directly take our jar, but maybe there is an option which makes it accept
any jar.
Anyway i think that we can generate a jar which contains interfaces of all
BO, and then directly insert BO into the session, but i'm not sure of Drools
behaviour.
I'm perfectly aware that it's quite ugly, and if you have any other idea to
perform a "lazy loading direclty from database", i'l take it.
Regards / Cordialement
--
View this message in context: http://drools.46999.n3.nabble.com/Mapping-fields-of-all-theses-facts-take...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
Deploy package across several Drools-Guvnor servers (unattended)
by ciberg2
Hi,
I have a application that will be installed in several locations, and
because of connection constraints, each location will run its own
Drools-Guvnor server with a deployed package consisting of decision tables
and BPMN processes.
I want to make possible that when some asset is changed centrally, this
change can be deployed (or replicated) across all Drools servers.
I read about KnowledgeAgent to make hot deployments, but as far as I
understood someone has to still build the package in each of the servers.
Is it possible to do what I want? If yes please give me some tips on how to
do it.
If not what can I do to solve the deployment across multiple servers
problem?
--
View this message in context: http://drools.46999.n3.nabble.com/Deploy-package-across-several-Drools-Gu...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
How to count the number of events that happened in the last X minutes and fire if is greater than Y
by Adrián Paredes
People,
I'm new at Drools Fusion and I found a problem when I'm tryin to implement
a Rule. I need to count the number of events that happened in the last X
minutes, and fire the rule if the count is greater than Y.
When I use window:time(Xm), each event slide the window, and does not help.
¿What should I do to solve my problem?
Thx in advance.
Regards.
--
*Epidata Consulting | Deploying Ideas
Ing. Adrián M. Paredes | Arquitecto Desarrollador
adrianp(a)epidataconsulting.com | Cel: (54911) 3297 1713
----------------------------------------------------------------------------------------------------------------------------
Argentina: Maipú 521 Piso 7 | Buenos Aires | Of: (5411) 5031 0060
Chile: Apoquindo 3600 Piso 7 y 9 | Las Condes - Santiago | Of: (+56) 2 495
8450
---------------------------------------------------------------------------------------------------------------------------
www.epidataconsulting.com
Linkedin <http://bit.ly/epidatalinkedin> |
Facebook<http://www.facebook.com/epidata.consulting>
| Twitter <http://twitter.com/epidata>
*
12 years, 11 months
Upgrading/Migrating from Guvnor 5.0.0 to 5.5.0
by sage.sam
We've been running drools-guvnor on JBoss EAP 5 for quite some time now.
Today I downloaded and installed JBoss EAP 6.1 and drools-guvnor 5.5. I got
both started without any real problems; so far so good.
My next step was to see if I could migrate everything from the guvnor 5.0
repository to the 5.5 repository. I used the admin export tool, saved the
export, imported into guvnor 5.5 -- all cleanly: no errors of any kind.
The screen refreshed... and less than half of my packages are present!
On a whim, I tried to create a new package, one with the same name as one of
my missing packages. Knowing package names need to be unique, I wondered if
this might jog its memory. It failed to let me create the package, logging
an exception:
RulesRepositoryException: A module name must be unique
So it would appear that my package exists somewhere in the repository, but I
can't see it. In fact, I can search for functions and rules that exist in
that package, open them, and save changes. But the package still doesn't
appear.
Anyone have any ideas on what went wrong or how to fix it?
--
View this message in context: http://drools.46999.n3.nabble.com/Upgrading-Migrating-from-Guvnor-5-0-0-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
[Drools Planner] Multi depot CVRP / CVRPTW
by Mats Norén
Hi,
I've been looking at the VRP example in Drools and I'm thinking about using
it for multi depot cvrp and / or capacitated vrp with time windows.
Has anyone else tried planner for these use cases and can maybe shed some
light on their implementation?
Regards,
Mats
12 years, 11 months
Upgrade options and considerations
by Lance Leverich
My company started out using Drools/Guvnor v5.1.1, for a single
product/project. Later, we decided to start building an enterprise oriented
service, which was partially completed and is based upon Drools/Guvnor
v5.3.0.
Recently, the decision has been made to get all of our Drools/Guvnor
instances running the same version. I ran into issues (mostly related to
dependencies and the use of rule-flows) when I initially attempted to just
get everything running on v5.3.0. But those issues seem to have all gone
away when I replaced my rule-flows with BPMN's and moved everything to a
v5.3.5 instance.
My question, for this group, is whether there are good reasons to move even
further forward and upgrade everything to v5.4.x? If so, what might those
reasons be? Are there any known, significant, issues in one or more of the
5.4 versions? Is there any consensus on which patch version of the 5.4 tree
would be best? I have already been told by upper management that they would
not support moving to v5.5.x, so that's not even on the table.
Any feedback would be appreciated.
Lance Leverich
12 years, 11 months
Drools and Hadoop
by gboro54
We basically have a batch application which needs to be able to pump through
2 billion records and apply a relatively small ruleset(say a couple hundred
rules). My thought is to look at doing something with Drools and Hadoop but
I am wondering if anyone else has done a large dataset such as this(I have
watched the video on large data drools and it has some good ideas but I am
wondering if there is any other experiences).
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-and-Hadoop-tp4023329.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
newbie: getWorkingMemoryEntryPoint returns NULL
by Itai Frenkel
Hello,
I've got the following basic code that sets up drools in STREAM mode, with a pseudo clock.
And it fails on the last line that asserts there is an entrypoint named "testEntryPoint".
The DRL file references the entry-point which according to the documentation is enough.
What am I missing?
Itai
declare Message
@role(event)
@timestamp(timestamp)
end
declare AppInfo
@role(event)
@timestamp(timestamp)
end
rule "Change message type after one minute"
dialect "mvel"
when
$appinfo:AppInfo() from entry-point "testEntryPoint"
$message:Message( type == "before", $msgtext : msgtext, this after[ 1m ] $appinfo )
from entry-point "testEntryPoint"
then
System.out.println( $msgtext );
modify ( $message ) {
type = "after"
}
end
private void initDrools() {
KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
// Stream mode allows interacting with the clock (Drools Fusion)
config.setOption(EventProcessingOption.STREAM);
kbase = KnowledgeBaseFactory.newKnowledgeBase(config);
kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
// this will parse and compile in one step
kbuilder.add(ResourceFactory.newClassPathResource(RULE_FILE, DroolsExpertTest.class), ResourceType.DRL);
// Check the builder for errors
assertThat(kbuilder.hasErrors())
.overridingErrorMessage(kbuilder.getErrors().toString())
.isFalse();
// get the compiled packages (which are serializable)
Collection<KnowledgePackage> pkgs = kbuilder.getKnowledgePackages();
// add the packages to a knowledgebase (deploy the knowledge packages).
kbase.addKnowledgePackages(pkgs);
KnowledgeSessionConfiguration conf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
conf.setOption(ClockTypeOption.get("pseudo"));
ksession = kbase.newStatefulKnowledgeSession(conf,null);
clock = ksession.getSessionClock();
entryPoint = ksession.getWorkingMemoryEntryPoint("testEntryPoint");
assertThat(entryPoint).isNotNull();
}
12 years, 11 months