Just in Time (JIT)  Business Rules Mining When  Time  is All You Have and the Documentation  Just  Isn’t There Shirley J. Sartin,  CBAP ™  PMP ® November 10, 2005
Introduction Terry Moriarty asked, “How much of the current state business rules should be harvested?”  1 Suggested reengineer   To a new vision Just enough  to understand environment as business understands itself. What about dead or forgotten business rules? Maybe pull out just enough information to understand and cross link discovered business rules with new system.
Situation Application maintenance or reengineering  Requires understanding of Functions Background processes Underlying business rules Supporting documentation is unavailable or insufficient  No access to Data Synchronized code Analysis artifacts No budget for consultants or product solutions  How can business rules be manually mined?
Resolution Determine existing application or process Functions Events Inferred business rules Derive a logical process model from source code or a user interface Verify resultant model Infer and verify business rules
Agenda Modeling logical processes to reverse engineer Existing applications E-commerce web site with no viewable source code. Client-server Order processing application  Background processes Structured Query Language (SQL) 2  stored procedures automatically pushing master account data Modeling methods and steps to determine Functions Events Business rules Verifying business rules Questions/Discussion
Logical Process Modeling Reverse engineer with limited documentation Source code  Graphical User Interfaces (GUIs) Model artifacts created based on event-driven processes 3 Conceptual or business model Process focus System owner System user perspective Business view of activities Model based on business events assist in deriving Business processing requirements Business rules
Logical Process Modeling  (continued) Models especially effective for determining business rules 4 Do not include redundant activities Are technology independent Have no physical limitations Have no requirements Developed model may be used as interim step in system design Verification/validation of discovered business rules Business users Information Technology (IT) development staff Logical process model  Shows  what a system does …..not  how it is done   Does not reflect technical solution implementation
Logical Process Modeling  (concluded) Follow specific steps to produce logical model artifacts 5 System Context Diagram  – Indicates events or transactions system must respond to, system responses, sources and destination for both, and identity of all external data stores. Functional Decomposition Diagram  – Provides top-down functional decomposition or structure of the system.  Event-Response List  – Determines business events system must respond to and appropriate responses. Serves to identify input data flow. Event Diagrams  – Derived from combination of event list and further partitioning of functional decomposition diagram, shows inputs, outputs, and data store interactions for each event .
Reverse Engineering Online Catalog  Step 1 – Identified Features Reviewed department store online catalog web pages Potential features identified Search Product (by Category/Department)  View Product List (by Department) Create/Manage Account  Manage Shopping Cart View Store Locations and Events Status of Orders Inquire on Shipping Methods & Charges Login to Site Apply for Credit Each feature deemed a separate subsystem or  process Focus was placed on only one process at a time. Analysis effort more manageable Event diagrams end product of modeling
Reverse Engineering Online Catalog  Step 2 – Determined Functions   Create/Manage Account  Process Stepped through web pages Noted actions that occurred Select a profile function: Update Account Profile Access Shopping Bag Review Order History/Status Setup Express Checkout Select Profile Functions E-mail password hint to existing customer. Remind Password  Create user account. Create Account Description Function
Reverse Engineering Online Catalog  Step 3 - Created Context Diagram Context Diagram Symbols Data flows  indicate events and responses for each of the processes and sub processes.  These events/responses will be used during the functional decomposition of each process/sub process. External data stores  are identified to assist with understanding the logical process.  Individual (primitive) event diagrams will be created for each event in the event decomposition diagram and will show net inputs, net outputs, and data store interactions for each sub process.  External agents/entities  are the source for net inputs into the process and/or destination for net outputs from the process. Sub processes  are functions of the single feature (or process). Each of the sub processes identified will be used in the functional diagram to decompose events/responses that have been identified.  Process  – a single feature. How Used Diagram Symbol
Reverse Engineering Online Catalog  Step 3 - Created Context Diagram (continued) Reviewed web pages to identify Inputs Outputs Data Flows Data Stores Functions Create/Manage Account Function Information Shopping Bag Maintain Account Shopping Bag Items User Data Shipping/Billing Maintain Account Express Checkout User Data Orders Maintain Account Order History/Status User Data Maintain Account Account Info Updates Function Selection Select Profile Function: Update Account Profile Access Shopping Bag Review Order History/Status Setup Express Checkout User Data Ask for Password E-mail Address Get Password Reminder Remind Password Existing Customer User Data 6 Register Account New Acct Info Account Info Creation Create Account New Customer Create/Manage Account External Data Stores Events/Responses Sub Processes (Functions) External Agents Process (Feature)
Reverse Engineering Online Catalog  Step 3 - Created Context Diagram (concluded)
Reverse Engineering Online Catalog  Step 4 – Created Functional Decomposition Diagram Create/Manage Account  context   diagram   Decomposed to sub processes  (functions)  7 Top-down functional decomposition
Reverse Engineering Online Catalog  Step 5 – Decomposed Events Focused on  Create Account  function and determined business events/system responses
Reverse Engineering Online Catalog  Step 6 – Decomposed Events (concluded) Derived from combination of Context diagram Further partitioning of functional decomposition diagram
Reverse Engineering Online Catalog  Step 6 – Created Event-Response List Business events were determined System responses were considered Event-Response List created Create Account Sub-Module Validation/verification user data. (View: Welcome new user or Error/Acceptance message.) Create Account Sub-Module (Background Process) Register User Data System writes data to user data store and provides account validation. RA-03 Acct Info Creation Create Account Sub-Module Validation/verification form inputs. (View: Error or acceptance messages.) Create/Manage Account Module (View: Registration Form) Provide account information: User Data User Name E-mail Address Password Zip/Postal Code E-mail Update Selection New customer provides account information. RA-02 New Account Info Create/Manage Account Module (View: Registration Form)  Create/Manage Account Module (View: Login Page) Choose Register Option New customer chooses option to register a new account. RA-01 Register Account Responses (Outputs) Trigger (Inputs) Event Description Event
Reverse Engineering Online Catalog  Step 7 – Created Event Diagrams Event diagrams based on single events Event decomposition diagram Context diagram Event-response list Single event focus Elementary processes Inputs Outputs Data store interactions, as applicable
Manually Mining Business Rules “ Rules in the business rule approach must be perceived and expressed declaratively, independent of processes and procedures.”  Ronald G. Ross   8 Modeling existing system’s processes and decomposing functions to single events assisted with elevating understanding from a business  solution system  to a business  problem . “… rules must be enforced when certain events occur.”  9 Logical process modeling  Narrowed focus from high level functions to individual events. Aided in identifying critical events and associated business rules.
Manually Mining Business Rules  (continued) RA-01 – Register Account External agent identified as new customer Action was to provide registration form Business rule:  10   Customers must have accounts to access the online catalog.
Manually Mining Business Rules   (continued) RA-02 – New Account Info New customer provides account information Event returned either error or acceptance message Business rule:  Only valid account information will be accepted.
Manually Mining Business Rules   (continued) RA-03 – Account Info Creation Passes validated user data to a data store Passes either a  Welcome New User  or a  System Error  message to the user Business rule:  Only valid account information will be accepted.
Manually Mining Business Rules   (concluded) Discovered business rules Verified with business users and development team Collected and placed in a rule repository Note:  Rule repository can be a spreadsheet, database, or word processing table.
Reverse Engineering Client-Server System Telecommunication company’s order processing system Built with PowerBuilder 11 Many application defects System documentation not available Discovered processes and technical details  Logical process model based on features discovered in GUIs Help Text Training Materials Identified technical details with PB Code Analyzer Table names Field attributes Cross references (relationships)
Reverse Engineering Client-Server System  (continued) Objects   Identified by analyzer tool  External agents in process model Edit Request  event’s external agents Request Originator (a person) PROV_DL (Provisioning Directory Listing) NUM_ASGN (Number Assignment)
Reverse Engineering Client-Server System  (continued) Edit Request  Event on Event-Response List Edit Request  Event Diagram Open request general information is updated.  Open Reservation Records Reservation Number Reservation Module (View: Open Reservation Request, double click on selected request, perform edit in left frame, and click Save icon.) General Info Update Line Count Increase Request Originator, Provisioning Directory Listing (PROV_DL) and Number Assignment (NUM_ASGN) edits general information or creates number of lines on open number reservation request. Edit Request  2-4d Responses (Outputs) Trigger (Inputs) Event Description Event
Reverse Engineering Client-Server System  (concluded) Logical process model was built Developed primitive diagrams  Created system diagram Created physical process model Business rules  Based on events Verified with business users and development team
Reverse Engineering SQL Stored Procedures Master account data Hosted on mainframe systems Scheduled push to subsidiary repositories with stored procedures Reengineering project   Required reverse engineering of stored procedures to Understand processes Find underlying business rules Two sets of SQL stored procedures Created in 1999 with multiple patches 10 procedures sourced data from mainframe 7 procedures sourced data from Excel spreadsheets Available documentation Brief definition of SQL steps One process flow
Reverse Engineering SQL Stored Procedures  (continued) Built logical process model Each procedure was considered to be a single feature/process Determined potential function list for each process Reviewed available documentation Located comments embedded in code Created context diagram Identified events by finding SQL keywords in the code INSERT INTO CREATE TABLE UPDATE Created event-response lists by reviewing code leading to SQL keyword Created hyperlinked word processing documents containing Modeling artifacts Procedural code Hyperlinks from diagrams/decomposition tables to applicable code
Reverse Engineering SQL Stored Procedures  (concluded) Verified process model documentation/code Business Analyst Data Base Administrator (DBA) Data Base Architect Derived and verified business rules Business Analyst  DBA Project Manager
Conclusion Logical process modeling to discover business rules provides Proven methods/steps Effective software maintenance and/or reengineering Understanding of functions  Software applications Background processes Inferred business rules Assistance with comprehensive business requirements analysis
Questions? 1   Seventh International Business Rules Forum (2004), “ Get Ready for Your Business Rules Management ” 2   Structured Query Language (SQL) is an industry language for creating, updating, and querying relational database management systems. 3   Jeffrey L. Whitten and Lonnie D. Bentley, Systems Analysis and Design Methods, (Irwin/McGraw Hill, 1998): 236. 5   Ibid, 237.  Note:   Primitive and system diagrams are typically created during logical process modeling. However, these diagrams may not be necessary for determining business rules and thus the logical process modeling efforts may end after building all event diagrams. 6   The external data stores  User Data ,  Shopping Bag ,  Order Table , and  Shipping/Billing   implied data relating to the events/responses.  In actuality, a data store may exist but the name is unknown at this point in the modeling process.  7   Where necessary, processes are divided into sub-processes. 8   Ronald G. Ross,  Principles of the Business Rules Approach , (Addison-Wesley, 2003): 70. 10   Interpretations of these events may vary depending upon the business.  Business rules stated are examples of business rules mining and may not be actual rules created during a true modeling/mining situation. 11   PowerBuilder, a GUI development tool from Powersoft, is used for developing client-server database applications in PowerScript, a language loosely based on BASIC.  4   Ibid, 237. 9   Ibid, 70.

