Processing Universal Data Interchange in XML format (processing Universal Data Exchangexml)

Processing "Universal data exchange in XML format" is intended for loading and unloading data into a file from any configuration implemented on the 1C:Enterprise 8 platform.

Operating mode
When using controlled form processing has two operating modes:
1. On the client. When using this mode, the rules and download data files are transferred from the client to the server, and the download data file is transferred from the server to the client. The paths to these files located on the client must be specified in the dialog box immediately before performing the action.
2. On the server. In this mode, files are not transferred to the client and the paths to them must be specified on the server.
Note: The external processing file and exchange protocol files must always be located on the server, regardless of the operating mode.

Download Universal Data Interchange in XML format- Only registered users can download files!


Processing has four tabs

Uploading data
To upload data, you must specify the name of the file into which the data will be uploaded and select the exchange rules file. Exchange rules for any configuration can be configured in the specialized configuration "Data Conversion, Edition 2".

To upload documents and records from independent periodic information registers, you must specify the period - “Start Date” and “End Date”. The resulting file with the downloaded data can be compressed.

On the "Rules for uploading data" tab, you can select the types of objects that should be uploaded, set up selections for selecting objects, or specify the data exchange node for which you want to upload data.

On the "Upload Options" tab, you can specify additional parameters for data upload.

On the "Comment" tab, you can write arbitrary comment text to be included in the exchange file.

It is possible to configure the loading of data into transactions. To do this, you need to select the "Use transactions" checkbox and specify the number of elements in one transaction when loading.

“Load data in exchange mode (Data Exchange.Load = True)” – if the flag is set, then loading of objects will be performed with the loading flag set. This means that when objects are written to the database, all platform and application checks will be disabled. The exception is for documents that are recorded in the posting or cancellation mode. Posting and canceling the posting of a document is always performed without setting the loading mode, i.e. checks will be performed.

Additional settings
The tab is used for detailed configuration of data upload and download.

"Debug mode" – flag for setting the exchange debugging mode. If this flag is set, the data exchange process will not be stopped if any error occurs. The exchange will be completed and debug messages will be output to the exchange log file. This mode is recommended to be used when debugging exchange rules.

“Output information messages in the message window” – if the flag is set, then the protocol of the data exchange process will be displayed in the message window.

“Number of processed objects for status update” – the parameter is used to determine the number of processed elements before changing the loading/unloading status line

“Data upload settings” – allow you to determine the number of elements processed in one transaction when uploading data, upload and process only those objects for which you have access rights, configure the type of registration change for uploaded objects through exchange plans.

“Use an optimized format for data exchange (V8 - V8, processing version no lower than 2.0.18)” – the optimized exchange message format assumes the presence of an “InformationOnDataTypes” node in the message header, into which information about data types is uploaded. This allows you to speed up the data loading process.

“Use transactions when unloading for exchange plans” – the flag determines the mode of using transactions when unloading data when fetching changes on exchange plan nodes. If the flag is set, then data upload will be performed in a transaction.

"Number of items per transaction" - defines the maximum number of data items that are placed in a message within a single database transaction. If the parameter value is 0 (the default value), then all data is placed within one transaction. This mode is recommended because it guarantees the consistency of the data included in the message. But when creating a message in multi-user mode, there may be lock conflicts between the transaction that is putting the data into the message and transactions performed by other users. To reduce the likelihood of such conflicts, you can set this parameter to a value other than the default. The lower the parameter value, the lower the likelihood of a lock conflict, but the higher the likelihood of inconsistent data being included in the message.

“Unload objects for which you have access rights” – if the flag is set, then a selection of objects information base will be executed taking into account the access rights of the current user of the program. This involves using the literal "ALLOWED" in the query body to retrieve the data.

“Automatically remove invalid characters from strings for writing in XML” – if the flag is set, then when writing data to an exchange message, invalid characters will be removed. Characters are checked against the XML 1.0 recommendation.

“Registration changes for exchange nodes after uploading” – the field determines the mode of operation with registration of data changes after completion of data upload. Possible values:

