I love the pattern of creating canonical schema since, you will have a single entity through out the Enterprise
Example, An Order, You will be having a single XML schema defined, which talks every thing about order w.r.t to the company. Billing System in the organisation is interested in knowing the customer information, financial information from order to execute its business process. Inventory system is interested in the know the item information and number of items from order, to check for availability and so on. All these details can be get from a single Order canonical schema
Designing the Canonical schema Since BizTalk and other EAI tools work well with XML. The schema is an XML schema. it contains a two parts Header and Body.
The Header will have all the information about the business document (eg order). We at EMI, call this as enterprise header.
- Subject - Represent the action of the document or the represent the business document (Example Create.Order, Update.Order or Highvalue.Order
- Version - Document version keeps changing when you add/modify/delete element or attribute in the XML Schema
- Source system - Which system provides data for the canonic0
- Unique ID - To identify the Message
- Batch - you can add the batch information, if you are handling messages in batching
Well, What more, Add as much as information that might be interested w.r.t to your organisation. for example unique document number base on the source system. The Enterprise header should be same through out all your canonical schema. There will be one Enterprise Header through out the organisation
The Body part will contain the common business document (Say Order). Some Companies have a seperate department/team, which control what they look like. if you are lucky to have this department already in place, then your canonical schema body part is ready. or else you should define itSome good ways to identify the what should go into canoncal schema. Identify the information for you schema from source systems(Note : you may have more than one system provide the same business document). and cosolidate the structure. Easier one is the Master data. Identify the Master Data Management system in your enterprise. you can quickly create lot of canonical schema (Ex customer, employee, product etc)Follow International Standards, you can refer EDI Standards to create your body of your canonic. (Give meaning full name in your canonics)
Always populate the header only in the Middleware and remove the header before sending to target system. Since most of the target system expects their own format
So whats the Advantage
01. Transformation is Simple.
02. Help Developers the Business entities easily
03. Adding new subscriber will take lesser time to commission
04. Meaning full names in the Schema helps to align IT with the Business
Good article da
ReplyDelete