X4 Produktdokumentation

Defining the Technical Process: Buffer

In this step, you create a so-called buffer, a new XML file that temporarily stores the result of the conversion of the CSV file.

Buffers can be used in any process to cache temporary data for further processing. For the example process described here, you need the buffer to transform the XML structure generated from the CSV file so that it corresponds to the desired data structure in the Web App.

◀️

Creating a temporary XML file

  1. Right-click the Services > TemporaryFiles folder in the Projects view.

  2. Click New > XML Document….
    The File Creation Wizard dialog opens.

  3. If necessary, you can customize the name of the XML document in the File name field, e.g. Buffer.xml.

  4. Click Finish.
    ✅ The document is created in the TemporaryFiles folder and opens automatically in the editor.

  5. Return to the ProcessWebApp.wrf Technical Process.

Inserting the buffer

  1. Drag the image-20241029-095445.png XML element from the Palette view next to the image-20241029-092602.png CSV_Converter element in the editor.

  2. Select the Write value in the Operation field in the Properties of the element to save an XML document containing the data from the previous process step.

  3. Click the image-20241014-130844.png button in the Document field in the Properties view.
    The Choose XML Input dialog opens.

  4. Select the previously created XML file Buffer.xml.

  5. Click OK.

  6. Click on the lower right image-20241015-085229.png corner of the image-20241029-092602.png CSV_Cvertern element, hold down the mouse button, and drag a connection to the image-20241029-095407.png Buffer element.

    image-20241029-095519.png

Filling the Buffer.xml

In order to continue working with the Buffer.xml file in the process, you must debug the process once and thus transport the data from the imported CSV to the created XML file. To debug, temporarily insert a Stop into the process.

  1. Drag the image-20241029-122612.png Stop element from the Palette view next to the image-20241029-095407.png Buffer element in the editor.

  2. Click on the lower right image-20241015-085229.png corner of the image-20241029-095407.png Buffer element, hold down the mouse button, and drag a connection to the image-20241029-122612.png Stop element.

  3. Click the image-20241029-123036.png Start element in the editor.

  4. Click the image-20241029-123115.png Start Debugging button in the toolbar.

  5. Click the image-20241029-123223.png Step Into button in the toolbar until you have completed all steps of the process.
    ✅ The Buffer.xml file is populated with the data from the imported customers.csv file.

  6. Remove the image-20241029-122612.png Stop element from the process by pointing the mouse to the element and clicking the image-20241029-123625.png button.

▶️