Do not delete registration – after downloading the data, registration of changes on the node will not be deleted.
Completely delete registration for the exchange node - after uploading the data, registration of changes on the node will be completely deleted.
Remove registration only for uploaded metadata - after uploading the data, registration of changes on the node will be deleted only for metadata objects that were specified for upload.

“Exchange protocol” – allows you to configure the output of information messages to the message window, maintaining and recording in separate file exchange protocol.

“File name, exchange protocol” – file name for outputting the protocol of the data exchange process.

“Download protocol (for COM connection)” – file name for outputting a protocol of the data exchange process in the receiving base when exchanging via a COM connection. Important: the path to the file must be accessible from the computer on which the receiving base is installed.

“Append data to the exchange protocol” – if the flag is set, then the contents of the exchange protocol file are saved if the protocol file already exists.

“Output informational messages to the protocol” – if the flag is set, then informational messages will be output to the exchange protocol, in addition to messages about exchange errors.

“Open exchange protocol files after performing operations” – if the flag is set, then after data exchange the exchange protocol files will be automatically opened for viewing.

Deleting data
The bookmark is needed only for developers of exchange rules. Allows you to delete arbitrary objects from the infobase.

Debugging data upload and download
Processing allows you to debug event handlers and generate a debug module from a rules file or data file.

Enabling the debug mode for upload handlers is done on the "Data Upload" tab by checking the "Debug mode for upload handlers" checkbox. Accordingly, on the “Data Loading” tab, the loading debugging mode is enabled by checking the “Load handlers debugging mode” checkbox.

After setting the debugging mode for handlers, the debugging settings button will become available. Clicking this button will open a settings window.

Setting up debugging handlers is performed in four steps:

Step 1: Selecting the algorithm debugging mode

At the first step, you need to decide on the algorithm debugging mode:

No algorithm debugging
Call algorithms as procedures
Substitute algorithm code at the place of call

The first mode is convenient to use when we know for sure that the error in the handler is not related to the code of any algorithm. In this mode, the algorithm code is not uploaded to the debugging module. Algorithms are executed in the context of the "Run()" operator and their code is not available for debugging.

The second mode must be used in cases where the error is in the algorithm code. When this mode is set, algorithms will be unloaded as separate procedures. At the moment the algorithm is called from any handler, the corresponding processing procedure is called. This mode is convenient to use when the global variable "Parameters" is used to pass parameters to algorithms. The limitations of using this mode are that when debugging the algorithm, the local variables of the handler from which it is called are not available.

The third debugging mode is used, as in the second case, when debugging algorithm code and in cases in which the second debugging mode is not suitable. When this mode is set, the algorithms will be unloaded as integrated code in handlers. Those. instead of the algorithm call operator, insert full code algorithm taking into account nested algorithms. In this mode there are no restrictions on the use of local handler variables, but there is a restriction when debugging algorithms with a recursive call.

Step 2: Formation of the debugging module

In the second step, you need to unload the handlers by clicking on the “Create unloading (loading) debugging module” button. The generated handlers and algorithms will be displayed in a separate window for viewing. The contents of the debugging module must be copied to the clipboard by clicking on the "Copy to clipboard" button.

Step 3: Create External Processing

At this step, you need to launch the configurator and create a new external processing. You must paste the contents of the clipboard into the processing module (debugging module) and save the processing under any name.

Step 4: Connecting External Processing

At the fourth and final step, you must specify the name of the external processing file in the input field. In this case, the program checks the time of creation (update) of the processing file. If the processing has an earlier version than the version of the debugging module file, a warning will be displayed and the configuration form will not be closed.

Note: The ability to debug the global conversion handler "After loading exchange rules" is not supported.

Processing Universal Data Interchange in XML format (processing Universal Data Exchangexml)

Processing "Universal data exchange in XML format" is intended for loading and unloading data into a file from any configuration implemented on the 1C:Enterprise 8 platform.

