aspose file tools*
The moose likes JBoss/WildFly and the fly likes JBoss Rules Doubts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss Rules Doubts" Watch "JBoss Rules Doubts" New topic
Author

JBoss Rules Doubts

Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344
Hi all,

I want to learn/use rule engine in my project. So I took the open source rule engine JBoss Rules. Before that let me tell my skill sets.. I have one year of experience in Core Java,JSP, Servlets and Struts.

To start with Rule Engine, what are the prerequisite in terms of technology and other?

In fact, I now only going thru' what is ruke engine and why it should be used.. like that...

Still I don't have clear idea of how to implement/integrate the application with rule engine.

Whether JBoss Rule will be good to start with? I have gone thru' the JBoss Site for JBoss rule documentation.. apart from that any links/journal to start with will be useful..

And also expectecd to throw some light on it from RANCHERS


Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
Naveen K Garg
Ranch Hand

Joined: Nov 28, 2005
Posts: 105
Hi Micheal,

In order to understand the Rule Engine you should be aware of the business policy, business process etc.

The rule engines are mainly helps the business users. In a nutshell, you take out the business logic which is dynamic in nature and required change often let say on a monthly basis. So if you have coded the business rules in you application each time somthing changes you are required to do a new release of your application.

Instead of doing that you can externalized your business rule in a Business Rule Engine and then you can easily changes them.

Please gothrough the following guidelines which explains when to use a rule engine or not.

JESS Guidelines

Also go through the following website to get a clear picture on Rule Engines

Business Rule Community
EDM WebLog

Let me know if you have some specific questions.

Regards
Naveen Garg
Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344
Thanks for your Naveen..

And I am very new to the rule engine and just going thru' the JBoss Rules Documentation..

Whether any book/materials are available on JBoss Rules to start with? pls suggest me some good books on it. I just want to try some examples..

As a first step, I downloaded the pluging for JBoss JRule IDE and configured in the eclipse..

And also I have some basic doubts like all are related to JBoss JRules,and I think Drools is the rule engine is used)
1. How to invoke the rules?
2. Whether the rules can be configured as web services?
3. Can be portable/configured in any application server like weblogic/websphere.. mean to say any appllication dependent is there?
4. How easily a non-technical team can use this compared to other rule engines?
5. What will be some of the disadvantages of selecting JBoss as a Rule Engine?
6. Whether the rules can be invoked only from Java/J2EE or we can able to use any language like .Net..?
7. How long it will take to learn it?
8. Can we dynamically change the rules at runtime without deploying the application?
9. Any forum like java ranch speciaaly dedicated to JBoss JRules?

Throw some light on my direction for further move...

[ December 18, 2006: Message edited by: Micheal John ]
[ December 18, 2006: Message edited by: Micheal John ]
Naveen K Garg
Ranch Hand

Joined: Nov 28, 2005
Posts: 105
Hey Micheal,

Well as far as I know there is currently no book available for JBoss Rule.

As far as examples are concerns, I think the JBoss download files do provide a good set of examples.

Take a look at them and see if they answers to your questions.

You can also take a look at the JBoss Rules Mailing list.

I will try to give answers to your questions as best. Please bear with me if something is not answered.

1. How to invoke the rules?

Just check the FibonacciExample.java in the JBoss Rules examples and you will find how to execute a rule.

2. Whether the rules can be configured as web services?

Yes, you can expose your rules a web services which can be consumed either by a J2EE application or a .Net application.

3. Can be portable/configured in any application server like weblogic/websphere.. mean to say any appllication dependent is there?

No, I don't think there is any application server dependency. You can use JBoss Rule in any of J2EE application server. There might be some issues related to configuration.

4. How easily a non-technical team can use this compared to other rule engines?

Well, this all depends how you write your rules and how much comfortable a Business User is with the Rule Language. I believe most of the Business Rule Engine do provide a english like language and JBoss Rules is one of them. In the begining there might be a learning curve depending on the confort level of Business User.

5. What will be some of the disadvantages of selecting JBoss as a Rule Engine?

Well, if you want support and advance feature then the current version of JBoss Rule might not solve your problems. You can look at some commericial Business Rule Engines like ILOG, Blaze Advisor, PEGA for a comparision.

6. Whether the rules can be invoked only from Java/J2EE or we can able to use any language like .Net..?

Ideally you should be able to use any of these if you Rule Engine is providing Webservices for the rules. Again its all depends the Rule Engine capability. Some might provide it by default and in some case you might need to develop some adaptor kind of stuff.

7. How long it will take to learn it?

Diffcult question to answer. But if you know what a rule is and how to write it in a business language the learning curve might be smooth. It also depends on your comfort level.

8. Can we dynamically change the rules at runtime without deploying the application?

Yes, you can change. But again this is sepecific to Business Rule Engine.

9. Any forum like java ranch speciaaly dedicated to JBoss JRules?
http://xircles.codehaus.org/projects/drools/lists

Hope this helps.

Let me know if case you have more questions.

Regards
Naveen
Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344
Hi Naveen,

Thanks for your reply..

I am just trying out some examples on JBoss Rules - Drools..

I have a question regarding the validation of the facts:

Suppose I have to validate the customer's card no, transaction limit, expiry date and other things.. For this whether can i do all this validation in a method inside the java and invoke that method in rule (drl file) is a best way
or
all the validation which I supposed to do in themethod should be done at the rules drl file itself...

How can we come to know whether the validation are to be dome at drl files or at the java file itself and invoking it in the drl files as and when it's required..
Naveen K Garg
Ranch Hand

Joined: Nov 28, 2005
Posts: 105
Hi Micheal,

Well on a high level its again come down whether you really need a rule engine or not.

Now if you business logic is dynamic in nature you should write it in a rule file (i.e DRL in JBoss Rules) and in Java method if the case is otherwise.

That way if rule changes you can deploy it without affecting your application code.

I suggest that you go through the following books to have a better clarity on the Business Rules.

Principles of the Business Rules Approach

Business Rule Concepts (Second Edition)

Regards
Naveen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss Rules Doubts
 
Similar Threads
Rule Engines
JBoss drools, when to use and when to avoid?
Book on JBoss Rules
rules engine in java
Rule based systems