Stateless vs Stateful
by Rob Fisher
We have a batch application that will have 50 - 60 rule sets, comprised of 5 - 75 rules each. We'll run a group of individuals through the rules and potentially qualify them for various awards. We'll insert 10 facts, each containing a unique set of attributes which will be used in the rule sets to determine potential qualification. The batch process will insert one individual's data (10 facts) at a time, fire the rules, and return the results. The data on the objects inserted will remain static.
Also, in the future, we'd like to integrate the rule sets with a 'what if' web application, wherein the individual can modify the input data, fire the rules, and see the results.
Given this, can you recommend whether a Stateful or Stateless knowledge session is more appropriate than the other? Is one more appropriate for a batch vs online application?
Thanks
Rob
13 years, 3 months
Options for rule versioning
by Rob Fisher
Looking for best practice recommendations around the versioning of a rule. Our application will have 50-60 rule sets comprised of up to 70 rules each. The activation of many of the rules will be based on a processing date (inserted fact attribute). The application processing date can be prior, equal, or after the system date.
For example, 2 rules, with slightly different logic
Eligibility rule version 1
//to be potentially activated for application processing time period prior to 2011
When
Car(color = "blue")
Then
Terms(eligible = "yes")
Eligibility rule version 2
//to be potentially activated for application processing time period 2011 and forward
When
Car(color = "blue", type="coupe")
Then
Terms(eligible = "yes")
We've come up with a couple of different ways to handle this:
1. Add Date logic to LHS of the rule . i.e add "Control(processingDate < '01/01/2011')" to 1st rule and "Control(processingDate >= '01/01/2011')" to 2nd rule. First rule would activate with processing date = 12/31/2010 and 2nd rule would activate with processing date = 07/31/2011. When originally authored, first rule would be written without date logic. When 2nd rule is authored, data logic will need to get added to both.
2. We explored a way of setting the session clock to the processing date and using the 'date-effective' and 'date-expires' attributes to do the filtering. i.e. 1st rule is effective until 12/31/2010 and 2nd rule is effective from 01/01/2011 to 12/31/9999. However, we could only figure out how to do this with a stateful knowledge session. Is it possible in a Stateless?
3. We added metadata to the rules (@EffectiveDate and @ExpirationDate), and using agendafilter, we compared processing date to the metadata and return true or false dependent on comparison.
What are your opinions on these three methods? What are other options?
Thanks
Rob
13 years, 3 months
Error in Guvnor with Enumerations (5.1.1)
by John Peterson
Reposting since I didn't get any takers. I'm hoping it might have been because I sent it to the list on a Friday afternoon (2 weeks ago).
Hey,
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
13 years, 3 months
Inconsistent syntax behaviour
by Swindells, Thomas
Continuing trying to upgrade from drools 5.1 I've been finding some strange funnies in rules behavior. Currently I'm using <droolsVersion>5.3.0.Beta1</droolsVersion>
<jbpmVersion>5.1.0.Final</jbpmVersion>
<mvelVersion>2.1.Beta6</mvelVersion>
In our model we've got some lists (Yuck I know) and we want to test whether they are not empty, there are three variations of the rules that we could use
rule "TESTa"
when
t : Title(t.getMyList().isEmpty() == false)
then
logger.debug(drools.getRule().getName() + " " + drools.getTuple());
end
rule "TESTb"
when
t : Title(myList.isEmpty() == false)
then
logger.debug(drools.getRule().getName() + " " + drools.getTuple());
end
rule "TESTc"
when
t : Title(myList.empty == false)
then
logger.debug(drools.getRule().getName() + " " + drools.getTuple());
end
I'd expect all of these formats to work (particularly c) however only TESTa succeeds, the other two FAIL SILENTLY, failing to match anything but not generating any errors or warnings.
Thomas
________________________________
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
13 years, 3 months
Artificial Intelligence Headlines Rules Fest '11
by Mark Proctor
rulesfest.org
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/821eed...>
/A conference by developers for developers/
Forward this message to a friend
<http://oi.vresp.com/f2af/v4/send_to_friend.html?ch=f913bd11ad&lid=1471764...>
October 24-27, 2011 • Burlingame, CA • Rules Fest 2011
*Calling all /developers, engineers, programmers, and architects/ who
use reasoning technologies to build products and services*
------------------------------------------------------------------------
Rules Fest Announces
*Dr. Andrew Ng, Director of the Artificial Intelligence Lab at Stanford*
& an expert in Machine Learning
will round out the 2011 Rules Fest Conference Agenda
------------------------------------------------------------------------
Rules Fest, the /International Conference on Reasoning Technologies/,
was established 3 years ago to present a technical forum by developers,
for developers ... the people who are chartered with /computational
reasoning/, the most applied category of artificial intelligence, to
further technology development. Given the exhilarating, and sometimes
frightening, pace with which technology evolves and its fickle and
unpredictable propensity to do so, Rules Fest has diversified its
technology portfolio to include powering the semantic web, controlling
autonomous agents, and adding intelligence to a myriad of mobile apps.
In addition, cloud-based technology offers a value not previously
available in the history of computing: data and mechanics are ever-more
accessible to developers, making the cloud more practical and efficient.
These topics will be presented and discussed -- formally and socially --
at the Rules Fest 2011 conference.
*Rules Fest attendees develop Apps That Think.™* /Are you one of us?/
We invite you to join the Rules Fest Community
<mailto:brenda@visionartscommunications.com?subject=Join%20Rules%20Fest%20Community&body=Please%20add%20me%20to%20your%20communications%20distributions.%0A%0AMy%20company%20is%3A%0A%0AMy%20title%20is%3A>:
the developers, inventors and managers
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/255f7c...>
responsible for delivering the innovation and technology that keeps
moving the ball forward. In addition to the annual conference held in
October, we are developing webinars, papers, virtual boot camps and
others tools to share ideas and information within the community.
*2011 conference keynotes focus on artificial intelligence
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/ebf9cc...>*
Keynote speakers for Rules Fest 2011 include thought leaders in the area
of artificial intelligence: *Paul Haley* who will present a Roadmap for
Rules, Semantics, and Business
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/b1f56d...>;*Dr.
Said Tabet*, who will discuss Semantic Technologies and the Cloud: Rules
for the Next Generation
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/c39c00...>;
and *Dr.Andrew Ng*, whose Machine Learning and other AI programs
presented by Stanford faculty have generated nearly 200,000
registrations this month.
A special early bird package for the October 24-27 conference at the
Hyatt Regency Burlingame (just sHyatt Regency Burlingameouth of San
Francisco) is available for registrants, including:
* Full conference access: 30 programs
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/9e2324...>,
breakfast/lunch/snack each day, free access to the nightly Founders
Lounge, free wifi during conference, exhibit, career center access
(including posting your resume);
* One boot camp: technical, hands-on sessions
* Four nights at the Hyatt Regency Burlingame, including access to the
fitness center, Knuckles Sports Lounge, shuttle to shopping and easy
access to San Francisco via BART from the airport;
* Conference shirt (golf or tee)
* 10% discount off from next year's registration
Register now
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/869520...>
to take advantage of the early bird discount.
Conference General Admission registration is available for $449 for
those who do not need a hotel. Special early pricing for individual boot
camps is also available at a cost of $249 per session. A discounted rate
of $149/nigh
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/5c7d25...>t
is offered by the Hyatt Regency Burlingame until September 30, 2011.
Confused about reasoning technologies? Review the wikipedia posting
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/8145f4...>
to see where your interests lay or what system types may apply to your
requirements.
Join the dialogue:
LinkedIn.com: Groups - Rules Fest
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/2413f1...>
LinkedIn Groups: Rules Fest
Like us on Facebook: Rules Fest
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/a4a384...>
Like us on Facebook: Rules Fest
Follow us on Twitter
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/49551d...>
Follow us on Twitter: @rulesfest
Rules Fest is a conference for all levels of skills. Unsure about Rules
Fest
<http://cts.vresp.com/c/?VisionArtsCommunicat/f913bd11ad/11698b4526/ad3b2a...>?
Need more info? Contact us
<mailto:info@rulesfest.org?subject=Need%20more%20info%20about%20Rules%20Fest>.
------------------------------------------------------------------------
Red Hat|JBoss is a Super Platinum sponsor of Rules Fest 2011
*Red Hat|JBoss is a Super Platinum sponsor of Rules Fest 2011*
------------------------------------------------------------------------
Click to view this email in a browser
<http://hosted.verticalresponse.com/756695/f913bd11ad/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?f913bd11ad/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/f913bd11ad>
13 years, 3 months
Insert a fact into drools server from a web application or java application
by kkelleyjr
Ok, I have read the documentation like a million times. I have looked at all
the examples. Yet I still can not figure out how to add a fact to the drools
server ksession1 from a web application or a java application. I have got
the server to work. I have even got the soapUI to work. now I want to add a
fact from my own client.
My issue is that I need to add a facts that has maps and list in the pojo.
how can I just add the pojo to the ksession1? Is there an example that is
out there that I have not found?
It seems simple, but I just do not understand... can someone provide some
additional help, please?
--
View this message in context: http://drools.46999.n3.nabble.com/Insert-a-fact-into-drools-server-from-a...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months