1s universal data exchange. Automatic data exchange using the "Universal Data Exchange in XML" processing, without changing the configuration. General Purpose Procedures and Functions

What is needed for automatic data exchange, without making configuration changes:
1) Processing " Universal exchange data in XML format" , which is included in most standard configurations. If it is not there, then it is easy to find it on the ITS disk or on the Internet. In the configuration it is called "Universal XML Data Exchange"
2) Data exchange rules. Created using "Data Conversion". A job that you will have to master. There are also video courses and teaching aids. For example: http://programmist1s.ru/wp-content/uploads/2013/06/Konvertatsiya_dannyih._Metodika_rabotyi_i_primeryi.pdf
3) External processing, containing loading/unloading procedures. Let's start creating it:
An external processing is created in the object module which will contain the text below (substitute your data for databases and users). It is advisable to create a separate user with full rights to exchange data. Let's call the processing, for example, "Data Exchange.epf".

If LaunchParameter = "Upload" Then Processing=Processing.UniversalXMLDataExchange.Create(); //Set the parameters necessary for uploading (optional for editing) Processing.ExchangeMode="Upload"; If Processing.ConnectionInformationBaseType = False Then Processing.ConnectionInformationBaseServerName="MainServ";

Processing.InformationBaseNameOnServerForConnection="Buhia";//If the data receiver is a file base Otherwise Processing.InformationBasePlatformVersionForConnection="V82";

Processing.InformationBaseDirectoryForConnection="C:\Inbox\OlegA\Clients\Zeus BP20\Zeus BP20";
endIf;
endIf;

//Actions on registration when unloading according to exchange plans Processing.RegistrationDeletionTypeofChangesForExchangeNodesAfterUpload=0;
// 0 - do not deregister, // 1 - deregister Processing.LoadExchangeRules();
//IF YOU NEED TO UPLOAD ACCORDING TO EXCHANGE PLANS, THEN ENABLE THIS BLOCK AND SUBMIT YOUR OWN EXCHANGE PLAN NODE //For Each Page From Processing.UploadRulesTable.Lines Cycle //Page.Enable=1;
// For Each Page1 From PageLine Loop // Line1.Enable=1;
// Page1.LinkToExchangeNode=ExchangePlans.Full.FindByCode("BP20");
g) C:\Inbox\OlegA\Data Exchange.epf - the path to our processing, which will start at startup
h) Upload - we pass the 1C launch parameter, it tells us that we need to upload data

If the database is server-based:
"C:\Program Files (x86)\1cv82\common\1cestart.exe" ENTERPRISE /S"Server1C/DataBase" /N"Data Exchange Robot" /P"pass" /DisableStartupMessages /RunModeManagedApplication /Execute"C:\Inbox\Oleg\ Data Exchange.epf" /C"Upload"
endIf;
a) C:\Program Files (x86)\1cv82\common\1cestart.exe - your path to the 1C starter
b) Server1C/DataBase - your server on which the database is located and the name of the database itself from which we upload data.
The remaining parameters are similar to the file version of the bat file

5) Bat file download (if necessary). If you decide to upload data to a file, and not directly to the database. Then we will also need this item (usually necessary).
Creation bat file upload is similar to the upload file, but only the launch parameter is different, instead of “Upload”, we put “Download”

6) Set a launch schedule our Bat files loading/uploading on the server. To do this, you need to go to the administration of the control panel on the server and in the task scheduler create a new task to run the download file at 23 o'clock every day and a download task specifying the Bat download file (if necessary) at 04 o'clock for example.

Quite often at work large enterprises and retail networks, 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 COM connection mode to connect to the source database. 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 above pictures, it differs depending on the switch. appearance forms. 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.

    Tabular part located 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 filled in 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 called “Data Conversion”. It contains several interesting files, which 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.

    When developing 1C 8 exchange rules, the ability to programmatically redefine the behavior of exchange rules is widely used - the handler mechanism. Event handlers significantly expand functionality and are an indispensable tool for setting up exchange rules in cases where interactive features configuration is not enough.

    Handlers and algorithms are written in the language of the platform in which they will be executed during the exchange.

    If this is a 1C: Enterprise 7.7 platform, then the handler code is integrated into the upload or download processing code. Accordingly, each handler or algorithm is separated into a separate function and is available for debugging during exchange.

    If uploading or downloading occurs on the 1C: Enterprise 8 platform, then the handler code is not integrated into the data exchange processing code, but is uploaded to the exchange rules file. During the data exchange process, the code of handlers or algorithms is taken from the rules file and executed directly in the context of the “Run” statement. To debug the code of handlers and algorithms, you can use the “Universal XML Data Interchange” processing.

    • Video – 21 teaching hours
    • Teaching materials in PDF - 117 A4 pages
    • 16 practical tasks with the teacher's decisions

    Course format, support

    The materials are available immediately after payment for the order - you download them from the site and study them at any convenient time.

    Support is provided through the Master Group on the website.

    Full access to the Master group must be activated no later than 100 days after purchase.

    Relevance of the course

    The course materials are relevant for BSP version 2.3.2.73.

    If you plan to use older versions of the BSP, please note that the operating mechanisms of the BSP “Data Exchange” subsystem have changed, and the interfaces have also changed.

    New course under latest versions The BSP is under development and will be released in a few months. But for versions of BSP 2.3.2.73 and younger, the current rate will be relevant.

    Course fee

    9,700 rubles

    Guarantee

    We have been teaching since 2008, we are confident in the quality of our courses and give our standard 60-day warranty.

    This means that if you started taking our course, but suddenly change your mind (or, say, do not have the opportunity), then you have a 60-day period to make a decision - and if you make a return, we return 100% of the payment.

    Installment payment

    Our courses can be paid for in installments or in installments, including without interest. Wherein You get access to materials immediately.

    This is possible when paying from individuals for an amount from 3,000 rubles. up to 150,000 rub.

    All you need to do is select the payment method “Payment via Yandex.Checkout”. Next on the site payment system select “Pay in installments”, indicate the term and amount of payments, fill out a short form - and in a couple of minutes you will receive a decision.

    Payment options

    We accept all major forms of payment.

    From individuals– payments from cards, payments with electronic money (WebMoney, YandexMoney), payments through Internet banking, payments through communication shops, and so on. It is also possible to pay for the order in installments (in installments), including without additional interest.

    Start placing your order - and in the second step you can choose your preferred payment method.

    From organizations and individual entrepreneurs– cashless payment, delivery documents are provided. You enter an order and you can immediately print an invoice for payment.

    Training of several employees

    Our courses are designed for individual learning. Group training on one set is illegal distribution.

    If a company needs to train several employees, we usually offer “ additional kits”, which cost 40% less.

    To place an order for an “additional kit” select 2 or more course sets in the form, starting from the second set the cost of the course will be 40% cheaper.

    There are three conditions for using additional kits:

    • You cannot purchase only an additional set if at least one regular set was not purchased before (or along with it)
    • There are no other discounts for additional sets (they are already discounted, it would be a “discount on a discount”)
    • promotions are not valid for additional sets (for example, compensation of 7,000 rubles) for the same reason
    
    Top