Operating mode
When using a managed form, processing has two modes of operation:
1. On the client. When using this mode, the rules and download data files are transferred from the client to the server, and the download data file is transferred from the server to the client. The paths to these files located on the client must be specified in the dialog box immediately before performing the action.
2. On the server. In this mode, files are not transferred to the client and the paths to them must be specified on the server.
Note: The external processing file and exchange protocol files must always be located on the server, regardless of the operating mode.

Download Universal Data Interchange in XML format - Only registered users can download files!


Processing has four tabs

Uploading data
To upload data, you must specify the name of the file into which the data will be uploaded and select the exchange rules file. Exchange rules for any configuration can be configured in the specialized configuration "Data Conversion, Edition 2".

To upload documents and records from independent periodic information registers, you must specify the period - “Start Date” and “End Date”. The resulting file with the downloaded data can be compressed.

On the "Rules for uploading data" tab, you can select the types of objects that should be uploaded, set up selections for selecting objects, or specify the data exchange node for which you want to upload data.

On the "Upload Options" tab, you can specify additional parameters for data upload.

On the "Comment" tab, you can write arbitrary comment text to be included in the exchange file.

It is possible to configure the loading of data into transactions. To do this, you need to select the "Use transactions" checkbox and specify the number of elements in one transaction when loading.

“Load data in exchange mode (Data Exchange.Load = True)” – if the flag is set, then loading of objects will be performed with the loading flag set. This means that when objects are written to the database, all platform and application checks will be disabled. The exception is for documents that are recorded in the posting or cancellation mode. Posting and canceling the posting of a document is always performed without setting the loading mode, i.e. checks will be performed.

Additional settings
The tab is used for detailed configuration of data upload and download.

"Debug mode" – flag for setting the exchange debugging mode. If this flag is set, the data exchange process will not be stopped if any error occurs. The exchange will be completed and debug messages will be output to the exchange log file. This mode is recommended to be used when debugging exchange rules.

“Output information messages in the message window” – if the flag is set, then the protocol of the data exchange process will be displayed in the message window.

“Number of processed objects for status update” – the parameter is used to determine the number of processed elements before changing the loading/unloading status line

“Data upload settings” – allow you to determine the number of elements processed in one transaction when uploading data, upload and process only those objects for which you have access rights, configure the type of registration change for uploaded objects through exchange plans.

“Use an optimized format for data exchange (V8 - V8, processing version no lower than 2.0.18)” – the optimized exchange message format assumes the presence of an “InformationOnDataTypes” node in the message header, into which information about data types is uploaded. This allows you to speed up the data loading process.

“Use transactions when unloading for exchange plans” – the flag determines the mode of using transactions when unloading data when fetching changes on exchange plan nodes. If the flag is set, then data upload will be performed in a transaction.

"Number of items per transaction" - defines the maximum number of data items that are placed in a message within a single database transaction. If the parameter value is 0 (the default value), then all data is placed within one transaction. This mode is recommended because it guarantees the consistency of the data included in the message. But when creating a message in multi-user mode, there may be lock conflicts between the transaction that is putting the data into the message and transactions performed by other users. To reduce the likelihood of such conflicts, you can set this parameter to a value other than the default. The lower the parameter value, the lower the likelihood of a lock conflict, but the higher the likelihood of inconsistent data being included in the message.

“Unload objects for which there are access rights” – if the flag is set, then the selection of infobase objects will be performed taking into account the access rights of the current user of the program. This involves using the literal "ALLOWED" in the query body to retrieve the data.

“Automatically remove invalid characters from strings for writing in XML” – if the flag is set, then when writing data to an exchange message, invalid characters will be removed. Characters are checked against the XML 1.0 recommendation.

“Registration changes for exchange nodes after uploading” – the field determines the mode of operation with registration of data changes after completion of data upload. Possible values:

Do not delete registration – after downloading the data, registration of changes on the node will not be deleted.
Completely delete registration for the exchange node - after uploading the data, registration of changes on the node will be completely deleted.
Remove registration only for uploaded metadata - after uploading the data, registration of changes on the node will be deleted only for metadata objects that were specified for upload.

