Total Pageviews

Sunday, June 26, 2016

What is canonical Schema?Why Canonical Schema required?

CANONICAL SCHEMA

What is canonical Schema?
Sometime situation comes where a developer need to create an internal schema to provide lose coupling, to increase performance factor.  Such internal schema which is created at BizTalk level (e.g. none of the receiver or sender uses this schema, it is for purely internal purpose of BizTalk) is called canonical schema.

Why Canonical Schema required?
In order to provide lose coupling between different orchestrations, to increase performance, to get less rework if input schema format changes, Canonical Schema is required.

Let us say we are receiving purchase order from a trading partner and this purchase order (input message) has to be sent to 3 different partners after applying some business logic in transforms (map). So we have to create 3 maps one for each partners. In this case source and destination system is tightly coupled. At later point of time suppose some fields in input message gets changed, so we need to change all 3 maps which leads more rework.

Now if we create an internal schema (canonical schema) and map the input message to this canonical schema. This canonical schema can be published to message box and from there other artifacts can subscribe it. There we can create maps from 3 different partners. Doing so we achieved the lose coupling.e.g. Source and destination systems are not tightly coupled. At later point of time if suppose some fields in input message is changed then we need to do changes in only one map. I.e. from input message to canonical which leads less rework. Having less rework and lose coupling the performance is also gets increased. Thus canonical schemas are helpful and if possible we should try to develop the solution creating the canonical schema.


No comments:

Post a Comment