running multiple instance of rule engine
by Neelesh Deo Dani
Hi,
I need a setup where multiple instance of drools rule engine will be running in different physical hosts. In each host, a web server (API) will be running which will receive an input event, process it and insert into rule engine (session) for rules execution on the same host. I'm using external persistent datastore. The objects will be populated from datastore before inserting into the session. After rule execution if there is any change in the state of the objects the same will be stored back to the datastore. The datastore calls are made outside the rule execution.
In this scenario, if an event comes to one host and another event comes to a different host, how will the temporal reasoning or correlation of events work? What is the recommended way of deploying multiple instance of rule engine for scalability?
Please help in this
regard.
Thanks & Regards,
Neel
14 years, 7 months
Fwd: Press Release: Call to Relieve Constraints on AI
by Mark Proctor
-------- Original Message --------
Rules Fest 2011
*PRESS RELEASE*
Forward this message to a friend
<http://oi.vresp.com/f2af/v4/send_to_friend.html?ch=a0cdd8f89d&lid=1471764...>
The Need to Relieve Constraints on Artificial Intelligence
<http://cts.vresp.com/c/?VisionArtsCommunicat/a0cdd8f89d/11698b4526/02fa31...>
Addressed at Rules Fest 2011
<http://cts.vresp.com/c/?VisionArtsCommunicat/a0cdd8f89d/11698b4526/17f81f...>
/Veteran AI Leaders Paul Haley and Said Tabet Slated to Address Developers /
/San Francisco, CA, August 2, 2011– /Organizers today posted the
abstracts for keynote speakers for Rules Fest 2011
<http://cts.vresp.com/c/?VisionArtsCommunicat/a0cdd8f89d/11698b4526/b2063d...>,
the International Conference on Reasoning Technologies, a conference by
developers for developers scheduled for the San Francisco Bay Area this
October 2011.
In a session titled “Roadmap for Rules, Semantics, and Business,” Paul
Haley
<http://cts.vresp.com/c/?VisionArtsCommunicat/a0cdd8f89d/11698b4526/819a3e...>,
who has been working to commercialize artificial intelligence for more
than three decades, says understanding the requirements for semantic
technology in enterprise vs. the capabilities of rules engines exposes
the need for more classic artificial intelligence and reasoning in our
technology, more emphasis on knowledge than rules in our services, and
more emphasis on knowledge technology strategy in the executive suite.
Haley will discuss the challenge that while semantic technology is
inevitably mainstream, it remains largely divorced from the activity of
knowledge engineering as practiced using business rule engines embedded
within business process management or complex event processing systems.
Semantic technology encodes meanings separately from data and content
files, and separately from application code. This enables machines as
well as people to understand, share and reason with them at execution
time. Semantic technologies make it easy to add, change and implement
new relationships or interconnecting programs in a different way. For
example, a context-aware, semantically-enabled system is able to
distinguish terms that are labeled differently but have the same
meaning, as well as terms that share the same label but have entirely
different meanings.
Cloud trust, information governance, risk management, and compliance,
distributed systems, mobile applications all offer a unique opportunity
to realize the true potential of knowledge technology. These systems are
usually covered by service level agreements that are rules-based.
Dr. Tabet’s discussion
<http://cts.vresp.com/c/?VisionArtsCommunicat/a0cdd8f89d/11698b4526/dff655...>,
“Semantic Technologies and the Cloud: Rules for the Next Generation,”
addresses the major challenges in information management while the
business environment also witnesses the drastic shift to cloud
computing. Dr. Tabet will address the trend of constraining artificial
intelligence and knowledge technologies in legacy environments, and says
enterprise knowledge management needs strong semantic technologies,
powerful inferencing systems, and advanced machine learning capabilities
– not more sophisticated spreadsheets. Dr. Tabet was a co-founder of the
RuleML Initiative in 2000, involved in artificial intelligence and its
applications for well over a decade. He recently refocused his efforts
on RuleML and Business Rules, XML, RDF and the Semantic Web as well as
deductive reasoning in financial services.
Rules Fest
<http://cts.vresp.com/c/?VisionArtsCommunicat/a0cdd8f89d/11698b4526/72cd85...>,
hosted by the non-profit Rules Fest Association, is a technical
conference geared toward software developers, engineers, programmers and
architects who create solutions to complex computing problems using
/reasoning technologies/
<http://cts.vresp.com/c/?VisionArtsCommunicat/a0cdd8f89d/11698b4526/6c855e...>:
rule-engines, logical reasoners, constraint-solvers, and other such
building-blocks of practical artificial intelligence (AI). More than 200
developers, engineers, programmers, and architectsfrom around the globe
are expected to attend the conference in Burlingame, California.
The conference will also feature a Career Center to address the war for
developer talent in technology companies. Companies seeking advanced
programming talent are invited to submit their open positions for
posting at no charge.
*Conference Fee and Package Pricing
*The standard fee for the conference is $499. All bootcamps –
addressing specific programming challenges and technologies -- are $299.
For a limited time, Rules Fest organizers are offering an early bird
rate of $1249 including an all-access conference pass, four nights at
the Hyatt Regency Burlingame, a boot camp of choice, and 10% off from
next year’s conference. This “early bird” rate is available until
September 30. Early discounts are also available for general admission
and for bootcamps without a hotel stay. To register, attendees should
visit the conference registration site
<http://cts.vresp.com/c/?VisionArtsCommunicat/a0cdd8f89d/11698b4526/c616b6...>
on the conference website.
*About Rules Fest*
The non-profit Rules Fest™ Association, Inc. produces the annual Rules
Fest conference, the world's only technical conference devoted to the
practical application of all reasoning technologies.
For a better understanding of reasoning systems, visit
http://en.wikipedia.org/wiki/Reasoning_System
<http://cts.vresp.com/c/?VisionArtsCommunicat/a0cdd8f89d/11698b4526/ae038d...>.
© Copyright 2011. All rights reserved. Rules Fest is a trademark of
Rules Fest Association.
For information, contact info(a)rulesfest.org
<mailto:info@rulesfest.org?subject=Question%20about%20Rules%20Fest%202011>
Media contact:**brenda@visionartscommunications.com
<mailto:brenda@visionartscommunications.com?subject=Rules%20Fest%202011>
------------------------------------------------------------------------
Click to view this email in a browser
<http://hosted.verticalresponse.com/756695/a0cdd8f89d/1471764023/11698b4526/>
If you no longer wish to receive these emails, please reply to this
message with "Unsubscribe" in the subject line or simply click on the
following link: Unsubscribe
<http://cts.vresp.com/u?a0cdd8f89d/11698b4526/mlpftw>
------------------------------------------------------------------------
Rules Fest Association, Inc.
4616 W. Sahara Ave #379
Las Vegas, NV 89102
US
Read <http://www.verticalresponse.com/content/pm_policy.html> the
VerticalResponse marketing policy.
Try Email Marketing with VerticalResponse!
<http://www.verticalresponse.com/landing/ef/?mm//a0cdd8f89d>
14 years, 7 months
Change order of columns in decision table
by jian zhi
Hi,
[GUVNOR-454] was fixed in Drools 5.1. It allows the user to change the order of the columns in the decision table(web-guided) from Guvnor. Does this function still exist in Drools 5.2? I couldn't find a way to do that.
Thanks,
Jian
14 years, 7 months
Condition syntax to access Map
by bolsover
I'm struggling with the syntax to access a mapped object - hoping that
someone can help with this..
I have the following condition in a rule:
$a : Answer(getAnswerData().get(0).getValue_str() == "Valves")
Answer is a pojo where answerData is a Map<Integer, AnswerData>
object.
AnswerData is also a pojo and has a String variable value_str.
Rule containing this condition complies but I get the following error when I
fireAllRules
[Error: null pointer or function not found: getValue_str]
[Near : {... getAnswerData().get(0).getValu ....}]
^
[Line: 1, Column: 1]
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:997)
The method getValue_str() does exist in AnswerData as does getAnswerData()
in Answer and there are not any null values.
I'm assuming that autoboxing will correctly interpret .get(0) as an Integer
object.
Any ideas??
--
View this message in context: http://drools.46999.n3.nabble.com/Condition-syntax-to-access-Map-tp320442...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months
How to remove Drools 5 facts from a web service
by Matthew Erler
I have a web service in which I'm using a Drools 5 StatefulKnowledgeSession object. The object lives between web service method invocations. The first thing that the service method needs to do is clear out all the facts inserted during the last service method invocation. I use StatefulKnowledgeSession.insert(Object fact) to add facts and StatefulKnowledgeSession.getAgenda().clear() to clear out all facts. I don't think that .clear() is doing what I think it is because by using a println() statement inside my one and only rule's consequence I can see information from previous rules that should be gone. In fact, the rule's consequence is invoked multiple times and I don't know why. It's during those multiple invocations that the .println() shows me information about the current and previous facts. The only method to fix this that I've come up with is to delete and recreate StatefulKnowledgeSession every time the web service's service method
is invoked, but that feels like a poor work-around. Any direction on how to delete facts is greatly appreciated. Thank you.
14 years, 7 months
Rule Task
by S.M.H.Jamali
Hello All
I create a simple JBPM Process by Eclipse Plugin that starts with a Script Task and after Script Task i want to add a Rule Task. In fact i want to fire a rule in my process to make a decision on the Gate Way node. I use Guvnor and JBPM Console to run my processes and after designing the processes i upload them to Guvnor.
My problem is : when i create a new instance of my process (in jbpm console) , first Script Task run fine , but execution of the process stops at Rule Task and no rule fired ! Am i missing something ?
Any Help Appreciated
S.M.H.Jamali
14 years, 7 months
Stateful vs. Stateless Session Performance
by Ryan R.
I have a usecase where I want to apply rules to messages that are received
and processed one message at a time.
I am thinking the stateless session matches this usecase. I was surprised
though to notice that the stateless session seemed to perform upwards of 10x
slower!
I am including the below source which illustrates my usage. The DRL file
used simply has one rule that does a simple modification on two fields.
There is some test code above this stuff that just pushes messages into the
plugin.
I am also including VisualVM profiling results. The top results are for the
stateful while the bottom are for the stateless. It looks like the stateless
performance is dominated by calls to ReflectionInstantiator.newInstance()?
StatelessKnowledgeSession Code:
public class DataConditionPlugin implements Plugin {
final KnowledgeBuilder kbuilder;
final StatelessKnowledgeSession ksession;
public DataConditionPlugin(String drlFileName) {
kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
// this will parse and compile in one step
kbuilder.add(
ResourceFactory.newClassPathResource(drlFileName,
DataConditionPlugin.class),
ResourceType.DRL);
// Check the builder for errors
if (kbuilder.hasErrors()) {
System.out.println(kbuilder.getErrors().toString());
throw new RuntimeException("Unable to compile \""+drlFileName+"\".");
}
// get the compiled packages (which are serializable)
final Collection<KnowledgePackage> pkgs =
kbuilder.getKnowledgePackages();
// add the packages to a knowledgebase (deploy the knowledge packages).
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(pkgs);
ksession = kbase.newStatelessKnowledgeSession();
}
@Override
public Object execute(Object message) {
ksession.execute(message);
return message;
}
}
StatefulKnowledgeSession Code:
public class DataConditionPlugin implements Plugin {
final KnowledgeBuilder kbuilder;
final StatefulKnowledgeSession ksession;
public DataConditionPlugin(String drlFileName) {
kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
// this will parse and compile in one step
kbuilder.add(
ResourceFactory.newClassPathResource(drlFileName,
DataConditionPlugin.class),
ResourceType.DRL);
// Check the builder for errors
if (kbuilder.hasErrors()) {
System.out.println(kbuilder.getErrors().toString());
throw new RuntimeException("Unable to compile \""+drlFileName+"\".");
}
// get the compiled packages (which are serializable)
final Collection<KnowledgePackage> pkgs =
kbuilder.getKnowledgePackages();
// add the packages to a knowledgebase (deploy the knowledge packages).
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(pkgs);
ksession = kbase.newStatefulKnowledgeSession();
}
protected void finalize() throws Throwable {
ksession.dispose();
};
@Override
public Object execute(Object message) {
FactHandle factHandler = ksession.insert(message);
ksession.fireAllRules();
Object o = ksession.getObject(factHandler);
ksession.retract(factHandler);
return o;
}
}
http://drools.46999.n3.nabble.com/file/n3208057/Screenshot-Java_VisualVM.png
--
View this message in context: http://drools.46999.n3.nabble.com/Stateful-vs-Stateless-Session-Performan...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months
error resolving class name on imported class when loading package
by lhorton
I am getting an error when the knowledge agent loads a pkg. The rules source
file contains an import for a class:
com.abclegal.domain.task.FileDocumentsWithCourtTask
and the RHS of a rule makes a cast using the class name without fully
qualifying it:
((FileDocumentsWithCourtTask)$step.getTask()).addDocument($doc);
I see the following error when the package is loaded by knowledge agent:
Error creating bean with name 'workflowKnowledgeAgent': Invocation of init
method failed; nested exception is [Error: unable to resolve method using
strict-mode: java.lang.Object.FileDocumentsWithCourtTask()]
[Near : {... ((FileDocumentsWithCourtTask)$st ....}]
note in the error that the FileDocumentsWithCourtTask is not being resolved
according to the import statement. The really odd thing about this is that
it doesn't get the error all the time. Sometimes the package is loaded
without error.
I can probably resolve this by fully-qualifying the class name within the
RHS, but you are not supposed to have to do that if you put the
fully-qualified name in the import of the rule.
Any clue why this error might happen?
--
View this message in context: http://drools.46999.n3.nabble.com/error-resolving-class-name-on-imported-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months