“Exchange protocol” – allows you to configure the display of information messages in the message window, maintenance and recording of the exchange protocol in a separate file.

“File name, exchange protocol” – file name for outputting the protocol of the data exchange process.

“Download protocol (for COM connection)” – file name for outputting a protocol of the data exchange process in the receiving base when exchanging via a COM connection. Important: the path to the file must be accessible from the computer on which the receiving base is installed.

“Append data to the exchange protocol” – if the flag is set, then the contents of the exchange protocol file are saved if the protocol file already exists.

“Output informational messages to the protocol” – if the flag is set, then informational messages will be output to the exchange protocol, in addition to messages about exchange errors.

“Open exchange protocol files after performing operations” – if the flag is set, then after data exchange the exchange protocol files will be automatically opened for viewing.

Deleting data
The bookmark is needed only for developers of exchange rules. Allows you to delete arbitrary objects from the infobase.

Debugging data upload and download
Processing allows you to debug event handlers and generate a debug module from a rules file or data file.

Enabling the debug mode for upload handlers is done on the "Data Upload" tab by checking the "Debug mode for upload handlers" checkbox. Accordingly, on the “Data Loading” tab, the loading debugging mode is enabled by checking the “Load handlers debugging mode” checkbox.

After setting the debugging mode for handlers, the debugging settings button will become available. Clicking this button will open a settings window.

Setting up debugging handlers is performed in four steps:

Step 1: Selecting the algorithm debugging mode

At the first step, you need to decide on the algorithm debugging mode:

No algorithm debugging
Call algorithms as procedures
Substitute algorithm code at the place of call

The first mode is convenient to use when we know for sure that the error in the handler is not related to the code of any algorithm. In this mode, the algorithm code is not uploaded to the debugging module. Algorithms are executed in the context of the "Run()" operator and their code is not available for debugging.

The second mode must be used in cases where the error is in the algorithm code. When this mode is set, algorithms will be unloaded as separate procedures. At the moment the algorithm is called from any handler, the corresponding processing procedure is called. This mode is convenient to use when the global variable "Parameters" is used to pass parameters to algorithms. The limitations of using this mode are that when debugging the algorithm, the local variables of the handler from which it is called are not available.

The third debugging mode is used, as in the second case, when debugging algorithm code and in cases in which the second debugging mode is not suitable. When this mode is set, the algorithms will be unloaded as integrated code in handlers. Those. Instead of the algorithm call operator, the full code of the algorithm is inserted, taking into account nested algorithms. In this mode there are no restrictions on the use of local handler variables, but there is a restriction when debugging algorithms with a recursive call.

Step 2: Formation of the debugging module

In the second step, you need to unload the handlers by clicking on the “Create unloading (loading) debugging module” button. The generated handlers and algorithms will be displayed in a separate window for viewing. The contents of the debugging module must be copied to the clipboard by clicking on the "Copy to clipboard" button.

Step 3: Create External Processing

At this step, you need to launch the configurator and create a new external processing. You must paste the contents of the clipboard into the processing module (debugging module) and save the processing under any name.

Step 4: Connecting External Processing

At the fourth and final step, you must specify the name of the external processing file in the input field. In this case, the program checks the time of creation (update) of the processing file. If the processing has an earlier version than the version of the debugging module file, a warning will be displayed and the configuration form will not be closed.

Note: The ability to debug the global conversion handler "After loading exchange rules" is not supported.


Processing "Universal data exchange in XML format" is intended for loading and unloading data into a file from any configuration implemented on the 1C:Enterprise 8 platform


Processing has four tabs

Uploading data

To upload data, you must specify the name of the file into which the data will be uploaded and select the exchange rules file. Exchange rules for any configuration can be configured in the specialized configuration "Data Conversion, Edition 2".


To upload documents and records from independent periodic information registers, you must specify the period - “Start Date” and “End Date”. The resulting file with the downloaded data can be compressed.


