• No results found

What is a business rule?

N/A
N/A
Protected

Academic year: 2021

Share "What is a business rule?"

Copied!
14
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)

Unit objectives

After completing this unit, you should be able to:

Describe the advantages to externalizing business

rules as business rule services

Explain how the SCA programming model supports the

development of business rule services

Define a business rule

Explain rule sets, decision tables and rule groups

Identify situations where it is appropriate to use a rule

set or a decision table

(3)

What is a business rule?

A business rule is an If-Then business decision.

If discount == 0.10,

Then total = total – (total * discount)

The job of a business rule is to:

– Evaluate an input (if-then)

– Change a state

(4)

Business rules – examples

Rent-a-car corporate discounts

– Able to change discount amounts during peak dates and times

Insurance agency

– Ability to invoke a process for an insurance claim that happened in the past when the claim rules were different

Updating the Web site of a company

– Schedule specific dates that a Web site will update to the next development version without the knowledge of the end user

(5)

Motivation for using business rules in SOA

Loose-coupling between business rules and service

management functions.

• For example, ESB mediations are decoupled from business rule logic.

They allow the specification of the business logic in a simple

form, easily understood by business analysts.

– Logic is specified as either:

• A sequence of if-test-then-actions clauses.

• A simple decision tree.

– Rule changes can be made without the intervention of expensive IT personnel.

Details of business rules change frequently.

– While the structure of the rules will be specified using the WebSphere Integration Developer tooling, elements can be added or customized using Web tools (coming up).

(6)

Support for business rules in WebSphere Process

Server and WebSphere Integration Developer

Service Components Supporting Services SOA Core Business processes Human tasks Business state machines Business Rules SCA Business

objects Common eventinfrastructure

WebSphere Application Server ND (J2EE runtime) Interface

(7)

Roles, rule templates and the Business Rules

Manager

Business Analyst Role

Business Analyst Role

Developer Role

Developer Role More technical skills More business skills

Tools used Business Rules Manager Web Tool WebSphere Integration Developer Role tasks

• Discusses desired changes with Developer and implements business rule changes.

• More aware of business and customer demand changes.

• Codes editable business rules. • These rules are associated with templates in WebSphere

Integratin Developer.

• Implements what the architect has laid out.

• More aware of technical development and architecture.

(8)

SCA component: Business rule group

●business rules are invoked through the business rule group.

– Rules with a common focus are gathered in a business rule group.

●A business rule group is an SCA component.

●Rules within a business rule group are represented as rule sets or as

decision tables.

– The business rule group provides the interface for rule sets and decision tables.

●Run-time clients

of a business rule group include BPEL, JSPs, SCA components and the Business Rules Manager Web Tool.

(9)

Rule sets

There are two kinds of rules:

– If-then rules that determine the action to execute according to a condition of the incoming message.

– Action rules that execute an action regardless of what an incoming message is.

A rule set is a series of one or more If-Then condition and

action statements that are processed sequentially.

– Evaluated from first listed to last.

– Able to choose any number of Action/If-Then conditions.

• An Action does not have an If-Then condition, it simply initializes or sets variables.

• An If-Then condition can decide on a variable change.

A rule set is associated with a specific interface and operation

of a business rule group.

It evaluates multiple conditions and can fire multiple rules.

– Might be needed when a rule is found true and fired, then more processing needs to be done.

(10)

Decision table

Decision table represents a multi-conditional, nested If-Then

structure.

– The decision table represents a tree decision structure in tabular form.

– A set of If conditions withThen actions are defined at the intersection points of the table.

Conditions are evaluated in a nested order (tree).

Evaluates one condition or more, fires only one rule.

– The rule that is fired consists of one or more pre-defined actions. • For example, an action could consist of setting an output parameter to a

certain value.

– Most rules will fall under a decision tree.

• Most business rules are called to fire one rule.

A decision table is associated with a specific interface and

operation of a business rule group.

(11)

Decision table – Mortgage request example

● This decision table returns an approximate mortgage loan amount to

the client based on the type of property they are looking for:

– Size of the home in square feet. – Location (city or suburbs).

(12)

When to use decision tables or rule sets

Use decision tables when you:

– Have a rule with multiple clauses or variables in the conditional statements

– Want to fire only one rule

Use rule sets when you:

– Have rules with a few clauses or variables in the conditional statements

(13)

Assembling business rules

The assembly editor is used to connect business rules to

calling SCA components.

A rule group is dragged and dropped onto the Assembly Editor

and wired to existing components.

(14)

Unit summary

Having completed this unit, you should be able to:

Describe the advantages to externalizing business

rules as business rule services

Explain how the SCA programming model supports the

development of business rule services

Define a business rule

Explain rule sets, decision tables and rule groups

Identify situations where it is appropriate to use a rule

set or a decision table

References

Related documents

WebSphere Integration Developer supports all aspects of process integration, including the processes themselves, services, business rules, state machines, human tasks,

Our results also highlight the complexity of the energy balance response to differing riparian vegetation types, not only in terms of the impact of riparian tree cover on

• Maintenance Resources Consumed • Cost • Effort • Elapsed time Quality • Defects • Customer survey Output. The following summarizes common measures used

(Normally this is indicated in the menu as ANT power, Ext Antenna power or Active antenna power.) Refer to the user manual of your Digital Terrestrial Receiver.. Once you are sure

Like Zebra label printers, some Cognitive printer models provide a hybrid of thermal transfer and direct thermal

Interfacing with the business and IT Service Continuity Management on the dependencies of business units and their business processes with the supporting IT services contained

Human Tasks Human Tasks Business State Machines Business State Machines Business Rules Business Rules Business Processes Business Processes Service Component Architecture

Organizing ideas around a currency crisis model can bring various advantages in understanding sources of financial instability such as: self-fulfilling