In this article, Cristina Belderrain describes the Encapsulated Business Rules pattern and shows how rule-based components can be implemented as message-driven beans to provide flexible, sophisticated business services. The sample source code applies encapsulated business rules to a real world application and shows how to turn a distributed component such as an EJB into a rule-based component.
Read Message-Driven Beans and Encapsulated Business Rules
-
Designing Rule-Based MDBs using Encapsulated Business Rules (29 messages)
- Posted by: Nitin Bharti
- Posted on: November 11 2003 12:01 EST
Threaded Messages (29)
- Here are a few links by Greg Barton on November 11 2003 15:06 EST
- And another by Murray Knox on November 11 2003 15:14 EST
- Here are a few links by Carlos Perez on November 12 2003 10:32 EST
- Blackboard pattern revisited by Steven Ostrowski on November 12 2003 05:06 EST
-
Drools with J2EE by Lofi Dewanto on November 13 2003 03:53 EST
- Experience with drools by glauco scheffel on November 16 2003 02:56 EST
- Drools and J2EE Article by paul browne on November 01 2005 04:38 EST
- See also... by David Lambert on November 11 2003 17:28 EST
- Designing Rule-Based MDBs using Encapsulated Business Rules by Rob Davies on November 11 2003 17:30 EST
- Designing Rule-Based MDBs using Encapsulated Business Rules by luiz bucci on November 11 2003 18:40 EST
- Got to disagree by Greg Barton on November 11 2003 22:58 EST
-
performance problems by Alexander Titov on November 12 2003 02:07 EST
-
performance problems by Corby Page on November 12 2003 10:09 EST
- performance problems by Corby Page on November 12 2003 10:12 EST
-
performance problems by Corby Page on November 12 2003 10:09 EST
- you comments don't advance anything by bruce goldstein on November 12 2003 10:04 EST
- Must agree... by Race Condition on November 13 2003 01:48 EST
- re: Got to disagree by Gretchen Gringer on December 01 2003 11:55 EST
- Got to disagree by Race Condition on December 03 2003 09:30 EST
-
performance problems by Alexander Titov on November 12 2003 02:07 EST
- Tosser by Web Master on November 12 2003 03:22 EST
- Tosser by Rodolfo de Paula on November 12 2003 07:05 EST
- combination of workflow engine and rules engine by Holger Engels on November 12 2003 06:10 EST
- Rule Engine Products by Mark Eastwood on November 12 2003 09:31 EST
- Rule Engine Products by Cristina Belderrain on November 13 2003 15:00 EST
- Cristina Belderrain Advisor's rule by Glauber Gallego on June 14 2004 07:57 EDT
- Rule Engine Products by Cristina Belderrain on November 13 2003 15:00 EST
- Great for simulators by Edwin Mol on November 17 2003 09:34 EST
- Truly the heart of open source development. by Bryan Hansen on December 02 2003 23:03 EST
- serious agree by kevin yong on June 14 2004 22:30 EDT
- did any one test drive the article? by maninder batth on October 29 2004 11:07 EDT
- Would you further explain your assertion? by Cristina Belderrain on October 29 2004 16:32 EDT
-
Here are a few links[ Go to top ]
- Posted by: Greg Barton
- Posted on: November 11 2003 15:06 EST
- in response to Nitin Bharti
http://www.pst.com/opsj.htm
http://drools.org/index.html
http://herzberg.ca.sandia.gov/jess/
http://www.ilog.com/
Try those rule solutions before rolling your own.
And, if you're going to create your own rule evaluation engine, at least make it JSR-94 compliant.
http://www.jcp.org/en/jsr/detail?id=94
Cheers! -
And another[ Go to top ]
- Posted by: Murray Knox
- Posted on: November 11 2003 15:14 EST
- in response to Greg Barton
You could also try IDIOM http://www.idiomsoftware.com
It's service based rules engine that be accessed directly, via JMS, EJB, SOAP etc. -
Here are a few links[ Go to top ]
- Posted by: Carlos Perez
- Posted on: November 12 2003 10:32 EST
- in response to Greg Barton
Here we go again!
Here's are a ton of open source rule engines written in Java.
11 of them as of last count. Haven't add con:cern yet since I can't figure out yet what its about. Also, I'm not going to add this article 'coz its another case of reinventing the wheel.
Enjoy! -
Blackboard pattern revisited[ Go to top ]
- Posted by: Steven Ostrowski
- Posted on: November 12 2003 17:06 EST
- in response to Carlos Perez
This is also another play of the already-documented Blackboard pattern from POSA, volume 1. However, it does explain an implementation better than POSA does. -
Drools with J2EE[ Go to top ]
- Posted by: Lofi Dewanto
- Posted on: November 13 2003 03:53 EST
- in response to Carlos Perez
Has anyone tried to implement Drools within J2EE with EB and MDB? If yes, please tell your experience...
Thanks,
Lofi.
http://www.openuss.org -
Experience with drools[ Go to top ]
- Posted by: glauco scheffel
- Posted on: November 16 2003 14:56 EST
- in response to Lofi Dewanto
A perfect BRE must offer:
a) a debbuger;
b) an editor;
c) an auditing tool, integrated with a workflow;
Without a debbuger drools can be use only to teach the concpet. -
Drools and J2EE Article[ Go to top ]
- Posted by: paul browne
- Posted on: November 01 2005 04:38 EST
- in response to Lofi Dewanto
Good article on Drools and J2EE on onjava.com at:
http://www.onjava.com/pub/a/onjava/2005/08/24/drools.html
Paul
FirstPartners.net -
See also...[ Go to top ]
- Posted by: David Lambert
- Posted on: November 11 2003 17:28 EST
- in response to Nitin Bharti
One more product to consider before building a rules engine:
http://www.resolutionebs.com/products.html
The big differences with Centrifuge: (1) business analysts can enter and maintain rules -- not just coders; (2) Centrifuge supports batch-like rule execution, but it can also power a very interactive UI. -
Designing Rule-Based MDBs using Encapsulated Business Rules[ Go to top ]
- Posted by: Rob Davies
- Posted on: November 11 2003 17:30 EST
- in response to Nitin Bharti
I actually found the posting of an well written and informative design pattern with no mention of 'vendor this or open source that' a refreshing change from some of the recent postings - thank you!
cheers,
Rob -
Designing Rule-Based MDBs using Encapsulated Business Rules[ Go to top ]
- Posted by: luiz bucci
- Posted on: November 11 2003 18:40 EST
- in response to Rob Davies
I agree, great article.
LB -
Got to disagree[ Go to top ]
- Posted by: Greg Barton
- Posted on: November 11 2003 22:58 EST
- in response to Rob Davies
Got to disagree with you. While the article described a useful design pattern, it's about 10 years out of date. No one should write code that performs the evaluation cycle of a ruleset except as an academic exercize.
It's been done, several times before, and by programmers better than 99% of the coders out there. If any programmer that worked for me insisted on rolling his own rule evaluation framework instead of using an existing one I'd fire him in a heartbeat. -
performance problems[ Go to top ]
- Posted by: Alexander Titov
- Posted on: November 12 2003 02:07 EST
- in response to Greg Barton
No one should write code that performs the evaluation cycle of a ruleset except as an academic exercize.
Totally agree with Greg. Performance is the main problem with predictive rules. When the number of rules is less then hundred (academic example), the evaluation cycle could be acceptable. But in real world the number of rules could exceed thousands, and dozens thousand, and such cycle is not acceptable.
It will be necessary to use some special algorithms from neural networks domain.
Alexander -
performance problems[ Go to top ]
- Posted by: Corby Page
- Posted on: November 12 2003 10:09 EST
- in response to Alexander Titov
But in real world the number of rules could exceed thousands, and dozens thousand, and such cycle is not acceptable.
Forget the cycle for a moment, the pattern requires that each rule is its own running thread. Since each rule can only have a boolean outcome, you can easily get into several thousand rules building a moderately complex system.
I don't believe this solution will scale for larger problems, and the structure is probably overkill for smaller problems. -
performance problems[ Go to top ]
- Posted by: Corby Page
- Posted on: November 12 2003 10:12 EST
- in response to Corby Page
Sorry, meant to say each Evaluator is its own running thread. -
you comments don't advance anything[ Go to top ]
- Posted by: bruce goldstein
- Posted on: November 12 2003 10:04 EST
- in response to Greg Barton
I disagree with you. Userstanding patterns here is key. Yes, we want to use existing projects and not re-invent the wheel, but it is useful to know the patterns behind these projects. I personnaly would not want anyone working for me who did not undertsand how a rules engine worked.
Also, talking about firing people is not helpful to this site. Isn't it enough to say that you disagree and why. The site is about learning and knowledge sharing, not about corporate politics.
Bruce -
Must agree...[ Go to top ]
- Posted by: Race Condition
- Posted on: November 13 2003 13:48 EST
- in response to Greg Barton
Is Barton a Wanker or a SUPER GENIUS? -
re: Got to disagree[ Go to top ]
- Posted by: Gretchen Gringer
- Posted on: December 01 2003 11:55 EST
- in response to Greg Barton
Greg, in regards to both the usefulness of this article and your management pratices, your comment is utter rubbish. The article was titled "How to design a rule-based MDB." As such, it was very insightful and helpful in understanding the basic mechanics of a rules engine. It is not necessary, nor desired, for the article to make references to actual products. Please keep in mind that this site exists for academic purposes, as well as practical application-and-use reviews. If we wanted a product review for a rules engine, we could pick up JDJ. I, for one, am very appreciative of Ms. Belderrain's efforts.
Excellent work, Christina! -
Got to disagree[ Go to top ]
- Posted by: Race Condition
- Posted on: December 03 2003 09:30 EST
- in response to Greg Barton
Yeah, Greg's an idiot. -
Tosser[ Go to top ]
- Posted by: Web Master
- Posted on: November 12 2003 03:22 EST
- in response to Nitin Bharti
Greg Barton,
What a complete wanker. -
Tosser[ Go to top ]
- Posted by: Rodolfo de Paula
- Posted on: November 12 2003 07:05 EST
- in response to Web Master
The article is great. Personally, no fear about building business solutions using this pattern.
<Greg Barton>
"If any programmer that worked for me insisted on rolling his own rule evaluation framework instead of using an existing one I'd fire him in a heartbeat."
</Greg Barton>
Just curious : what would you do if your programmer/architect show you http://www.caucho.com/hessian/ as an alternative to Web Services for a small or even medium project ?
<Kambiz Shahri>
"What a complete wanker"
</Kambiz Shahri>
Wanker (definition from http://www.urbandictionary.com) :
"Derogitory term used to infuriate Americans as they don't know what it means."
Rodolfo -
combination of workflow engine and rules engine[ Go to top ]
- Posted by: Holger Engels
- Posted on: November 12 2003 06:10 EST
- in response to Nitin Bharti
con:cern tries to apply the rule based processing idiom to the workflow world. Sorry, the homepage is in german, only. But will be translated, soon! Also the graphical modeller is not online yet.
Holger Engels -
Rule Engine Products[ Go to top ]
- Posted by: Mark Eastwood
- Posted on: November 12 2003 09:31 EST
- in response to Nitin Bharti
While I understand the pattern, I fail to see why anyone in 2003 would code rules this way. Why not use a commercial rules engine such as Blaze Advisor? Check out http://www.fairisaac.com/Fairisaac/Solutions/Enterprise+Decision+Tools/Blaze+Advisor+Tech.htm -
Rule Engine Products[ Go to top ]
- Posted by: Cristina Belderrain
- Posted on: November 13 2003 15:00 EST
- in response to Mark Eastwood
Mark Eastwood wrote:
> While I understand the pattern, I fail to see why anyone in 2003
> would code rules this way. Why not use a commercial rules engine
> such as Blaze Advisor? [snip]
Hi Mark,
thanks for your message. First, let me notice that my article clearly states why you should (and should not :-)) use a commercial rule engine. Please see the "Forces" section.
Now, in case you haven't had an opportunity to actually use Blaze Advisor, I think you might want to take a look at a small Advisor rule set I wrote a couple years ago. If you would like to get it, just let me know so I can send you a copy as a TXT email attachment (11 KB). If you're looking for a quick way to assess the differences between a commercial rule engine and the approach described in my article, this would probably help.
Regards,
Cris -
Cristina Belderrain Advisor's rule[ Go to top ]
- Posted by: Glauber Gallego
- Posted on: June 14 2004 19:57 EDT
- in response to Cristina Belderrain
Now, in case you haven't had an opportunity to actually use Blaze Advisor, I think you might want to take a look at a small Advisor rule set I wrote a couple years ago. If you would like to get it, just let me know so I can send you a copy as a TXT email attachment (11 KB). If you're looking for a quick way to assess the differences between a commercial rule engine and the approach described in my article, this would probably help.
Hi Cristina,
I'd like to receive a copy of your work about Advisor rules.
my mail: ggallego(at)bol(dot)com(dot)br
Thanks,
Glauber -
Great for simulators[ Go to top ]
- Posted by: Edwin Mol
- Posted on: November 17 2003 09:34 EST
- in response to Nitin Bharti
I was looking for a way to efficiently simulate systems that communicate via
JMS with our system running on a J2EE server, when I stumbled on this article.
The pattern applies very nicely to this kind of problem.
Thanks! -
Truly the heart of open source development.[ Go to top ]
- Posted by: Bryan Hansen
- Posted on: December 02 2003 23:03 EST
- in response to Nitin Bharti
I was glad that I waited a few days to post my response to this article. First, let me say to Cris that this is a great article. Second, I think it is very sad that some people are smashing the creativity of their programmers. It is not a good idea to let your developers always be code cowboys, but this IS how we got a lot of the tools we use today. Many frameworks have been opensourced from companies that developed something inhouse that ended up working very well for more generalized situations. A perfect example of this are tools like log4j. It is still maintained and developed by basically one person, Ceki Gülcü.
By not allowing people to use there creative abilities software development would slow down to a crawl. Why use something like Java when you can do anything in C that you can in Java? I don't agree with that philosophy, but it is of the same mentality of telling your programmers to not think because we already have a language that we can do anything we need to with.
Great article Cris, I am currently looking at integrating something like this into a large application. Instead of just speculating what will and won't happen, I will be prototyping some code and run load tests against it. We so often get wrapped up in what happens when we have 4 million users on our system that we don't bother to worry about getting 4 people on out system.
Thanks again. -
serious agree[ Go to top ]
- Posted by: kevin yong
- Posted on: June 14 2004 22:30 EDT
- in response to Bryan Hansen
The idea is of the most important. Though we have some full-fledged solution, we need new idea.
Great article.
Thanks. -
did any one test drive the article?[ Go to top ]
- Posted by: maninder batth
- Posted on: October 29 2004 11:07 EDT
- in response to Nitin Bharti
I think no one really took an oppurtunity to use the article in real live scenario. I did , and found 2 major problems
1. The most touted one here, "performance"
2. It simply fails when i tried it to embed it in well designed OO application -
Would you further explain your assertion?[ Go to top ]
- Posted by: Cristina Belderrain
- Posted on: October 29 2004 16:32 EDT
- in response to maninder batth
Hello,
I'm glad to know you've tested the code. Still, would you mind to explain exactly how it failed?
Thank you,
Cristina