On the "Rules for uploading data" tab, you can select the types of objects that should be uploaded, set up selections for selecting objects, or specify the data exchange node for which you want to upload data.


On the "Upload Options" tab, you can specify additional parameters for data upload.


On the "Comment" tab, you can write arbitrary comment text to be included in the exchange file.

To download data, you must specify the name of the file from which the data will be downloaded.


It is possible to configure the loading of data into transactions. To do this, you need to select the "Use transactions" checkbox and specify the number of elements in one transaction when loading.

Additional settings

The bookmark is used for fine tuning uploading and downloading data.


"Debug mode" - the checkbox determines the mode of uploading and loading data


"Number of processed objects for status update" - the parameter is used to determine the number of processed elements before changing the loading/unloading status line


"Data upload settings" - allow you to determine the number of elements processed in one transaction when uploading data, upload and process only those objects for which you have access rights, configure the type of registration change for uploaded objects through exchange plans


"Exchange protocol" - allows you to configure the output of information messages in the message window, maintenance and recording of the exchange protocol in a separate file.

Deleting data

The bookmark is needed only for developers of exchange rules. Allows you to delete arbitrary objects from the infobase.

Debugging data upload and download

Processing allows you to debug event handlers and generate a debug module from a rules file or data file.


Enabling the debug mode for upload handlers is done on the "Data Upload" tab by checking the "Debug mode for upload handlers" checkbox. Accordingly, on the “Data Loading” tab, the loading debugging mode is enabled by checking the “Load handlers debugging mode” checkbox.


After setting the debugging mode for handlers, the debugging settings button will become available. Clicking this button will open a settings window.


Setting up debugging handlers is performed in four steps:

Step 1: Selecting the algorithm debugging mode

At the first step, you need to decide on the algorithm debugging mode:



    Without debugging algorithms


    Call algorithms as procedures


    Substitute algorithm code at the place of call

The first mode is convenient to use when we know for sure that the error in the handler is not related to the code of any algorithm. In this mode, the algorithm code is not uploaded to the debugging module. Algorithms are executed in the context of the "Run()" operator and their code is not available for debugging.


The second mode must be used in cases where the error is in the algorithm code. When this mode is set, algorithms will be unloaded as separate procedures. At the moment the algorithm is called from any handler, the corresponding processing procedure is called. This mode is convenient to use when the global variable "Parameters" is used to pass parameters to algorithms. The limitations of using this mode are that when debugging the algorithm, the local variables of the handler from which it is called are not available.


The third debugging mode is used, as in the second case, when debugging algorithm code and in cases in which the second debugging mode is not suitable. When this mode is set, the algorithms will be unloaded as integrated code in handlers. Those. Instead of the algorithm call operator, the full code of the algorithm is inserted, taking into account nested algorithms. In this mode there are no restrictions on the use of local handler variables, but there is a restriction when debugging algorithms with a recursive call.

Step 2: Formation of the debugging module

In the second step, you need to unload the handlers by clicking on the “Create unloading (loading) debugging module” button. The generated handlers and algorithms will be displayed in a separate window for viewing. The contents of the debugging module must be copied to the clipboard by clicking on the "Copy to clipboard" button.

Step 3: Create External Processing

At this step, you need to launch the configurator and create a new external processing. You must paste the contents of the clipboard into the processing module (debugging module) and save the processing under any name.

Step 4: Connecting External Processing

At the fourth and final step, you must specify the name of the external processing file in the input field. In this case, the program checks the time of creation (update) of the processing file. If the processing has an earlier version than the version of the debugging module file, a warning will be displayed and the configuration form will not be closed.


Note: The ability to debug the global conversion handler "After loading exchange rules" is not supported.

Quite often in the work of large enterprises and retail chains there is a need to exchange data between databases. Each programmer and administrator solves this issue differently. Some write uploads and downloads through intermediate table files, others use the mode COM connections to connect to the source base. However, recently 1C’s own mechanism called “Universal Data Exchange in XML Format” has become increasingly popular.

