IBM Proof of Technology
Discovering the Value of SOA with WebSphere Process Integration
© 2005 IBM Corporation
SOA on your terms and our expertise
WebSphere Integration Developer v6.0Introduction to Business Rules
2 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Concepts and Overview Where do Business Rules fit in the Architecture
Business Rule Components Organized in Rule Groups, Rule Sets, Decision Tables
Business Rule Tooling Developer roles and Business Analyst roles
Summary
Agenda – Business Rules
3 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
SOA Core Service ComponentArchitecture
BusinessObjects
Common EventInfrastructure
HumanTasks
HumanTasks
BusinessState
Machines
BusinessState
Machines
BusinessRules
BusinessRules
BusinessProcessesBusiness
ProcessesServiceComponents
WebSphere Application Server (J2EE Runtime)
SupportingServices
InterfaceMaps
BusinessObject Maps
RelationshipsSelectors
Fitting into WebSphere Process Server V6
4 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Allows the separation of the business rule logic from the other services, applications, and processes in the system Exposes Business Rules as its own service in the WebSphere Process Server as a peer to the
other elements of the architecture
Allows the specification of the business rule 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
Ability to free up IT resources for simple rule changes and without expensive IT personnel
Details of Business Rules change frequently While the structure of the rules will be specified using the WID tooling, elements can be added or
customized using a simple Web tool
Changes can be made dynamically to the system
Business Rules – Concepts
5 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Discount service Offer a discount that varies depending on
Size of Order Credit Rating of Customer Time of Year
Postage Calculation Depending on weight and value we can compute postage cost When postage rates change we need to reflect this in our rules Would like to add new rules in advance, but have them come into force on a particular date
Online Book Seller Offer a recommendation depending on your browsing and past order history together with
ordering patterns of “similar” customers NOT IN SCOPE – need a Commercial rules or inference engine. (so long as it has a WS interface
this can be easily wired into the SCAXX
Business Rules - Examples
6 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Interface (WSDL)
input1
output1
Business Rule Group Business Rules
Default Business Rule: RlName01 RlName01
RlName02
RuleSet
DecisionTable
1/1/05 6/24/05 RlName01
6/24/05 1/1/06 RlName02
etcetera
Parameter Method: Current time, Java, or XPath
Start Date End Date Business Rule
Business Rules – Business Rule Group
7 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Business Rule Group is the highest level implementation component Groups Rule Sets or Decision Tables that share a common business focus Exposed in the runtime as an SCA service Provides the interfaces for Rule Sets and Decision Tables to use Lists the Partner references available for Rule set actions
Defines a table of dates and times for which implementation is to be used when for which interface Which Business Rule to use is determined by the date/time that is provided during
invocationThe date/time can be either the current date/time, “mined” from the input parameters via Xpath, or determined using a Java snippet
Business Rules – Business Rule Group - Summary
8 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Business Rule Group
Rule Set
Each test is evaluated in turn and as many actions as are appropriate are executed.Thus order of the rules is critical.
Test1
Test4
Test2
Actions
Test3
Business Rules – Rule Set
9 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Business Rule Group
RuleSet
Business Rules – Rule Set
10 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Rule Set is a set of 1 or more if-then condition/action statements that are processed sequentially Evaluated from first listed to last, so order is important Able to choose any number of Action/If-Then conditions An Action need not have an If condition associated. Simple actions are allowed, these
are always executed. Example: Initializing variables
Evaluates multiple conditions and can fire multiple rules All the actions that have conditions that evaluate to true are needs to be done
Local variables can be defined for more “complicated” processing These can be of any datatype
Actions generally set values for output BOs But can invoke other SCA modules
Business Rules – Rule Set - Summary
11 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Business Rule Group
Decision Table
Decision Table is a balanced tree. Exactly one branch is taken after each decision
Thus exactly one of the action sets is executed.
Test1
Test3
Test2Actions
Business Rules – Decision Table
12 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Business Rule Group
Decision Table
Business Rules – Decision Table
13 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Decision Table represents a decision tree structure
Each level of the tree is like a case (or select) statement Exactly one branch is taken at each level (the first listed that evaluates true so
order is important here too) If no case statement is satisfied at any level an exception occurs
The number of “total cases” is the product of the number of cases at each level So Level1 choice of 3, level2 choice of 2, level3 choice of 4 would give 3*2*4=24
cases in total
Only one set of actions will be fired The actions often consist of setting values for elements in the output, however
more complex actions involving other SCA components are possible
Business Rules – Decision Table - Summary
14 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Tools UsedTools Used Role TasksRole Tasks
Developer RoleDeveloper Role
Business Analyst RoleBusiness Analyst Role
More Technical SkillsMore Technical SkillsMore Technical SkillsMore Technical Skills
WebSphereIntegrationDeveloper
WebSphereIntegrationDeveloper
Business RuleManagerWeb Tool
Business RuleManagerWeb Tool
•The day to day administrator•Implements minor business rule changes•More in tune with business practices•No WID licence.
•The day to day administrator•Implements minor business rule changes•More in tune with business practices•No WID licence.
•The developer that codes the business rules that are editable via the Business Rule Editor web tool•Implements what the Architect lays out•Wires the rules into Business Process
•The developer that codes the business rules that are editable via the Business Rule Editor web tool•Implements what the Architect lays out•Wires the rules into Business Process
More Business SkillsMore Business Skills
Business Rules – Roles - Tooling
15 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
The tool that supports all the SCA component development
Easy to use tools for defining, testing and managing business rules
Eclipse based tooling for Business Rule development
Focused on the more technical developer role
Allows templates to be created which can be used in the Web based Business Rules Manager
Used to create new Business Rules
Business Rules – Tooling - WID
16 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Tooling – Templates - WID
As well as using WID to create the rules and rule groups we have discussed, WID can be used to create parameterized rule templates. From these templates new rule instances can be created in WID or the Web bases Business Rule
TEMPLATETEMPLATE
RULE from TEMPLATERULE from TEMPLATE
17 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Built specifically for the Business Analyst
Manageable subset of full authoring functionality found in WebSphere Integration Developer
Templates built by the developer role allow the business rule analyst a very easy way to edit business rules at runtime Browser is all that is required to use
url={host:port}/br/webclient/pages/index.jsp
It is part of the WBI runtime as an optional install (installBRManager.jacl), might expect to be on a staging server
No need to restart application or application server when changing Business Rules
Users are authenticated using standard WAS authentication/security
Business Rules – Web Based Tooling
18 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Business Rules – Web Based Tooling
19 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
WebSphere Process Server v6 exposes Business Rules as SCA components
Handles 80% of typical integration rules
Does not handle the other 20% of complex rules, like inferencing
Third party products with Web Service interface can easily integrate in SCA
WID Tooling allows creation, testing and deployment of rules
Web Based Business Rules manager allows Business Analyst to Edit, update and deploy business rules using only browser It is included with WebSphere Process Server v6.0 as an optional install
Tested rules can be deployed as EAR files in the standard J2EE deployment model
Business Rules – Summary
20 SOA on your terms and our expertise
Discovering the Value of SOA with WebSphere Process Integration
Thank YouMerci
Grazie
Gracias
Obrigado
Danke
Japanese
English
French
Russian
GermanItalian
Spanish
Brazilian PortugueseArabic
Traditional Chinese
Simplified Chinese
Thai