The data exchange feature of 1C:Enterprise is used to exchange data stored in the database with other software systems.
These can be other 1C:Enterprise infobases (and the configurations of participating infobases do not have to be identical), as well as non-1C:Enterprise systems.
Such a flexibility in data exchange is possible because data exchange tools available in 1C:Enterprise can be used in various combinations. Besides, data exchange format is based on the XML language, which is a generally accepted method of data presentation.
The data exchange features include:
- Exchange plans
- XML serialization
- Tools for reading and writing XML documents
Generally speaking, the interaction between these three components can be visualized as shown in fig. 24.1.
Fig. 24.1. Interaction between data exchange features
Using exchange plans, you can get information regarding which data items have been changed and which data exchange node they need to be sent to.
This is possible because exchange plans include a tool that records changes. Data changes are transferred using messages, and exchange plans also support this messaging infrastructure.
XML serialization enables conversion of a 1C:Enterprise object into an XML-formatted data sequence. XML serialization also provides the backward conversion of an XML-formatted data sequence into a 1C:Enterprise object, provided that a matching 1C:Enterprise data type is available.
Reading or writing XML documents is performed using the XML read/write functions of 1C:Enterprise script.
When implementing a data exchange algorithm, a developer can use these features either all together or in various combinations. In each specific case a developer decides which features they want to use.
In the example provided in this book you will use all the three features. So before you proceed to writing the script, let us take a closer look at each of them.