Appearance of processing

In the Full interface, you can open processing at Service->Other data exchanges->Universal data exchange in XML format.

The processing form (Fig. 1) contains four tabs:

  • Additional settings;
  • Deleting data.
  • The interface of each of the tabs is heavily loaded with elements and therefore requires separate consideration.

    Uploading data

    At the very top of the tab there is a field for selecting an exchange rules file. For non-standard databases and exchanges, you will have to create the exchange file yourself.

    On the next line of the form there are two radio buttons:

    1. Uploading to an exchange file (Fig. 2);
    2. Connecting and uploading data to information security (Fig. 3).

    As you can see from the pictures above, the appearance of the form differs depending on the switch. If the file sharing option is selected, the user is prompted to select the location of the file where it will be uploaded and the possibility of compressing it to save space and protect it with a password.

    The option of direct connection to the receiving base supports both file and client-server modes of operation. In this case, you will need to enter the database address and fill in the “User” and “Password” fields. Before you start exchanging data, it is advisable to test the connection.

    The tabular part below allows you to configure selections and other unloading parameters.

    To debug algorithms and correct errors, you can use the mechanism built into exchange processing. It is activated by checking the corresponding checkbox at the bottom of the form. Clicking on the “Debugging settings…” button brings up a window (Fig. 4).

    Fig.4

    Distinctive feature of this form is an informative help sheet on the left side of the layout that describes each of the three possible modes debugging Any file in the epf format can serve as an external processing file for the module.

    Clicking on the “Finish” button checks the correctness and completeness of the completed data.

    Unlike “Upload”, this tab (Fig. 5) does not have a tabular part, but there are many more checkboxes that allow you to adjust the parameters for recording new and changed objects.

    Fig.5

    First of all, you need to select a file that will serve as a source of information. This can be done in the “File name to upload” input field. If the data was uploaded to a password-protected archive, it will need to be entered in the appropriate field.

    The corresponding checkboxes allow you to configure:

    • Transaction when writing objects (this sometimes speeds up the process);
    • Loading data in exchange mode (in this case, all platform checks, with the exception of checking when posting documents, will be ignored when recording);
    • Overwriting changed elements;
    • Setting a deletion mark for downloaded items;
    • The mode of writing new data to the register (either one at a time or in a set);
    • Trimming of insignificant characters (spaces and tabs) for string values.

    Additional settings

    As the name of the bookmark implies, it contains tools, the use of which allows you to more accurately customize the exchange process. In particular:

    1. Enables debugging mode;
    2. Allows the use of a transaction during the unloading process;
    3. Optimizes exchange between databases of version 8 of 1C;
    4. Upload only those objects that are allowed for use by the current user;
    5. Enable logging of the exchange process between databases.

    These and some other functions are enabled by checking the appropriate boxes on the form (Fig. 6).

    Fig.6

    Deleting data

    This tab is only used by developers in debug mode. Allows you to remove unnecessary objects from the database.

    Briefly about setting up exchange rules

    Using a standard handler greatly simplifies life for programmers. At the same time, one of the most difficult moments for someone who first encountered “Universal Data Interchange in XML Format” is the question: “Where can I get the exchange rules file?”

    First of all, to independently create exchange rules, you need a special configuration, which is called “Data Conversion”. It contains several interesting files that allow you to configure almost any exchange between various 1C databases 7 and 8 versions:

    1. epf – required for downloading the metadata structure for 1C 8 databases;
    2. epf – if the 1C 8 configuration is self-written or not standard, it may not have the “Universal Data Exchange” processing, this file is this processing;
    3. ert – file contains code for downloading the metadata structure of configurations of 1C versions 7.7;
    4. ert – file for processing data upload and download for the seven.

    Having launched the appropriate processing, it is necessary to unload the metadata structures for the source and destination databases. Then, in the “Conversion” configuration, you need to enter information about the source and destination configurations into the “Configurations” directory.

    Then an element is created in the Conversion directory containing information about the direction of data exchange. You can set up Exchange Rules for it.