Академический Документы
Профессиональный Документы
Культура Документы
Summary:
Many companies are eager to maximize the effectiveness and efficiency of their IT organizations, needing to
create precise, consistent, and agile applications, while maintaining all the systems they already have in place.
Incorporating Fair Isaacs Blaze Advisor rule management technologies into a standards-based J2EE
environment enables the creation and maintenance of critical and complex solutions which can easily integrate
with existing applications.
FOR MORE
INFORMATION
phone from US
1 888 FICO EDM
worldwide
1 612 758 5200
email
edm@fairisaac.com
web
www.fairisaac.com/edm
Table of Contents
Abstract ......................................................................................................................................................... 1
Application Development Challenges ........................................................................................................... 1
Why J2EE? ............................................................................................................................................... 1
Why Business Rules?............................................................................................................................... 3
Why J2EE and Business Rules? .............................................................................................................. 3
J2EE Architecture Overview ..................................................................................................................... 4
Web Components ..................................................................................................................................... 4
Business ComponentEnterprise JavaBeans ........................................................................................ 5
J2EE Service APIs.................................................................................................................................... 5
Introduction to Business Rules ..................................................................................................................... 7
Business Rule Components ..................................................................................................................... 8
Component Templates ........................................................................................................................... 12
Business Rule Services .......................................................................................................................... 13
Business Rules Deployment Process..................................................................................................... 13
Conclusion .................................................................................................................................................. 16
About Fair Isaac .......................................................................................................................................... 17
Abstract
Java2 Enterprise Edition (J2EE) is a framework defined by Sun Microsystems for component-based
development and deployment of Java enterprise applications. Through components and associated
services, J2EE provides a platform that expedites software development by simplifying the development
paradigm and providing robust, commercial grade solutions to common application requirements through
standards-based vendor offerings.
Business rule management technology enables enterprises to express the policies that govern their
operations directly in a non-procedural language and embed those policies in multi-tier enterprise
systems. Fair Isaac Blaze Advisor business rules management system is the industrys leading Javabased business rule management platform and provides todays most comprehensive and advanced rule
management capabilities.
The Blaze Advisor system can be used to build a business rule management tier in multi-tier J2EE
compliant enterprise applications. The Blaze Advisor system seamlessly integrates with all major J2EE
application servers as either stateless or stateful session Enterprise Java Beans (EJBs) or as MessageDriven Beans (MDBs). It also easily integrates with non-EJB J2EE services such as JMS, RMI and Web
Services. Expressing business logic as rules provides an immediate ROI by shortening the development
cycle of business-logic intensive applications thus cutting development costs. A business rule tier also
provides long-term strategic business advantage by expediting the management of frequently changing
business processes.
IT budgets are increasingly tight thus demanding careful investment and reuse of existing infrastructure. Yet it
is often difficult to effectively reuse existing architectures and code to meet business challenges.
Enterprise computing solutions often involve heterogeneous environments that may include computing
platforms ranging from mainframes to PDAs. Mapped onto these disparate platforms are a wide variety of
software architectures and network protocols that complicate any integration task.
It is costly, time-consuming, and error-prone to change software logic to support rapidly evolving business
needs. IT organizations typically have significant work backlogs associated with such tasks.
Why J2EE?
J2EE was designed to address many of the challenges facing IT organizations. By implementing systems
based on a rich, standards-based, platform-independent infrastructure, enterprise system development
costs and schedules can be better controlled. System architects can easily assemble and integrate
applicable J2EE components and services from a variety of software vendors that together meet their
organizational needs.
The success or failure of development efforts are oftentimes measured against a set of criteria that, within
the industry, are commonly referred to as software -ilities. These success factors include:
Availability: Our fast-paced business world requires systems that are available for use 24 hours per
day, 7 days per week. J2EE-compliant servers are designed with redundancy in mind and thus are
able to support an organizations most demanding availability needs.
Extensibility: J2EE systems are pure Java technology. This means that they avail themselves of the
large number of standard APIs that have been developed as part of the Java Community Process.
Currently there are more than 70 such APIs and a like number of available reference
implementations. Hence, J2EE applications have out-of-the-box interfaces to mail systems,
EAI systems, etc. This is a huge head start for any developer beginning the design of a new
business solution.
Interoperability: Applications and servers that conform to J2EE standards are able to interact with
the many other product offerings that also comply with these standards. Additionally, J2EE
applications are able to leverage legacy software through any number of J2EE/J2SE APIs designed
specifically for this task. (e.g., JNI, Java IDL, JMS, XML, web services, etc.).
Maintainability: J2EE applications are inherently easier to maintain than traditional enterprise
applications because the semantics and complexity of transactions are managed by the container, not
the application. Additionally, since Java applications have many APIs available to them out-of-thebox, applications can be constructed without coding complicated interfaces to external resources. All
of this makes J2EE applications easier to maintain over their lifetime.
Manageability: Modern enterprise solutions typically come with strict quality-of-service contracts
between service providers and user communities. Achieving these QOS targets requires constant
monitoring and management of a systems software processes. J2EE provides a standard interface
that allows users to leverage industry leading software management solutions (e.g., CA UniCenter ,
HP OpenView , IBM Tivoli ) to ensure that their applications perform as expected.
Portability: J2EE applications are easily ported to different platformshardware or software. J2EE
container vendors must qualify their implementations against the J2EE specifications thus ensuring
that applications can be ported from one container to another effortlessly.
Procurability: There are a large number of software vendors that produce J2EE compliant
components. Such wide availability of products enables building a J2EE system that leverages bestof-breed products to suit specific architectural and business needs.
Reliability: J2EE applications are more reliable because the standards that underpin their architecture
discourage and sometimes prevent the use of certain software techniques that could lead to unreliable
systems. For example, specifying that the developers should not use multi-threading
programmatically in an EJB container prevents unnecessary thread locks and synchronization issues.
Scalability: J2EE makes it easy to develop highly scalable systems since vendors are required to
provide high concurrency support and encouraged to support out-of-the-box scalable
pooling mechanisms.
Security: J2EE standards specify authentication, authorization and privacy (i.e., encryption)
mechanisms that J2EE product vendors must provide. This eases the difficulty of developing highly
secure systems. As an example, EJB server vendors must provide access control mechanisms for EJB
method invocations.
Through their support for these criteria, J2EE-based systems provide organizations with the tools
necessary to manage and optimize the tradeoffs inherent in any development project thus saving time and
money while fulfilling enterprise business needs.
Fully computerized analysis that does not require human knowledge, reducing the likelihood of
human subjectivity.
The primary middle tier J2EE architectural components are classified as either web components or
Enterprise JavaBeans. These, in turn, are managed by another J2EE component: the container. Web and
EJB containers provide standardized runtime services to contained components.
Web Components
There are two types of web components that are provided by J2EE: servlets and JSPs:
Servlets are Java applications that run in a web or application server and provide server-side processing of
business logic. A servlet can almost be thought of as an applet that runs on the server side. Servlets
provide a simple, consistent mechanism for extending the functionality of a web server. Servlets are
written in Java and thus are portable across servers and operating systems. The servlet programming
interface (Java Servlet API) is a standard part of J2EE.
JSP pages provide an easy way of mixing HTML presentation markup with Java code. Similar to servlets,
they are a way of displaying dynamic web content through a web browser but provide a more abstract and
somewhat easier to use mechanism than servlets. They are compiled by JSP engines at run time and
execute as servlets. J2EE defines how to package JSP files and servlets into a portable Web Application
Archive (WAR) files. These files are deployed on application servers that support J2EE web applications
and their use is managed by the web container.
Session beans
Entity beans
Message-driven beans
Session Beans
Session beans serve as extensions of the client running on an EJB server. The client acquires a remote
reference to the beans and invokes methods defined on the remote interface of the Bean. Method
invocation can be transactional or non-transactional. For those methods needing a transaction, the
semantics of the transaction are managed by the container, not programmatically by the bean. Session
beans can be either stateful or stateless. Stateful beans allow a client to maintain state information in the
bean across multiple method invocations.
Entity Beans
Entity beans represent data that is stored in a database or some other persistent storage. These components
are persisted across client sessions by the server. Each entity bean of a given type has a unique identify
that is used to look up the bean. Clients are assured that if they obtain a reference to an entity bean with a
given identity, the bean will reflect the current state of the persistent data it represents. Multiple clients
can access an entity bean concurrently. The EJB container manages these concurrent transactions for the
entity bean, ensuring that client transactions are properly isolated.
Message-Driven Beans
A message-driven bean is an integration of EJB with the Java Message Service (JMS). Message beans act
as a standard JMS message consumer inside an EJB container. The message-driven bean is a stateless
component that is invoked by the EJB container as a result of receiving messages from a JMS queue or
topic. The message-driven bean then executes business logic based on the message contents. Using the
message-driven bean model allows EJB developers to implement architectures that exploit JMS and
message-oriented middleware (MOM).
JavaMail: a set of email related APIs, which can be loosely thought of as an object-oriented wrapper
J2EE Connector Architecture (JCA): a set of APIs used for plugging in resource adapters that
understand how to communicate with existing enterprise systems, such as SAP R/3, CICS/COBOL,
Siebel, and so-on
JDBC: a set of APIs used to create a platform-neutral interface between databases and Java
Java Message Services (JMS): a set of APIs for message-based communication between separate
Java processes
Java Remote Invocation (RMI): a set of APIs that comprise Javas native scheme for creating and
Java Authentication and Authorization Service (JAAS): a framework that supplements J2EE with
the user-based authentication and access control capabilities
JAXP: a set of APIs that specify how to handle XML documents including the functionality
Java Naming and Directory Interface (JNDI): an API that supports accessing naming and directory
Java Transaction API (JTA): an API that defines the interfaces needed to interact with a
transaction manager
JSR-94: is a J2SE/J2EE API that defines how an application can find and call rules
services at runtime
Selection: The use of business rules to decide how to select different credit card products for
different customers.
Assessment, scoring, and prediction: The use of fact and judgmental-based reasoning to determine
the likelihood of some positive or negative outcome occurring, such as a credit card companys
customer-in-collections willingness to pay.
Monitoring: Listening to changes in the outside world and alerting or otherwise acting when some
threshold is reached. For example, monitoring the financial risk level of credit card company
customers in collection and suggesting risk mitigation or hedging strategies.
Configuration verification: Checking that all pieces in a system actually work with each other or
recommending additional pieces based on pieces already specified. An example would be to use a
customer profile to configure a highly personalized credit card product offer for that individual.
course of action. An example is the use of business rules to determine how a billing error occurred on
a customers statement.
Planning: Recommendation of a course of action based on the collection, analysis and synthesis of
facts. An example is the use of business rules to recommend a course of actions about how to contact
and handle a given customer in collection.
Blaze Advisor business rules management technology is a state of the art tool set that enables an
organization to create and maintain effective business rule tiers in distributed J2EE applications. The
Blaze Advisor system consists of a number of software components working in concert:
An integrated development environment (IDE) allows users to quickly and easily capture the rules
and expertise that reflect a companys personality and express its business practices. It provides a
visual development environment for defining, editing, and testing business rules. Business rules are
expressed in a declarative form using Blaze Advisor Structured Rule Language (SRL) in syntax
similar to English.
Web-based rules maintenance applications give business managers the power to create and change the
business rules that drive their business applications, using familiar business terms and their favorite
web browsers. Business users use these tools with little or no training and impacted production
applications do not have to be taken down to implement specified changes.
A powerful inference/decision engine uses business object state information and the previously
captured business rules to infer needed business process actions and outcomes.
The rules server constitutes the actual business rule tier and can be deployed in various multi-tier
technical architectures. The server dispatches requests from clients to rule agent instances that actually
execute rules services to satisfy requests. The server also incorporates technology that ensures high
availability and allows dynamic deployment of new or modified rule services.
A rule is the basic unit of rule processing. It is a statement that associates a set of actions with a set
of test conditions. Rules explicitly describe your business logic as formal, logically complete and
concise statements.
Syntax
if <conditional statement> then <action statement> else <action statement> sometimes termed
production rules
The conditional statement for a production rule specifies a specific value or set of values that must exist in
order to trigger the action statement.
The conditional statement for an event rule specifies an event or set of events that must transpire in order
to trigger the target action statement or a specific value or set of values that you need to obtain.
The rule action statement can identify:
The following is an example production rule that determines an applicants credit score based on the
specified conditions.
rule NotCurrentlyEmployed is
if (theApp.currentEmployer = "" and theApp.previousEmployer <> "")
or (theApp.yearsEmployed <= 0 and theApp.yearsPreviouslyEmployed > 0)
then theApp.loanScore -= 10.
An example event rule that calculates the average value of a customer bill whenever needed (per
receiving an is needed event follows:
event rule BillAverageComputation is
whenever a Customer.billAverage is needed do
{
sum is a real initially 0.
count is an integer initially 0.
for each Invoice in invoices such that it <> null do {
count +=1.
sum += it.bill.
}
max = count.
billAverage = sum / count.
}
Information Model
Classes and their associated objects contain the data processed by the business rules. Classes have
properties and attributes to which the rules apply. These classes and objects are identified from business
policies, practices and procedures. Collectively, these classes constitute the information model for the
rules project. For example, in a credit card application two important classes in the information model
would be a Customer class and an Account class.
In building a business rule service, Blaze Advisor business rules management system can use an
information model created from any combination of Java classes, XML schemas, database tables, or
Microsoft COM+ object models.
Business Rule Coupling
When designing and developing a rules project, it is important to partition and group interrelated rules
together. The Blaze Advisor system provides two primary metaphors for coupling related rules: rulesets,
and decision tables. Each of these concepts is discussed below.
Rulesets
A ruleset is a group of related rules that execute on a specific data context. Partitioning rules into rulesets
can improve performance by limiting the scope of the rule engine to a specific group of rules, and a
specific subset of the information model.
From the execution point of view, rulesets behave like independent islands of business logic because:
Evaluation by the rule engine proceeds independently of other rulesets defined in the business rule
service
The rule engine evaluates data using the currently active ruleset before proceeding with the next
ruleset in the stack
From a workflow point of view, rulesets let you maintain sets of rules that work together to achieve a
particular business decision
A decision table is a tabular representation of a ruleset that allows non-technical analysts to easily create
and maintain a large number of rules (Figure 2). Blaze Advisor business rules management system
provides rule architects with a Decision Table Wizard to select condition and action cell groups which
form the table structure. Analysts can then edit the condition and action values in a Decision Table Editor.
After the values are edited, Blaze Advisor system generates the rules using if then ... construction.
FIGURE 2 DECISION TABLE EXAMPLE
A ruleflow is a graphical representation of the task sequence that the rule service performs. The ruleflow
includes decision logic to determine which tasks to execute when different conditions arise. Ruleflows
contain a start and end node, and may contain any number of tasks, rulesets, event rules, functions,
decision blocks with parallel branches, loops, and subprocesses. (Blaze Advisor ruleflows that contain
other ruleflows are called subprocesses.) Tasks in ruleflows represent logically complete units of work,
which are composed of rulesets, rules and functions.
10
Whether it starts automatically when the rule service runs or what event or events will start
the ruleflow
The conditions that determine the tasks or subprocesses to be executed as it is possible to have
specialized tasks that only execute if certain conditions are satisfied
11
Component Templates
A key feature of Blaze Advisor business rules management technology is the ability to create rule
templates. Rules templates are the foundation components for the web-based applications used by
business analysts to maintain business rule logic. Such applications are referred to as rule maintenance
applications (RMA) in the Blaze Advisor environment.
To understand how this works, consider that rules in a system have parameters in their condition
statements that control their execution. For example, a rule might examine the yearly income of a
customer to decide if they would be a good prospect for a certain kind of sales campaign. The value of the
parameter that determines eligibility is a completely business-driven decision. Therefore, it makes sense
to allow a business analyst to control this value. Blaze Advisor system allows an application designer to
generate web-based applications that present business users with templates through which they can set the
value of such parameters. Although business analysts can control parameter values, the underlying
business service structure remains untouched and under the control of the rules architect. Hence,
templates support an effective division of responsibility between rule systems designers and business
analysts.
The Blaze Advisor system provides a complete set of tools for:
12
Controlling how values are displayed and edited from Java Server Pages (JSP)
Generating complete sets of JSP pages for editing the rules stored through templates
The Blaze Advisor system can be deployed in a number of ways depending on your J2EE architectural
needs. The rule server is the request-servicing component of the Blaze Advisor product. It can act as a
standalone Java component or as a J2EE-compliant EJB session bean in an EJB Application Server. From
a J2EE point of view, you can instantiate an instance of the rule server from JSPs, servlets, JavaBeans or
any Java class in the architecture. However, in a J2EE project, accessing business logic (i.e., business
rules) from EJB beans is the preferred strategy.
A Blaze Advisor rule service can be deployed as a J2EE-compliant EJB session bean in an EJB
application server. Applications use the resulting EJB beans exactly like any other EJB bean. The fact that
the Blaze Advisor EJB beans are implemented using a business rule engine is transparent to the user.
Figure 4 demonstrates the basic architecture of an EJB deployment.
13
FIGURE 4 BLAZE ADVISOR BUSINESS RULES MANAGEMENT SYSTEM DEPLOYED IN AN EJB CONTAINER
A stateful session bean, with complete support for passivation, corresponding to the Synchronous
Stateful Rule Server.
Calling on the Blaze Advisor EJB session bean is no different than calling any other session bean in the
architecture. When used with an EJB application server, Blaze Advisor system provides EJB session
beans that will interact with the application in a J2EE compliant manner. The following example
demonstrates how Blaze Advisor system can be invoked as an EJB:
public class YourBean extends NdStatelessEjbServerBean implements YourInterface
{
public YourBean( ) { super( ) }
public Result execute( Parameter parameter ) throws RemoteException
{
// Build the argument list
Object[] applicationArgs = new Object[1];
ApplicationArgs[0] = parameter;
// Invoke the service.
return (Result) invokeService(ServerConfigurationFile, ServiceName, applicationArgs);
}
}
(Note: The parameter and result objects are objects defined in your architecture.)
14
Deploying on the EJB architecture is very simple. Blaze Advisor system does all the work by providing
Quick Deployer wizards that auto-generate all the necessary files. The Quick Deployer Wizard
generates J2EE-compliant components and facilitates the deployment into a number of established EJB
and J2EE application servers by generating the required descriptors and batch files to compile, package
and deploy the components. When the Quick Deployer Wizard is used to generate a rule server EJB
session bean, an EJB bean class is generated providing (as business methods) the rule service entry points
with the appropriate argument, return value and exception conversions. The Quick Deployer also
generates the home interface, the remote interface, the Blaze Advisor rule server configuration file and
the EJB deployment descriptor.
When deployed as a session bean, the Blaze Advisor business rules management system rule server
supports all of the leading application servers, including:
BEA WebLogic
IBM WebSphere
JBoss
Oracle
15
Conclusion
Rules and J2EE are complementary and synergistic technologies. J2EE provides the fundamental
architectural underpinnings for large-scale, distributed enterprise applications. Rules allow business
process to be captured and maintained cost effectively. Incorporating a business rules management tier
into a J2EE application ensures that dynamic business logic can be managed consistently and can be
effectively adapted to evolving business needs. It also empowers business users to directly control
business logic modifications. J2EE and business rules both work towards common objectives by
formulating a new enterprise software development paradigm that helps to reduce development cycle time
and costs and simplifies long term system maintenance. J2EE and rules truly enable the agile enterprise.
16
Fair Isaac Corporation (NYSE:FIC) provides the leading solutions and technologies for
Enterprise Decision Management, giving businesses worldwide the power to make smarter decisions.
Corporate Headquarters:
901 Marquette Avenue, Suite 3200
Minneapolis, MN 55402
1 800 999 2955 from the US
1 612 758 5200 from anywhere
info@fairisaac.com email
Offices Worldwide:
Brazil, Canada, India, Japan,
Malaysia, Singapore, Spain,
United Kingdom, United States
www.fairisaac.com
Fair Isaac, Blaze Advisor and Its just a smarter way to do business are trademarks or registered trademarks of Fair Isaac Corporation. Other product and company names herein may be
trademarks or registered trademarks of their respective owners. 2006 Fair Isaac Corporation. All rights reserved.
1261WP 07/06 PDF