Just in Time (JiT) Business Rules Mining

  • 1.
    Just in Time(JIT) Business Rules Mining When Time is All You Have and the Documentation Just Isn’t There Shirley J. Sartin, CBAP ™ PMP ® November 10, 2005
  • 2.
    Introduction Terry Moriartyasked, “How much of the current state business rules should be harvested?” 1 Suggested reengineer To a new vision Just enough to understand environment as business understands itself. What about dead or forgotten business rules? Maybe pull out just enough information to understand and cross link discovered business rules with new system.
  • 3.
    Situation Application maintenanceor reengineering Requires understanding of Functions Background processes Underlying business rules Supporting documentation is unavailable or insufficient No access to Data Synchronized code Analysis artifacts No budget for consultants or product solutions How can business rules be manually mined?
  • 4.
    Resolution Determine existingapplication or process Functions Events Inferred business rules Derive a logical process model from source code or a user interface Verify resultant model Infer and verify business rules
  • 5.
    Agenda Modeling logicalprocesses to reverse engineer Existing applications E-commerce web site with no viewable source code. Client-server Order processing application Background processes Structured Query Language (SQL) 2 stored procedures automatically pushing master account data Modeling methods and steps to determine Functions Events Business rules Verifying business rules Questions/Discussion
  • 6.
    Logical Process ModelingReverse engineer with limited documentation Source code Graphical User Interfaces (GUIs) Model artifacts created based on event-driven processes 3 Conceptual or business model Process focus System owner System user perspective Business view of activities Model based on business events assist in deriving Business processing requirements Business rules
  • 7.
    Logical Process Modeling (continued) Models especially effective for determining business rules 4 Do not include redundant activities Are technology independent Have no physical limitations Have no requirements Developed model may be used as interim step in system design Verification/validation of discovered business rules Business users Information Technology (IT) development staff Logical process model Shows what a system does …..not how it is done Does not reflect technical solution implementation
  • 8.
    Logical Process Modeling (concluded) Follow specific steps to produce logical model artifacts 5 System Context Diagram – Indicates events or transactions system must respond to, system responses, sources and destination for both, and identity of all external data stores. Functional Decomposition Diagram – Provides top-down functional decomposition or structure of the system. Event-Response List – Determines business events system must respond to and appropriate responses. Serves to identify input data flow. Event Diagrams – Derived from combination of event list and further partitioning of functional decomposition diagram, shows inputs, outputs, and data store interactions for each event .
  • 9.
    Reverse Engineering OnlineCatalog Step 1 – Identified Features Reviewed department store online catalog web pages Potential features identified Search Product (by Category/Department) View Product List (by Department) Create/Manage Account Manage Shopping Cart View Store Locations and Events Status of Orders Inquire on Shipping Methods & Charges Login to Site Apply for Credit Each feature deemed a separate subsystem or process Focus was placed on only one process at a time. Analysis effort more manageable Event diagrams end product of modeling
  • 10.
    Reverse Engineering OnlineCatalog Step 2 – Determined Functions Create/Manage Account Process Stepped through web pages Noted actions that occurred Select a profile function: Update Account Profile Access Shopping Bag Review Order History/Status Setup Express Checkout Select Profile Functions E-mail password hint to existing customer. Remind Password Create user account. Create Account Description Function
  • 11.
    Reverse Engineering OnlineCatalog Step 3 - Created Context Diagram Context Diagram Symbols Data flows indicate events and responses for each of the processes and sub processes. These events/responses will be used during the functional decomposition of each process/sub process. External data stores are identified to assist with understanding the logical process. Individual (primitive) event diagrams will be created for each event in the event decomposition diagram and will show net inputs, net outputs, and data store interactions for each sub process. External agents/entities are the source for net inputs into the process and/or destination for net outputs from the process. Sub processes are functions of the single feature (or process). Each of the sub processes identified will be used in the functional diagram to decompose events/responses that have been identified. Process – a single feature. How Used Diagram Symbol
  • 12.
    Reverse Engineering OnlineCatalog Step 3 - Created Context Diagram (continued) Reviewed web pages to identify Inputs Outputs Data Flows Data Stores Functions Create/Manage Account Function Information Shopping Bag Maintain Account Shopping Bag Items User Data Shipping/Billing Maintain Account Express Checkout User Data Orders Maintain Account Order History/Status User Data Maintain Account Account Info Updates Function Selection Select Profile Function: Update Account Profile Access Shopping Bag Review Order History/Status Setup Express Checkout User Data Ask for Password E-mail Address Get Password Reminder Remind Password Existing Customer User Data 6 Register Account New Acct Info Account Info Creation Create Account New Customer Create/Manage Account External Data Stores Events/Responses Sub Processes (Functions) External Agents Process (Feature)
  • 13.
    Reverse Engineering OnlineCatalog Step 3 - Created Context Diagram (concluded)
  • 14.
    Reverse Engineering OnlineCatalog Step 4 – Created Functional Decomposition Diagram Create/Manage Account context diagram Decomposed to sub processes (functions) 7 Top-down functional decomposition
  • 15.
    Reverse Engineering OnlineCatalog Step 5 – Decomposed Events Focused on Create Account function and determined business events/system responses
  • 16.
    Reverse Engineering OnlineCatalog Step 6 – Decomposed Events (concluded) Derived from combination of Context diagram Further partitioning of functional decomposition diagram
  • 17.
    Reverse Engineering OnlineCatalog Step 6 – Created Event-Response List Business events were determined System responses were considered Event-Response List created Create Account Sub-Module Validation/verification user data. (View: Welcome new user or Error/Acceptance message.) Create Account Sub-Module (Background Process) Register User Data System writes data to user data store and provides account validation. RA-03 Acct Info Creation Create Account Sub-Module Validation/verification form inputs. (View: Error or acceptance messages.) Create/Manage Account Module (View: Registration Form) Provide account information: User Data User Name E-mail Address Password Zip/Postal Code E-mail Update Selection New customer provides account information. RA-02 New Account Info Create/Manage Account Module (View: Registration Form) Create/Manage Account Module (View: Login Page) Choose Register Option New customer chooses option to register a new account. RA-01 Register Account Responses (Outputs) Trigger (Inputs) Event Description Event
  • 18.
    Reverse Engineering OnlineCatalog Step 7 – Created Event Diagrams Event diagrams based on single events Event decomposition diagram Context diagram Event-response list Single event focus Elementary processes Inputs Outputs Data store interactions, as applicable
  • 19.
    Manually Mining BusinessRules “ Rules in the business rule approach must be perceived and expressed declaratively, independent of processes and procedures.” Ronald G. Ross 8 Modeling existing system’s processes and decomposing functions to single events assisted with elevating understanding from a business solution system to a business problem . “… rules must be enforced when certain events occur.” 9 Logical process modeling Narrowed focus from high level functions to individual events. Aided in identifying critical events and associated business rules.
  • 20.
    Manually Mining BusinessRules (continued) RA-01 – Register Account External agent identified as new customer Action was to provide registration form Business rule: 10 Customers must have accounts to access the online catalog.
  • 21.
    Manually Mining BusinessRules (continued) RA-02 – New Account Info New customer provides account information Event returned either error or acceptance message Business rule: Only valid account information will be accepted.
  • 22.
    Manually Mining BusinessRules (continued) RA-03 – Account Info Creation Passes validated user data to a data store Passes either a Welcome New User or a System Error message to the user Business rule: Only valid account information will be accepted.
  • 23.
    Manually Mining BusinessRules (concluded) Discovered business rules Verified with business users and development team Collected and placed in a rule repository Note: Rule repository can be a spreadsheet, database, or word processing table.
  • 24.
    Reverse Engineering Client-ServerSystem Telecommunication company’s order processing system Built with PowerBuilder 11 Many application defects System documentation not available Discovered processes and technical details Logical process model based on features discovered in GUIs Help Text Training Materials Identified technical details with PB Code Analyzer Table names Field attributes Cross references (relationships)
  • 25.
    Reverse Engineering Client-ServerSystem (continued) Objects Identified by analyzer tool External agents in process model Edit Request event’s external agents Request Originator (a person) PROV_DL (Provisioning Directory Listing) NUM_ASGN (Number Assignment)
  • 26.
    Reverse Engineering Client-ServerSystem (continued) Edit Request Event on Event-Response List Edit Request Event Diagram Open request general information is updated. Open Reservation Records Reservation Number Reservation Module (View: Open Reservation Request, double click on selected request, perform edit in left frame, and click Save icon.) General Info Update Line Count Increase Request Originator, Provisioning Directory Listing (PROV_DL) and Number Assignment (NUM_ASGN) edits general information or creates number of lines on open number reservation request. Edit Request 2-4d Responses (Outputs) Trigger (Inputs) Event Description Event
  • 27.
    Reverse Engineering Client-ServerSystem (concluded) Logical process model was built Developed primitive diagrams Created system diagram Created physical process model Business rules Based on events Verified with business users and development team
  • 28.
    Reverse Engineering SQLStored Procedures Master account data Hosted on mainframe systems Scheduled push to subsidiary repositories with stored procedures Reengineering project Required reverse engineering of stored procedures to Understand processes Find underlying business rules Two sets of SQL stored procedures Created in 1999 with multiple patches 10 procedures sourced data from mainframe 7 procedures sourced data from Excel spreadsheets Available documentation Brief definition of SQL steps One process flow
  • 29.
    Reverse Engineering SQLStored Procedures (continued) Built logical process model Each procedure was considered to be a single feature/process Determined potential function list for each process Reviewed available documentation Located comments embedded in code Created context diagram Identified events by finding SQL keywords in the code INSERT INTO CREATE TABLE UPDATE Created event-response lists by reviewing code leading to SQL keyword Created hyperlinked word processing documents containing Modeling artifacts Procedural code Hyperlinks from diagrams/decomposition tables to applicable code
  • 30.
    Reverse Engineering SQLStored Procedures (concluded) Verified process model documentation/code Business Analyst Data Base Administrator (DBA) Data Base Architect Derived and verified business rules Business Analyst DBA Project Manager
  • 31.
    Conclusion Logical processmodeling to discover business rules provides Proven methods/steps Effective software maintenance and/or reengineering Understanding of functions Software applications Background processes Inferred business rules Assistance with comprehensive business requirements analysis
  • 32.
    Questions? 1 Seventh International Business Rules Forum (2004), “ Get Ready for Your Business Rules Management ” 2 Structured Query Language (SQL) is an industry language for creating, updating, and querying relational database management systems. 3 Jeffrey L. Whitten and Lonnie D. Bentley, Systems Analysis and Design Methods, (Irwin/McGraw Hill, 1998): 236. 5 Ibid, 237. Note: Primitive and system diagrams are typically created during logical process modeling. However, these diagrams may not be necessary for determining business rules and thus the logical process modeling efforts may end after building all event diagrams. 6 The external data stores User Data , Shopping Bag , Order Table , and Shipping/Billing implied data relating to the events/responses. In actuality, a data store may exist but the name is unknown at this point in the modeling process. 7 Where necessary, processes are divided into sub-processes. 8 Ronald G. Ross, Principles of the Business Rules Approach , (Addison-Wesley, 2003): 70. 10 Interpretations of these events may vary depending upon the business. Business rules stated are examples of business rules mining and may not be actual rules created during a true modeling/mining situation. 11 PowerBuilder, a GUI development tool from Powersoft, is used for developing client-server database applications in PowerScript, a language loosely based on BASIC. 4 Ibid, 237. 9 Ibid, 70.