1 / 51

Cornerstone Update Transaction

Templates for Business Inc. Cornerstone Update Transaction. Building a Fully Metadata Driven and Localized Application. Prepared by: Sergio Del Rio Date: June 7 th , 2006. Agenda. Introduction Process Flow RETS Resources Update Transaction Extensions Metadata Extensions

ewan
Download Presentation

Cornerstone Update Transaction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Templates for Business Inc. Cornerstone Update Transaction Building a Fully Metadata Driven and Localized Application Prepared by: Sergio Del Rio Date: June 7th, 2006

  2. Agenda • Introduction • Process Flow • RETS Resources • Update Transaction Extensions • Metadata Extensions • Validation Expressions • Presentation Metadata • Keystone Implementation Overview • Localization • JRETSC

  3. Agenda – Time Permitting • Sort • Distinct • Aggregate Functions • Cross Resource Joins

  4. Introduction • RETS Update Transaction • Existing Implementations • Process Flow Overview • Login • Get Metadata • General Search • Update • New Listing • Existing Listing

  5. Agenda • Introduction • Process Flow • RETS Resources • Update Transaction Extensions • Metadata Extensions • Validation Expressions • Presentation Metadata • Keystone Implementation Overview • Localization • JRETSC

  6. Process Flow - Login • Standard RETS Login • Not currently updated to RETS 1.5/1.7 • Cornerstone Role Restrictions • Contact MRIS for additional privileges • Interactive Update • Must login as Agent • Bulk Update • Will require special Login • Change tracking based on Login

  7. Process Flow – Get Metadata • Recommend Daily Updates • Basic Metadata • Presentation Metadata • Localization Metadata

  8. Process Flow – General Search • Select Existing Listings in System • Edit Existing Listing • Copy Existing Listing • Update Metadata - Copy on Cloning Flag • External Validation • Agent Lookup • School Lookup • Tax Lookup • Streets / Zip Code Lookup

  9. Process Flow – Existing Listing • Select with ForUpdate=1 • Use ListingKey for Search • Limit Number of Checked Out Listings • Role Based

  10. Process Flow – New Listings • Update – Auto Populate Step • Use validate-flag = 1 • Mandatory Fields • Identified by - Update Metadata AutopopRequired • Currently: • County • Property Type

  11. Process Flow – Validate Step • Update – validate-flag = 2 • Execute after all Mandatory Fields identified in the Update Metadata are filled in by user • Execute after all Validation Expressions are executed by the client • Returns Error/Warning Block • Data Not Saved in Database • If not already done, automatically executes Update Auto Populate Step

  12. Process Flow – Save Step • Update – validate-flag=0 • Data Saved in Database if: • No Error block is returned • No Un-Answered Warnings are returned • If not already done, automatically executes Update Validate Step • Listing Number Generated • Listing Date Generated • Listing immediately visible to users

  13. Agenda • Introduction • Process Flow • RETS Resources • Update Transaction Extensions • Metadata Extensions • Validation Expressions • Presentation Metadata • Keystone Implementation Overview • Localization • JRETSC

  14. RETS Resources • Updateable Resources • Property – Class=ALL • OpenHouse – Class=OPEN_HOUSE • External Validation Resources • MRIS_ALL_ACTIVE_LIST_AGENT • MRIS_ALL_ACTIVE_ALT_AGENT • MRIS_ALL_ACTIVE_SALE_AGENT • MRIS_ALL_SCHOOL_ELEM • MRIS_ALL_SCHOOL_HIGH • MRIS_ALL_SCHOOL_MIDDLE • MRIS_ALL_CITY_ZIP_CODE • MRIS_ALL_MRIS_TAX • Images • At this time we do not support the addition of Images

  15. Agenda • Introduction • Process Flow • RETS Resources • Update Transaction Extensions • Metadata Extensions • Validation Expressions • Presentation Metadata • Keystone Implementation Overview • Localization • JRETSC

  16. Update Transaction Extensions • Errors in Warning Block Definition Fixed • Return Data Sizes Increased • Transaction ID Defined

  17. Agenda • Introduction • Process Flow • RETS Resources • Update Transaction Extensions • Metadata Extensions • Validation Expressions • Presentation Metadata • Keystone Implementation Overview • Localization • JRETSC

  18. Metadata Extensions • Existing Metadata • METADATA-CLASS • METADATA-TABLE • METADATA-LOOKUP_TYPE

  19. Metadata Extensions • Newly Implemented Metadata • METADATA-UPDATE (Extended) • METADATA-UPDATE_TYPE (Extended) • METADATA-EDITMASK • METADATA-FOREIGNKEYS (Extended) • METADATA-VALIDATION_LOOKUP • METADATA-VALIDATION_LOOKUP_TYPE (Extended) • METADATA-VALIDATION_EXTERNAL (Extended) • METADATA-VALIDATION_EXTERNAL_TYPE (Extended) • METADATA-SEARCH_HELP • METADATA-UPDATE_HELP • METADATA-VALIDATION_EXPRESSION (Extended)

  20. Agenda • Introduction • Process Flow • RETS Resources • Update Transaction Extensions • Metadata Extensions • Validation Expressions • Presentation Metadata • Keystone Implementation Overview • Localization • JRETSC

  21. Validation Expressions • Additional Special Operand Token • .RECORDSTATUS.  NEW, UPDATE • Validation Expression BNF Grammar • Makes Validation Expressions implementable • Extended Metadata • Event Types • Validation Expression Types

  22. Agenda • Introduction • Process Flow • RETS Resources • Update Transaction Extensions • Metadata Extensions • Validation Expressions • Presentation Metadata • Keystone Implementation Overview • Localization • JRETSC

  23. Presentation Metadata • Allows for 100% Metadata Driven Client • Grouping of Related Fields • New Metadata • METADATA-COLUMN_GROUP_SET • METADATA-COLUMN_GROUPS • METADATA-COLUMN_GROUP_CONTROL • METADATA-COLUMN_GROUP_TABLE • METADATA-COLUMN_GROUP_NORMALIZATION

  24. Keystone Implementation Overview

  25. Agenda • Introduction • Process Flow • RETS Resources • Update Transaction Extensions • Metadata Extensions • Validation Expressions • Presentation Metadata • Keystone Implementation Overview • Localization • JRETSC

  26. Localization • Allows for the Development of Dynamic Regionalized Applications • What can be Localized? • Columns can be Hidden • Picklist Items can be Hidden • Column Labels can be Changed • Picklist Labels can be Changed • New Metadata • METADATA-LOCALE_LOOKUP • METADATA-LOCALE • METADATA-LOCALE_TABLE_SUPPRESSION • METADATA-LOCALE_TABLE_TRANSLATION • METADATA-LOCALE_LOOKUP_INFORMATION • METADATA-LOCALE_LOOKUP_TYPE_SUPPRESSION • METADATA-LOCALE_LOOKUP_TYPE_TRANSLATION

  27. Localization - Future • Validation Expressions • Can currently localize rules using the Expression Language • Will allow a cleaner implementation in the near future

  28. Agenda • Introduction • Process Flow • RETS Resources • Update Transaction Extensions • Metadata Extensions • Validation Expressions • Presentation Metadata • Keystone Implementation Overview • Localization • JRETSC

  29. JRETSC • Java RETS Client Library • Completely Abstracts all RETS Transactions • Higher Developer Productivity • Similar Interface than JDBC • Abstract API Design • Allows for Multiple Implementations • Will support RETS 2.0 in future with no API changes

  30. JRETSC RetsConnection • Instantiate RetsConnection Object: Class driverClass; String className = ”com.mris.platinum.client.direct.DirectConnection”; try { driverClass = Class.forName(className); this.retsConnection = (RetsConnection) driverClass.newInstance(); }

  31. JRETSC Login • Execute the RetsConnection login() Method RetsOffice[] retsOffices; retsOffices = this.retsConnection.logIn(this.serverUrl, this.userAgent, this.agentLogin, this.agentPassword); // If more than one office returned, user should pick one. if (retsOffices.length > 1) { this.retsConnection.setOffice(retsOffices[0]); }

  32. JRETSC Search • Using SearchHandler RetsSearch retsSearch; retsSearch = this.retsConnection.getSearchHandler(); retsSearch.initSearch(“Property”, “ALL”, true, true); // retsSearch.executeSearch(“(ListingKey=1234567890)”); retsSearch.executeSearchForUpdate(“(ListingKey=1234567890)”);

  33. JRETSC Search • Retrieving Results RetsResultSet retsResultSet; RetsResultRow retsResultRow; while (retsSearch.hasMoreSets()) { retsResultSet = retsSearch.getNextSet(); while (retsResultSet.hasMore()) { retsResultRow = retsResultSet.next(); System.out.println(retsResultRow.getString(“ListingKey”)); } }

  34. JRETSC Update • Using UpdateHandler RetsUpdate retsUpdate; RetsUpdateResult retsUpdateResult; retsUpdate = this.retsConnection.getUpdateHandler(); retsUpdate.initUpdate("Property", "ALL", "Change"); retsUpdate.addUpdateField("ListingKey", retsResultRow.getString("ListingKey")); retsUpdate.addUpdateField(“ListPrice”, “1500000.00”); retsUpdateResult = retsUpdate.executeUpdate(RetsValidateFlag.SAVE);

  35. JRETSC Update • Retrieving Update Results RetsUpdateError[] retsUpdateErrors; retsUpdateErrors = retsUpdateResult.getRetsUpdateErrors(); if ((retsUpdateErrors != null) && (retsUpdateErrors.length > 0)) { for (int i = 0; i < retsUpdateErrors.length; i++) { if (retsUpdateErrors[i].isWarning()) { System.out.println("WARNING: " + retsUpdateErrors[i].toString()); } else { System.out.println("ERROR: " + retsUpdateErrors[i].toString()); } } } else { if (retsUpdateResult.getRetsResultRow() != null) { retsResultRow = retsUpdateResult.getRetsResultRow(); } }

  36. JRETSC Logout • Simple Method Call • this.retsConnection.logOut();

  37. Agenda • Sort • Distinct • Aggregate Functions • Cross Resource Joins

  38. Sort • New Search Option • Sort ::= field-name:sort-dir *(,field-name:sort-dir) • Valid sort-dir Values • ASC • DES • Role Based Sorting Limits • Necessary for Performance and Memory Usage • Example: • Sort=ListPrice:ASC

  39. Agenda • Sort • Distinct • Aggregate Functions • Cross Resource Joins

  40. Distinct • New Search Option • Distinct ::= 0 | 1 • Default is 0 – All Records • When set to 1 – Only Returns Distinct Records • Uses Sort Extension • Example: • Distinct=1

  41. Agenda • Sort • Distinct • Aggregate Functions • Cross Resource Joins

  42. Aggregate Functions • Extension to Select Clause • Sort Extension becomes Group By • Columns in Select that are not Aggregated are automatically added to Sort • Supported Functions • SUM • AVG • COUNT • MIN • MAX • MEDIAN • STDDEV

  43. Aggregate Functions • Example: • Select=County,AVG(ListPrice) • Returns the Average ListPrice grouped by County • Select=AVG(ListPrice)&Sort=County:ASC • Returns the Average ListPrice grouped by County • Return Data Format - COMPACT • Functional Results are Always at End of standard RETS Data Row • Column Name will be Function(Field) • Example: • <COLUMNS>\tCol1\tCol2\tAVG(Col3)\t</COLUMNS> • <DATA>\tData1\tData2\tData3\t</DATA>

  44. Aggregate Functions • Return Data Format – XML • New Element: <AggregateFunctions> • Returned immediately after top level XML Node • Columns returned with Function Attribute • Example: <REDATA> <MRISProperties> <ResidentialProperty> … </ResidentialProperty> </MRISProperties> <AggregateFunctions> <Col3 Function=AVG> … </Col3> </AggregateFunctions> </REDATA>

  45. Agenda • Sort • Distinct • Aggregate Functions • Cross Resource Joins

  46. Cross Resource Joins • Based on Foreign Key Metadata • Two kinds of Joins • Normal Join • Exists Only Join • METADATA-FOREIGNKEYS • X-MRIS_OneToManyFlag • TRUE – Only for Exists Only Joins • FALSE – Exists for Normal Joins • Driving Resource and Class specified as normal Search Options

  47. Cross Resource Joins • New Search Option • Join ::= ForeignKeyID:Tag *(,ForeignKeyID:Tag) • Tag Use • Becomes a Label used to identify Fields in the Select and DMQL Options • Example: • Join=1234567890:ListingAgent • DMQL=(ListingAgent.LastName=Smith) • Select=ListingID,ListPrice,ListingAgent.FirstName

  48. Cross Resource JoinsReturn Data Format • COMPACT • Uses additional <DATA> groupings for each Join used after driving Resource </DATA> • Each Join identified by ForeignKey=Tag Attribute • Example: • <COLUMNS>\tCol1\tCol2\tCol3\t</COLUMNS><COLUMNS ForeignKey=”ListingAgent”>\tCol1\tCol2\t</COLUMNS> • <DATA>\tData1\tData2\tData3\t</DATA><DATA ForeignKey=”ListingAgent”>\tData1\tData2\t</DATA>

  49. Cross Resource JoinsReturn Data Format • XML • New Element: <Join> • Returned immediately after top level XML Node • Each Join identified by ForeignKey=Tag Attribute • If no data exists for Join, only returns begin and end <Join> XML Attributes • Example: <REDATA> <MRISProperties> <ResidentialProperty> … </ResidentialProperty> </MRISProperties> <Join> <ActiveAgent ForeignKey=”ListingAgent”> … </ActiveAgent> </Join> </REDATA>

  50. Testing & Support • Test Server • http://ptest.mris.com:6103/ptest/login • Contact MRIS for User ID and Password • E-Mail: rets@mris.net • Provide MRIS with UserAgent for Update application • RETS Forum • http://forums.mris.com/forums/index.cfm?forumID=3 • Also Accessible through http://www.mris.com • MRIS Update Transaction

More Related