M2AP Methodology For Message Assembly Profile Improving traceability, reusability and instance interoperability in CIM XML message content schema design : proposal based on UN/Cefact Core Component work Cyril.Effantin@edf.fr 5/8/2019
Before to start Dictionary for Words definition grammar English Text XML XSD 5/8/2019
Before to start XML XSD 5/8/2019
Before to start Specified by XSD File XML Instance 5/8/2019
Introduction 5/8/2019
Attributes value can be what we want! Generic Type String <Organisation> <name>EDF</name> <organisationCode>abcdefgh</organisationCode> <marketRole>gkfioererfdsflfk</marketRole> <organisationType>gkfioererfdsflfk</ organisationType > <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> 5/8/2019
Attributes value can be what we want! Generic Type String <Organisation> <name>EDF</name> <organisationCode>abcdefgh</organisationCode> <marketRole>BalanceSupplier </marketRole> <organisationType>gkfioererfdsflfk</ organisationType > <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> 5/8/2019
Generic XML instance !! All attributes are optional!! <Organisation> <name>EDF</name> <organisationCode>123456789</organisationCode> <marketRole>BalanceSupplier </marketRole> <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> Generic XML instance !! 5/8/2019
We could also want compact XML instance!!! We may want marketRole value to be only (BalanceSupplier or Consumer) and no organisationType attribute in our XML instance. We could also want compact XML instance!!! <Organisation> <name>EDF</name> <organisationCode>123456789</organisationCode> <marketRole>BalanceSupplier Or Consumer</marketRole> <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> Restricted XML Instance 5/8/2019
We could also want compact XML instance!!! <Organisation name=“EDF” organisationCode=“123456789” marketRole =“BalanceSupplier” > <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> 5/8/2019
How to manage all those specific XML needs ? We could also want compact XML instance!!! <Organisation name=“EDF” organisationCode=“123456789” marketRole =“BalanceSupplier” > <ErpPerson lastName =“Dupont” firstName =“Pierre” /> </Organisation> How to manage all those specific XML needs ? 5/8/2019
UN/Cefact Specifications 5/8/2019
UML Contextual Model for a Business process UML Information Model UML Message Content Model XSD Implementation Message Model 5/8/2019
Core Components Core DataTypes message XML Implementation model UN/Cefact Docs CCTS Message Assembly BCSS XML NDR UN/Cefact Working Group CCWG ATG Modeling Level 1 Information Model Core Components Core DataTypes UML profile support for CCTS XML Schema generation rules Modeling Level 2 Contextual Model Business Information Entities Business dataTypes Modeling Level 3 Message Content Model Assembly Rules UML profile for message assembly XML Schema Assembly Rules Modeling Level 4 message XML Implementation model Output Files XMI XSD 5/8/2019
UN/Cefact proposed evolutions 5/8/2019
UML Message Contextual UML Information Model For a Generic Domain CCTS BCSS UCM Sub-Context/ Business Sub-Domain 0..N 1 UML Message Contextual UML Contextual Model for a Business Domain UML Message Sub-Contextual Models UML Message Assembly Model Msg Assembly Profile 2 UML Message Assembly Model Msg Assembly Profile 1 UML Message Assembly Model Msg Assembly Profile N UML Message Assembly Model Message Assembly XLM NDR XSD Implementation Message Model 5/8/2019
UML Information Model For a Generic Domain CCTS BCSS UCM Sub-Context/ Business Sub-Domain 1 UML Contextual Model for a Business Domain 0..N UML Message Sub-Contextual Models Msg Assembly Profile 1 Msg Assembly Profile N Msg Assembly Profile 2 UML Message Assembly Model UML Message Assembly Model UML Message Assembly Model Message Assembly Syntax Binding Profile 1 Syntax Binding Profile 2 Syntax Binding Profile N XLM NDR XSD Implementation Message Model XSD Implementation Message Model XSD Implementation Message Model 5/8/2019
Profile : Definition of some requirements (name and definition): what feature we want to have at XML level for the XML message instance? 2 consequences at UML and XML level: how to express this feature at XML level using XSD rules? How to express this feature at UML level in order to generate automatically those XSD rules from the UML models? Profile : 5/8/2019
UML Business Study example 5/8/2019
UML CIM Information Model 5/8/2019
UML CIM Information Model : Modeling CIM extensions 5/8/2019
UML Extended CIM Information Model 5/8/2019
Building UML Contextual Model 5/8/2019
UML Contextual Model 5/8/2019
UML Contextual Model: restrictions on associations <<ABIE>> <<ACC>> CuS_Organisation Organisation Restrictions on 0..n 1 1 0..n Is based on <<ASBIE>> Cus_ErpPerson <<ASCC>> ErpPerson <<ASCC>> Organisation 0..1 0..1 0..n 0..n <<ABIE>> <<ACC>> Restrictions on CuS_ErpPerson ErpPerson 5/8/2019
UML Contextual Model: Restrictions on a CIM Class 5/8/2019
UML Contextual Model: Restrictions on a CIM Class <<Is based On>> 5/8/2019
Final View on the UML Contextual Model 5/8/2019
UML Message Sub-Contextual Model And now what about Message Assembly ? What about XSD syntax binding ? What are the XSD generation rules from those UML information model ? 5/8/2019
Traceability, reusability and instance interoperability profile 5/8/2019
Requirement : “Traceability” in a machine understandable way do we want that the XSD keeps track of how ABIE were derived from (or based on)? 5/8/2019
Requirement : “Traceability” in a machine understandable way do we want this traceability to be check and validated directly using standard XSD parser? “<xs:restriction base=”Parent Component”>” 5/8/2019
Requirement : “Reusability” Do we want to be able to reuse a work already made from a business process study into another one? do we want to be able to share ABIEs through XSD? Need of good naming conventions for ABIEs, XML NameSpaces Need of a good modularity 5/8/2019
Requirement : “Instance Interoperability” for XML messages this has to deal with the ability to process a component instance, even if the application is not aware of the restrictions that have been applied to the corresponding ‘Aggregate Core Component” 5/8/2019
Generic XSD specifying a Generic CIM XML instance Requirement : “Instance Interoperability” for XML messages Generic XSD specifying a Generic CIM XML instance <Organisation> <name>EDF</name> <organisationCode>abcdefgh</organisationCode> <marketRole>gkfioererfdsflfk</marketRole> <organisationType>gkfioererfdsflfk</ organisationType > <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> 5/8/2019
Generic XSD specifying a Generic CIM XML instance Requirement : “Instance Interoperability” for XML messages Generic XSD specifying a Generic CIM XML instance <Organisation> <name>EDF</name> <organisationCode>abcdefgh</organisationCode> <marketRole>BalanceSupplier </marketRole> <organisationType>gkfioererfdsflfk</ organisationType > <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> 5/8/2019
Generic XSD specifying a Generic CIM XML instance Requirement : “Instance Interoperability” for XML messages Generic XSD specifying a Generic CIM XML instance <Organisation> <name>EDF</name> <organisationCode>123456789</organisationCode> <marketRole>BalanceSupplier </marketRole> <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> 5/8/2019
Restricted XSD specifying a Restricted XML instance Requirement : “Instance Interoperability” for XML messages Restricted XSD specifying a Restricted XML instance Generic XSD specifying a Generic CIM XML instance <Organisation> <name>EDF</name> <organisationCode>123456789</organisationCode> <marketRole>BalanceSupplier Or Consumer</marketRole> <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> 5/8/2019
Restrictions definitions Requirement : “Instance Interoperability” for XML messages Restrictions definitions UML Message Sub-Contextual Model 5/8/2019
Restrictions definitions Requirement : “Instance Interoperability” for XML messages Restrictions definitions UML Message Assembly Model UML Message Sub-Contextual Model 5/8/2019
UML Message AssemblyModel Requirement : “Instance Interoperability” for XML messages +AS_CuS_ErpPerson UML Message AssemblyModel <Organisation> <name>EDF</name> <organisationCode>123456789</organisationCode> <marketRole>BalanceSupplier Or Consumer</marketRole> <AS_CuS_ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </AS_CuS_ErpPerson> </Organisation> 5/8/2019
UML Message AssemblyModel Requirement : “Instance Interoperability” for XML messages UML Message AssemblyModel <Organisation> <name>EDF</name> <organisationCode>123456789</organisationCode> <marketRole>BalanceSupplier Or Consumer</marketRole> <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> 5/8/2019
Requirement : “Instance Interoperability” for XML messages Restricted XSD generation Generic XSD generation Restricted Instance still valid against a Generic XSD <Organisation> <name>EDF</name> <organisationCode>abcdefgh</organisationCode> <marketRole>gkfioererfdsflfk</marketRole> <organisationType>gkfioererfdsfl</ organisationType > <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> Generic XML instance <Organisation> <name>EDF</name> <organisationCode>45621</organisationCode> <marketRole>BalanceSupplier</marketRole> <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> </ErpPerson> </Organisation> Restricted XML instance 5/8/2019
Traceability, reusability and Instance interoperability XSD Rules Generation to achieve Traceability, reusability and Instance interoperability 5/8/2019
UN/Cefact general XSD Rules 5/8/2019
XSD Modularity Reusability UML World XSD Implementation Model ModelExtensions.xsd InformationModel.xsd XSD Import UML Information Model level Sub-Context 0..N ContextualDataTypes.xsd ContextualComponents.xsd UML Contextual Model level UML Message Assembly Model level RealMessage.xsd 5/8/2019
XSD Implementation Model Valid Against <Organisation> <name>EDF</name> <organisationCode>456218ffd6s5</organisationCode> <marketRole>BalanceSupplier</marketRole> <ErpPerson> <lastName> Dupont</lastName> <firstName>Pierre</firstName> <Organisation.ErpPersonRole> <roleType>contact</roleType> </Organisation.ErpPersonRole> <ErpTelephoneNumber> <countryCode>33</countryCode> <localNumber>0000000000</localNumber> </ErpTelephoneNumber> <ErpCivility> <civility>Mr</civility> </ErpCivility> <ErpAddress> <streetNumber>33</streetNumber> <streetName>av des puits</streetName> <city>Paris</city> <country>France</country> <postalCode>75000</postalCode> </ErpAddress> </ErpPerson> </Organisation> 5/8/2019
Other kind of requirements We could imagine many more requirements for XML instances : the less large as possible, compact XML instances message assembly grouping compliance with a specific technical framework …………Etc……. 5/8/2019
Conclusion Whatever your XML needs are, you need to define them in a Message Assembly/Syntax Binding Profile we need first to agree on a general M2AP We need to define some key requirements for XML instances In order to achieve each requirement, Define UML profile, XSD rules and XSD rules generation from UML Models And REMEMBER, XSD rules Complexity DOES NOT mean XML large, complex instances for messages. we just showed the opposite!!!!!!!!!!!!!! 5/8/2019