How to Develop Rule Based Java Software Using Java Rule Engine API (JSR 94)

By Angsuman Chakraborty, Gaea News Network
Tuesday, August 16, 2005

For mission-critical applications, the process of automating business policies, procedures, and business logic is often better managed by leveraging a Business Rule Engine.

Using business rules can help you develop more agile applications with shorter time-to-market. A business rule is a statement that defines or constrains some aspect of the business; a business rule is intended to assert business structure or to control or influence the business’s behavior. A business rule engine evaluates and executes rules, which are expressed as if-then statements.

The power of business rules lies in their ability both to separate domain knowledge from its implementation logic and allowing business rules to be changed without changing any source code. The promise of business rule engine based applications is that domain knowledge experts should easily be able to modify business rules in accordance with changing business realities without having to rely on programmers.

The specification for the Java Rule Engine API (JSR 94) has been developed through the Java Community Process (JCP) program. It defines a Java runtime API for rule engines by providing a simple API to access a rule engine from a Java application. JSR 94 provides guidelines for the rule administration and rule runtime APIs, but it defines no guidelines for what language to use to define the rules and actions. Efforts are under way to standardize a common rule language, including the Rule Markup Language (RuleML).

Few examples of business rule engines include Drools (free; open source), Fair Isaac Blaze Advisor, ILOG JRules, and Jess (free for non-commercial use AFAIK) etc.

The article: Getting Started With the Java Rule Engine API provides an overview of JSR 94 and discusses how to fit business rule technology into Java technology applications and comes with sample code.

Discussion
November 7, 2009: 1:09 pm

how to get bigger string input in java from user
import java.util.Scanner;
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
System.out.print(”Enter TWO dates: “);
String myStr = “”;;
String myStr2 = “”;

while (input.hasNext())
{
myStr = input.next();
myStr2 = myStr2 + myStr;
}
input.close();
System.out.print(”You entered:” + myStr2);
}
}

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :