Upload
richard-king
View
214
Download
1
Embed Size (px)
Citation preview
Stephen EdgecombeRevolution Software Services1st June 2006
Schema Version ControlSchema Version Control
Why, How, What, When & Why, How, What, When & WhoWho
Stephen EdgecombeRevolution Software Services1st June 2006
Schema Version ControlSchema Version Control WhyWhy
• is Version Control important?is Version Control important? HowHow
• are Versions managed?are Versions managed? WhatWhat
• is a Schema?is a Schema? WhenWhen
• do Versions change?do Versions change? WhoWho
• is using which Version?is using which Version?
Stephen EdgecombeRevolution Software Services1st June 2006
Why: Version Control?Why: Version Control?
Data requirements changeData requirements change Diverse SourcesDiverse Sources
• 15+ OEMs (members)15+ OEMs (members)• Example: Vehicle InventoryExample: Vehicle Inventory
Diverse DestinationsDiverse Destinations• 20 DMS Apps (7 DMS members)20 DMS Apps (7 DMS members)• 1800+ Dealer sites1800+ Dealer sites• Multi-franchiseMulti-franchise
Impossible to: Impossible to: • keep everyone at the same versionkeep everyone at the same version• Cut over to a new version as a single stepCut over to a new version as a single step
Stephen EdgecombeRevolution Software Services1st June 2006
Version Control: GuideVersion Control: Guide
Implement a new versionImplement a new version• Message Sender (OEM)Message Sender (OEM)
Must be able to select the version to send to Must be able to select the version to send to each destination (Dealer).each destination (Dealer).
• Message Receiver (DMS)Message Receiver (DMS) Must be able to support each version that all Must be able to support each version that all
Data Senders (OEM) are capable of sending. Data Senders (OEM) are capable of sending.
Stephen EdgecombeRevolution Software Services1st June 2006
Version Control: How: Part 1Version Control: How: Part 1
Version ManagementVersion Management• The transaction must carry information about The transaction must carry information about
which Version it is.which Version it is.• The receiver (program) must verify that it is The receiver (program) must verify that it is
processing the correct Version.processing the correct Version. TransactionsTransactions
• XML – The AutoDESA StandardXML – The AutoDESA Standard XML MessagesXML Messages
• Described by an XML Schema Definition (XSD)Described by an XML Schema Definition (XSD)
Stephen EdgecombeRevolution Software Services1st June 2006
What is a Schema?What is a Schema? DefinitionsDefinitions
• XML Schema is a language for XML Schema is a language for describing the describing the structurestructure and and constraining the contentsconstraining the contents of XML of XML documents documents
• Defines a data structure. A schema Defines a data structure. A schema guaranteesguarantees that that the XML elements are linked to it follow the the XML elements are linked to it follow the defined defined structurestructure..
What does a schema do?What does a schema do?• Names of Elements (fields and sub-structures)Names of Elements (fields and sub-structures)• Arrangement (structure) of elementsArrangement (structure) of elements• Mandatory and Optional elementsMandatory and Optional elements• Data TypeData Type• Limit Values (length, value range, enumeration ….)Limit Values (length, value range, enumeration ….)
Stephen EdgecombeRevolution Software Services1st June 2006
Schema: ExampleSchema: Example
<element name="Status"><complexType>
<sequence><element name="VehicleSupplyStatus" type="VehicleSupplyStatus“/>.</sequence>
</complexType></element>
<simpleType name="VehicleSupplyStatus"><restriction base="token">
<enumeration value="Allocated“/><enumeration value="Shipped“/><enumeration value="Dispatched“/><enumeration value="Delivered“/>
</restriction></simpleType>
Snippets from the VehicleInventoryMsg Schema
Stephen EdgecombeRevolution Software Services1st June 2006
Schema: ExamplesSchema: Examples
<element name="Status"><complexType>
<sequence><element name="VehicleSupplyStatus" type="VehicleSupplyStatus“/>.</sequence>
</complexType></element>
<simpleType name="VehicleSupplyStatus"><restriction base="token">
<enumeration value="Allocated“/><enumeration value="Shipped“/><enumeration value="Dispatched“/><enumeration value="Delivered“/>
</restriction></simpleType>
<Status><VehicleSupplyStatus>Despatched</VehicleSupplyStatus>
</Status>
Snippet from a VehicleInventoryMsg XML
Stephen EdgecombeRevolution Software Services1st June 2006
The Schema Adds ValueThe Schema Adds Value Reference to Validate an XML DocumentReference to Validate an XML Document
• Message SenderMessage Sender Validate before you sendValidate before you send
• Lower maintenance costLower maintenance cost• Better data qualityBetter data quality
• Message ReceiverMessage Receiver Validate before you processValidate before you process
• Rejected data costs less than corrupt dataRejected data costs less than corrupt data• Lower maintenance costLower maintenance cost
XML utilities provide validationXML utilities provide validation• Saves program codeSaves program code
Do you validate messages against the Do you validate messages against the schema? schema? • It will cost if you don’t! It will cost if you don’t!
Stephen EdgecombeRevolution Software Services1st June 2006
Version Control: How: Part 2Version Control: How: Part 2 The Schema defines attributes to The Schema defines attributes to
describe the Versiondescribe the Version The XML message must carry these The XML message must carry these
attributes to pass validation against attributes to pass validation against the Schemathe Schema
AutoDESA have two different Schema AutoDESA have two different Schema standards:standards:• Our own: Vehicle Inventory, Vehicle Our own: Vehicle Inventory, Vehicle
Invoice AdviceInvoice Advice• STAR BODSTAR BOD
Stephen EdgecombeRevolution Software Services1st June 2006
AutoDESA SchemaAutoDESA Schema Vehicle Inventory, Vehicle Invoice AdviceVehicle Inventory, Vehicle Invoice Advice Out of dateOut of date
• Not to be used for any new transactionsNot to be used for any new transactions Web Services SOAP StandardWeb Services SOAP Standard
• SOAP Header:SOAP Header: <AutoDESAHeader><AutoDESAHeader> Sender and Receiver InformationSender and Receiver Information
• SOAP Body: SOAP Body: <VehicleInventoryMsg><VehicleInventoryMsg> Transaction payloadTransaction payload
Stephen EdgecombeRevolution Software Services1st June 2006
AutoDESA Schema: Version ControlAutoDESA Schema: Version Control
Attributes on the XML message root Attributes on the XML message root element:element:• xmlns=[message namespace]xmlns=[message namespace]
Part of the XML Schema standardPart of the XML Schema standard AutoDESA use xmlns to identify the major version of AutoDESA use xmlns to identify the major version of
an XML messagean XML message
• schemaVersion=‘VersionNumber’schemaVersion=‘VersionNumber’ AutoDESA standardAutoDESA standard Used to identify the minor version of a message, Used to identify the minor version of a message,
within a major versionwithin a major version Reset to ’1’ on new Major version. Reset to ’1’ on new Major version.
Stephen EdgecombeRevolution Software Services1st June 2006
AutoDESA Schema Version: WhenAutoDESA Schema Version: When Major Version: Change the xmlnsMajor Version: Change the xmlns
• Schema validation rules changeSchema validation rules change• Eg: Add a new minOccurs=‘1’ elementEg: Add a new minOccurs=‘1’ element• Guide: If a message of the old version would Guide: If a message of the old version would
FAIL validation against the new SchemaFAIL validation against the new Schema Minor Version: Change the schemaVersionMinor Version: Change the schemaVersion
• Minor Schema changeMinor Schema change• Eg: Add a new Optional elementEg: Add a new Optional element• Guide: If a message of the old version would Guide: If a message of the old version would
PASS validation against the new SchemaPASS validation against the new Schema• Application programs should check the Application programs should check the
schemaVersionschemaVersion
Stephen EdgecombeRevolution Software Services1st June 2006
AutoDESA Schema: ExamplesAutoDESA Schema: Examples AutoDESAHeaderAutoDESAHeader
• <AutoDESAHeader <AutoDESAHeader xmlns="http://schemas.autodesa.org/headers/2003/10/20/Headers.xsd" " schemaVersion="2"schemaVersion="2">>
• <AutoDESAHeader <AutoDESAHeader xmlns="http://schemas.autodesa.org/headers/2004/06/21/Headers.xsd" " schemaVersion="1"schemaVersion="1">>
Mandatory elements <MessageSenderCode> and Mandatory elements <MessageSenderCode> and <MessageReceiverCode> added.<MessageReceiverCode> added.
VehicleInventoryMsgVehicleInventoryMsg• <VehicleInventoryMsg <VehicleInventoryMsg
xmlns="http://schemas.autodesa.org/vehicleinventory/2003/10/20/VehicleInventory.xsd" " schemaVersion="3"schemaVersion="3">>
• <VehicleInventoryMsg <VehicleInventoryMsg xmlns=“http://schemas.autodesa.org/vehicleinventory/2003/10/20/VehicleInventory.xsd” schemaVersion="4"schemaVersion="4">>
New optional element addedNew optional element added
Stephen EdgecombeRevolution Software Services1st June 2006
AutoDESA Schema: Version ControlAutoDESA Schema: Version Control
Sub SchemasSub Schemas• <xsd:schema <xsd:schema
xmlns="http://schemas.autodesa.org/vexmlns="http://schemas.autodesa.org/vehicleinventory/2003/10/20/VehicleInventhicleinventory/2003/10/20/VehicleInventory.xsd" >ory.xsd" >
<xsd:include <xsd:include schemaLocation="../../../../common/2003/10/schemaLocation="../../../../common/2003/10/20/Types.xsd"/>20/Types.xsd"/>
Location of Sub Schema allows for Location of Sub Schema allows for different versions of included Types.different versions of included Types.
Stephen EdgecombeRevolution Software Services1st June 2006
Version Control: STAR BODVersion Control: STAR BOD Not as comprehensive as AutoDESA Not as comprehensive as AutoDESA
standardstandard• xmlns="http://www.starstandards.org/STAR" xmlns="http://www.starstandards.org/STAR"
The same namespace for all BODs, All BOD VersionsThe same namespace for all BODs, All BOD Versions
• revision attribute on revision attribute on <BusinessObjectDocument> element.<BusinessObjectDocument> element.
Not part of Schema VaildationNot part of Schema Vaildation Application Program should checkApplication Program should check
Complex Included Types structureComplex Included Types structure• No provision for different <include> Schema No provision for different <include> Schema
versions versions • Can use ‘Standalone’ BODCan use ‘Standalone’ BOD
<Include> not used<Include> not used
Stephen EdgecombeRevolution Software Services1st June 2006
Version Control: STAR BODVersion Control: STAR BOD No experience implementing a STAR BOD No experience implementing a STAR BOD STAR appear to:STAR appear to:
• Only deliver Major revisions (2.0, 3.0)Only deliver Major revisions (2.0, 3.0)• Update all BODs at a common release point. Update all BODs at a common release point. • Have no provision for changing versions Have no provision for changing versions
between releases.between releases. AutoDESA:AutoDESA:
• How can we use the STAR BOD, be more How can we use the STAR BOD, be more adaptable and still have good Version Control?adaptable and still have good Version Control?
Make the ‘revision’ attribute required on all Make the ‘revision’ attribute required on all messages.messages.
Add ‘AU’ to the revision number for any local changes Add ‘AU’ to the revision number for any local changes (until STAR adopt the change into the standard)(until STAR adopt the change into the standard)
??
Stephen EdgecombeRevolution Software Services1st June 2006
STAR BOD: Impact on AutoDESASTAR BOD: Impact on AutoDESA
Smaller communitySmaller community Need to implement fasterNeed to implement faster Hard to adapt STAR BOD SchemasHard to adapt STAR BOD Schemas Get rid of SOAP Header: Get rid of SOAP Header:
<AutoDESAHeader><AutoDESAHeader> DevelopmentDevelopment
• Harder to easily identify which version.Harder to easily identify which version.• XML Message will fail Schema Validation if it XML Message will fail Schema Validation if it
doesn’t comply with Schema doesn’t comply with Schema • Implementation Guidelines documentationImplementation Guidelines documentation
Stephen EdgecombeRevolution Software Services1st June 2006
AutoDESA Schema: WhoAutoDESA Schema: WhoAutoDESAHeader Message Delivery Sources
Vehicle Inventory
xmlns="http://schemas.autodesa.org/headers/2003/10/20/Headers.xsd" schemaVersion='2'
xmlns="http://schemas.autodesa.org/vehicleinventory/2003/10/20/VehicleInventory.xsd" schemaversion="3"
Web Service: WSDL=http://schemas.autodesa.org/vehicleinventory/2003/10/20/VehicleInventory.wsdl
TMCA
HTTP POST Nissan
xmlns="http://schemas.autodesa.org/headers/2004/06/21/Headers.xsd" schemaVersion='1'
xmlns:p768="http://schemas.autodesa.org/vehicleinventory/2003/10/20/VehicleInventory.xsd" schemaVersion="4"
Web Service: WSDL=http://schemas.autodesa.org/vehicleinventory/2005/10/07/VehicleInventory.wsdl
TMCA, Toyota_WA
HTTP POST Honda
Unknown Mazda, Hyundai
Vehicle Invoice Advice
xmlns="http://schemas.autodesa.org/headers/2004/06/21/Headers.xsd" schemaVersion='1'
xmlns="http://schemas.autodesa.org/vehicleinvoiceadvice/2004/01/21/VehicleInvoiceAdvice.xsd"
Web Service: WSDL=http://schemas.autodesa.org/vehicleinvoiceadvice/2004/01/21/VehicleInvoiceAdvice.wsdl
TMCA
Stephen EdgecombeRevolution Software Services1st June 2006
WIP Schemas: WhoWIP Schemas: Who
STAR BODSTAR BOD• Parts OrdersParts Orders
FordFord
• Mitsubishi?Mitsubishi? STAR BOD ModelSTAR BOD Model
• Vehicle Model PricingVehicle Model Pricing Nissan, Mazda, HondaNissan, Mazda, Honda ShowVehicleSpecifications ?ShowVehicleSpecifications ?
AutoDESA (old) StandardAutoDESA (old) Standard• RDR - HondaRDR - Honda
Stephen EdgecombeRevolution Software Services1st June 2006
Version Control: SummaryVersion Control: Summary
XML Message must carry VersionXML Message must carry Version• Data requirements changeData requirements change• Complex trading partner mixComplex trading partner mix
Schema plays a vital roleSchema plays a vital role• Validate XML Message against schemaValidate XML Message against schema
STAR BOD ModelSTAR BOD Model• How will we manage Version Change?How will we manage Version Change?• How do we move forward?How do we move forward?
Stephen EdgecombeRevolution Software Services1st June 2006
Version Control Version Control A Final MessageA Final Message
If we don’t do Version Control well
Programs will breakPrograms will break Your customers will get bad dataYour customers will get bad data Different code per OEMDifferent code per OEM Benefits of AutoDESA will be reducedBenefits of AutoDESA will be reduced It will cost you $$$$It will cost you $$$$