KS BusinessRulesSOAD

  • Upload
    jazz440

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

  • 7/28/2019 KS BusinessRulesSOAD

    1/39

    Building the Kuali Student BRMS

    (Business Rules Management System)

    Cathy Dew & Leo Fernig

    Kuali Days :: Chicago

    May 13-14, 2008

  • 7/28/2019 KS BusinessRulesSOAD

    2/39

    Kuali Days :: Chicago May 13-14 2

    Agenda

    1. Harvesting and Structuring Rules (Cathy)

    Industry Best Thinking and Practices

    Kuali Student Analysis

    2. Setting Up the Technical BRMS Environment (Leo) KS Business Rules Environment

    Work to Date

    3. Integrating the BRMS and SOA (Cathy)

    The Rule Entity Model

    Fitting It All Together

  • 7/28/2019 KS BusinessRulesSOAD

    3/39

    Kuali Days :: Chicago May 13-14 3

    Getting to Functional Business Rules

    RESEARCHTheory

    Concepts

    Best Practices

    DATA COLLECTIONPartner Institutions

    Focus on Learning Unit Service

    Modeling

    Use Case

    Collection

    Data

    ConceptsTerminology &

    Definitions

    Classification &

    Categorization

    Strawman BRMS

    Strategy

    Service

    Definitions

    Actors &

    Scenarios

    Entity

    Diagrams &

    Message

    Structures

  • 7/28/2019 KS BusinessRulesSOAD

    4/39

    Kuali Days :: Chicago May 13-14 4

    Essential Reading

    Business Rules and Information Systems: Aligning ITwith Business Goal -- Tony Morgan

    The Business Rule Book: Classifying, Defining andModeling Rules -- Ronald G. Ross

    Business Rules Management and Service OrientedArchitecture: A Pattern Language-- Ian Graham

    Enterprise Patterns and MDA: Building BetterSoftware with Archetype Patterns and UML-- Jim Arlow and Ila Neustadt

    Principles of the Business Rules Approach-- Ronald G. Ross

    Smart (Enough) Systems-- James Taylor and Neil Raden

    What Not How: The Business Rules Approach toApplication Development -- C. J. Date

    Business Rules Applied: Building Better SystemsUsing the Business Rules Approach-- Barbara von Halle

  • 7/28/2019 KS BusinessRulesSOAD

    5/39

    Kuali Days :: Chicago May 13-14 5

    Everyone Agrees

    A business rule should define whatshould be the case

    It should not prescribe :: Whoinvokes the rule (use case)

    Whenthe rule is executed (businessevent or process description)

    Wherethe rule executes (design)

    Howthe rule is to be implemented(design)

    In fact,Kuali Student has to doall of this as part of the BRMS

  • 7/28/2019 KS BusinessRulesSOAD

    6/39

    Kuali Days :: Chicago May 13-14 6

    Ross RuleSpeak Templates

    A Sentence Patternis a basic structure (Template) used

    to express a Rule in a consistent, well-organized manner

    Every rule has a functional category ::

    Rejector a constraint, any rule that disallows an event

    Producer neither rejects for projects, simply computes

    Projector stimulus/response rule, causes some new event

    Some Rejector Rules

    A non-major student musthave permission from instructor

    A pre-registration slate must no tcontain more than 20 credit hours

    A student mayenroll only i fthe student is in good standing

  • 7/28/2019 KS BusinessRulesSOAD

    7/39Kuali Days :: Chicago May 13-14 7

    Rulespeak Terminology

    Establish the anchorof the rule

    The thing being constrained

    Rule must have one and only one anchor

    Establish the correspondent(s) of the rule,a.k.a. facts

    The thing doing the constraining

    Rule must have at least one correspondent

    With agreed upon terms and definitions, we could

    start to analyze business logic and discover rules.

  • 7/28/2019 KS BusinessRulesSOAD

    8/39Kuali Days :: Chicago May 13-14 8

    Discovering Rules

  • 7/28/2019 KS BusinessRulesSOAD

    9/39Kuali Days :: Chicago May 13-14 9

    Collecting Examples

    Academic Evaluation

    Admissions

    Transfer Articulation

    Degree Composition

    Grades, GPA, etc.

    Enrollment

    Transfer Credit Articulation

  • 7/28/2019 KS BusinessRulesSOAD

    10/39Kuali Days :: Chicago May 13-14 10

    Focus on Enrollment Rules

    Description Rule Facts

    General Eligibility

  • 7/28/2019 KS BusinessRulesSOAD

    11/39Kuali Days :: Chicago May 13-14 11

    Focus on Enrollment Rules

    Course Prereq / Coreq Facts

    FSU

    Rule

  • 7/28/2019 KS BusinessRulesSOAD

    12/39Kuali Days :: Chicago May 13-14 12

    Focus on Enrollment Rules

    Course Prereq / Coreq Facts

    MITRule

  • 7/28/2019 KS BusinessRulesSOAD

    13/39Kuali Days :: Chicago May 13-14 13

    Focus on Enrollment Rules

    Course Prereq / Coreq Facts

    UBC

    Rule

  • 7/28/2019 KS BusinessRulesSOAD

    14/39Kuali Days :: Chicago May 13-14 14

    Patterns Start to Emerge

    Count(set of courses, criteria) >= numeric value

    Credits

    Courses

    Subjects

    Unit Hours

    Grade/GPA (criteria) >= numeric value

    Course grade

    GPA for term, for year, overall, within major

    Student is/isnot value

    Status is eligible, no holds, has permission

    Admitted to institution, college, major

  • 7/28/2019 KS BusinessRulesSOAD

    15/39Kuali Days :: Chicago May 13-14 15

    Ownership vs. Execution

    Ownershipof rules is a function of the process (and

    people) responsible for authoring, maintaining and

    publishing a set of rules

    Execut ionof rules is the process responsible for executing

    a rule may be different from the processes responsible for

    creating/authoring the rule.

    Scheduling Rules, e.g., course has 200 seats Ownedby Central Scheduling Office

    Createdduring the process of scheduling

    Executedduring registration

  • 7/28/2019 KS BusinessRulesSOAD

    16/39

    The Technical BRMS Environment

  • 7/28/2019 KS BusinessRulesSOAD

    17/39Kuali Days :: Chicago May 13-14 17

    KS Business Rules Environment

    A Business Rules Management Service (BRMS)

    A Rules Engine (Droolswas selected for KS)

    Business Rules User Interfaces (that allow business analysts to create andmodify business rules)

    Bu siness s ervices that execute rules

    Placing the rules execution inside the service that needs it.

    The enrolment service would execute pre-requisite rules, degree rules etc

    The student financial service would execute fee calculation rules

    Business Rules Data Warehouse

    Rules are extracted from the BRMS (using the standard BRMS service definitions)and loaded into the data warehouse. Business Intelligence tools (such as Jasper)can be used to write reports against this data warehouse.

    Workf low

    Business Rules that are managed in the BRMS can be moved through workflowprocesses for various levels of approval, just like any other object.

  • 7/28/2019 KS BusinessRulesSOAD

    18/39Kuali Days :: Chicago May 13-14 18

    Data Warehouse

    Business Service

    Business Service

    Rules

    User

    Interface

    Drools

    Executable

    Rules

    Rule

    Execution

    Engine

    BRMS

    Rules

    Metadata

    Rules

    Business Service

    KS Business Rules Environment

    Metadata is used

    to produce the

    users palette to

    create and edit

    rules

    Rules are

    created, saved

    and updated

    through the

    user interface

    Rule data

    extracted

    to data

    warehouse

    Get AgendaExecute Rules

    Exported

    to

    executable

    format

  • 7/28/2019 KS BusinessRulesSOAD

    19/39Kuali Days :: Chicago May 13-14 19

    Data Warehouse

    Business Service

    Business Service

    Rules

    User

    Interface

    Drools

    Executable

    Rules

    Rule

    Execution

    Engine

    BRMS

    Rules

    Metadata

    Rules

    Business Service

    Phase 1

    AugDec 2007Selection of Rules

    Engine Technology

  • 7/28/2019 KS BusinessRulesSOAD

    20/39Kuali Days :: Chicago May 13-14 20

    Data Warehouse

    Business Service

    Business Service

    Rules

    User

    Interface

    Drools

    Executable

    Rules

    Rule

    Execution

    Engine

    BRMS

    Rules

    Metadata

    Rules

    Business Service

    Phase 2

    Jan May 20081) Creation of BRMS

    2) BRMS_Drools

    interface

  • 7/28/2019 KS BusinessRulesSOAD

    21/39Kuali Days :: Chicago May 13-14 21

    Data Warehouse

    Business Service

    Business Service

    Rules

    User

    Interface

    Drools

    Executable

    Rules

    Rule

    Execution

    Engine

    BRMS

    Rules

    Metadata

    Rules

    Business Service

    Phase 3

    May June 2008

    Integration of BRMS

    and service stack

  • 7/28/2019 KS BusinessRulesSOAD

    22/39Kuali Days :: Chicago May 13-14 22

    Data Warehouse

    Business Service

    Business Service

    Rules

    User

    Interface

    Drools

    Executable

    Rules

    Rule

    Execution

    Engine

    BRMS

    Rules

    Metadata

    Rules

    Business Service

    Phase 4

    Development of

    User Interfaces

  • 7/28/2019 KS BusinessRulesSOAD

    23/39Kuali Days :: Chicago May 13-14 23

    A rule consists of a condi t ionand action(s)

    When

    proposition 1 and

    proposition 2Then

    action 1

    A Business Rule

    Condition

    Action

  • 7/28/2019 KS BusinessRulesSOAD

    24/39Kuali Days :: Chicago May 13-14 24

    Example rule:

    Total credits > 30 and

    grade point average > 3.5

    A Business Rule

    Right Hand

    Side

    Left Hand

    Side

    Comparison

    Operator

    Boolean

    Operator

    Proposition

  • 7/28/2019 KS BusinessRulesSOAD

    25/39

    Kuali Days :: Chicago May 13-14 25

    UML for a Business Rule

  • 7/28/2019 KS BusinessRulesSOAD

    26/39

    Kuali Days :: Chicago May 13-14 26

    How do we get rules into the system?

    The Rules User Interface

    There are 3 stereotypical ways of presenting rules:

    1. A decision table

    2. A flowchart

    3. A procedural rule (ifthen)

  • 7/28/2019 KS BusinessRulesSOAD

    27/39

    Kuali Days :: Chicago May 13-14 27

    Visual Stereotype #1: Decision Table

    Program Visa status Cost percredit

    Arts Canadian 200

    Arts Student visa, Visitor 400

    Science, Applied Science Canadian 300

    Science, Applied Science Student visa, Visitor 600

    Program

    Min

    credits

    Max

    credits Visa status

    Cost per

    credit

    Arts 0 15 Canadian 50

    Arts 0 15 Student visa, Visitor 100

    Arts 15 30 Canadian 75

    Arts 15 30 Student visa, Visitor 200

    Science, Applied Science 0 30 Canadian 300

    Science, Applied Science 0 30 Student visa, Visitor 400

    This is no ta look-up table. Not only can you change data but you can change thestructure of the table without any p rogramm ingchanges. For example, two

    new columns can be added with no changes to the code:

  • 7/28/2019 KS BusinessRulesSOAD

    28/39

    Kuali Days :: Chicago May 13-14 28

    Visual Stereotype #3: Flowchart

    Apply

    Evaluation

    Rule

    Are the

    grades

    complete

    ?

    Is the

    result

    a

    PASS?

    Create

    Registration

    Record

    Yes

    YesNo

    No

  • 7/28/2019 KS BusinessRulesSOAD

    29/39

  • 7/28/2019 KS BusinessRulesSOAD

    30/39

    Kuali Days :: Chicago May 13-14 30

    Example of a User Interface

  • 7/28/2019 KS BusinessRulesSOAD

    31/39

    Kuali Days :: Chicago May 13-14 31

    Rules and Business Intelligence

    Traditionally Business Intelligence only deals with facts inthe Enterprise Systems. Now we can apply Business

    Intelligence to business rules.

    For example:

    Is there any correlation between student success and pre-requisite

    rules?

    Which courses are referenced most frequently in curriculum rules?

    Are there any rules that inhibit student success (in the sense of

    causing students to take more than 4 years to finish their program)?

  • 7/28/2019 KS BusinessRulesSOAD

    32/39

    Kuali Days :: Chicago May 13-14 32

    Data Warehouse

    Business Service

    Business Service

    Rules

    User

    Interface

    Drools

    Executable

    Rules

    Rule

    Execution

    Engine

    BRMS

    Rules

    Metadata

    Rules

    Business Service

    How does a business services know

    which rules to invoke?

  • 7/28/2019 KS BusinessRulesSOAD

    33/39

    Integrating the BRMS and SOA

  • 7/28/2019 KS BusinessRulesSOAD

    34/39

  • 7/28/2019 KS BusinessRulesSOAD

    35/39

    Kuali Days :: Chicago May 13-14 35

    Agenda Determination Decision Table

    TypeRelationState

    AgendaName Agenda Description >> Rules Output

    course enrolled/

    registered

    Student

    Enrolls in

    Course

    enrollment reqs (student, admitted, no

    holds) academic reqts (min GPA, good

    standing)

    course reqts (pre/co/anti-reqs,

    w/grade)

    program reqts (GPA, major match)

    financial reqts (enr fees paid, lui fees

    paid)

    OK / Not OK

    with

    Explanation

    course planned Student

    Plans

    Course

    course reqts (pre/co/anti-reqs,

    w/grade)

    program reqts (GPA, major match)

    Status and

    Recommend

    ations

  • 7/28/2019 KS BusinessRulesSOAD

    36/39

    Kuali Days :: Chicago May 13-14 36

    Academic

    Record

    Example Business Rule

    1. Agenda Determinat ion::Validate relationship of typeEnroll for Course

    2. A genda :: Student Enrolls inMATH 301

    3. Ou tp ut :: OK / Not OK4. Bus iness Ru le:: Student

    has met pre-reqs of 2 of (static list)

    6 credits of (dynamic list)

    overall GPA >= 3.0

    5. Anchor :: MATH 301

    6. Fac ts :: course sets (staticand dynamic), studentsacademic record

    Student Enrolls

    in MATH 301

    ValidateRelationship

    Enroll in Course

    OK / Not

    OK

    Met MATH 301

    Prerequisites

    200-level

    MATH

    courses

    MATH 101,

    MATH 102,

    MATH 103

    MATH

    301

  • 7/28/2019 KS BusinessRulesSOAD

    37/39

    Kuali Days :: Chicago May 13-14 37

    Fitting It Together KS BRMS

    Harvested a bunch of rules

    Developed a strategy for collecting and classifying rules

    Agreed on terminology and a business rule entity model

    Completed a Proof of Concept for a representative pre-

    requisite rule

    Built the Core BRMS

    Defined and stored a business rule

    Translated it to a Drools Executed the rule from our Enrollment business service

  • 7/28/2019 KS BusinessRulesSOAD

    38/39

    Kuali Days :: Chicago May 13-14 38

    Fitting It Together KS BRMS

    We are in the process of modeling ::

    How a business process determines which

    rules to execute

    What is the link to the Agenda Smallest footprint possible

    Who is responsible for getting the facts needed

    to execute the rule

    Without violating SOA (who knows what)

    Without requiring BRMS to know about domains

  • 7/28/2019 KS BusinessRulesSOAD

    39/39

    Thank You

    Coming Soon, to a university near you...