Skip to main content
Skip table of contents

Creating, Inserting, and Configuring a Mapping

In this step, you create a so-called mapping or XSL Stylesheet and insert it into your Technical Process in order to further process the data cached using the variable. The created mapping should convert the original invoice format into the required XML format.

After you  have created and inserted the mapping in the form of an XSL stylesheet, you can begin configuring the mapping. Only the information from the invoice documents required for checking and forwarding should be read: the invoice number, the invoice amount, the invoice sender, and the date of the invoice.

To do this, you must first import the sample file SampleInvoice.xml into the system as a resource. You should have already created the file in preparation for the example process. For more information on how to create the example file, see Example: ESB Project.

We also recommend that you include descriptions of your Technical Process that explain each process step. This way, the individual process steps remain transparent and can also be quickly followed up by new colleagues.

Prerequisites:

You have created the example XML file that was to be prepared and saved it locally. For more information, see Example: ESB Project.

Importing the example file as a resource

  1. Right-click the Resources folder in the project structure.

  2. Click Import….
    The Resource Import Wizard dialog opens.

  3. Click on Browse… and select the SampleInvoice.xml file on your computer.
    ✅ The imported file is displayed in the Resources folder in the Projects view.

Creating the mapping

  1. Right-click the Technical Process in the Projects view and select New > XSL Stylesheet….
    The File Creation Wizard dialog opens.

  2. If necessary, you can customize the name of the stylesheet in the File name field.

  3. Click Finish.
    ✅ The stylesheet is created in the ESB Project and opens automatically in the editor. The next step is to further configure the inserted stylesheet.

  4. Return to the Technical Process ImportInvoices.wrf.

Inserting the mapping

  1. Drag the image-20241017-063201.pngMapping element from the Palette view next to the image-20241016-135348.pngPut INPUT element in the editor.

  2. Click the element.

  3. Enter a name in the Label field in the Properties view, e.g. Stylesheet: ExtractCaseFeatures element.

  4. Click the image-20241014-130844.pngbutton in the Document field in the Properties view.
    The Choose Transform Input dialog opens.

  5. Select the previously created XSL file stylesheet.xsl.

  6. Click OK.

  7. Deactivate the Empty Input checkbox in the Properties view.

If this option is active, the mapping does not use the data from the previous process step.

  1. Select the Remove X4 Processing Instructions checkbox in the Properties view.

If this option is active, all X4 Processing Instructions are deleted from the result.

  1. Click on the lower right image-20241017-063436.pngcorner of the image-20241016-135348.pngPut INPUT element, hold down the mouse button, and drag a connection to the image-20241017-063201.pngStylesheet: ExtractCaseFeatures element.

    image-20241111-103318.png

Configuring the mapping

  1. Double-click the image-20241017-063201.pngStylesheet: ExtractCaseFeatureselement in the Technical Process ImportInvoices.wrf.
    The linked Stylesheet.xsl file opens in the editor.

  2. Drag the imported samleInvoice.xml file from the Projects view to the left image-20241017-075310.pngpane of the Stylesheet.xsl file.
    ✅ The XML structure of the file is displayed in the left pane of the Stylesheet.xsl file.

  3. Right-click the template match="/" entry in the right pane of the stylesheet.xsl file and select Element.

  4. Select As Child from the Location drop-down list and specify a name for the element, e.g. Features.

  5. Right-click the Features element in the right pane and select image-20241017-080235.pngElement.

  6. Select As Child from the Location drop-down list and define the name of the element: InvoiceNumber.

  7. Right-click the image-20241017-080235.pngInvoiceNumber element in the right pane and select image-20241017-082526.pngAttributes.

  8. Select As Child from the Location drop-down list and define the name of the attribute: type.

  9. Enter the value String in the Value field.

  10. Right-click the Features element in the right pane and select image-20241017-080235.pngElement.

  11. Select As Child from the Location drop-down list and define the name of the element: InvoiceAmount.

  12. Right-click the image-20241017-080235.pngInvoiceNumber element in the right pane and select image-20241017-082526.pngAttributes.

  13. Select As Child from the Location drop-down list and define the name of the attribute: type.

  14. Enter the value Decimal in the Value field.

  15. Right-click the Features element in the right pane and select image-20241017-080235.pngElement.

  16. Select As Child from the Location drop-down list and define the name of the element: InvoiceSender.

  17. Right-click the image-20241017-080235.pngInvoiceNumber element in the right pane and select image-20241017-082526.pngAttributes.

  18. Select As Child from the Location drop-down list and define the name of the attribute: type.

  19. Enter the value String in the Value field.

  20. Right-click the Features element in the right pane and select image-20241017-080235.pngElement.

  21. Select As Child from the Location drop-down list and define the name of the element: InvoiceDate.

  22. Right-click the image-20241017-080235.pngInvoiceNumber element in the right pane and select image-20241017-082526.pngAttributes.

  23. Select As Child from the Location drop-down list and define the name of the attribute: type.

  24. Enter the value DateTime in the Value field.

    image-20241017-085559.png
  25. Click an element in the XML structure in the left pane, hold down the mouse button, and drag the element to the element on the right you want to map the element to, for example, image-20241017-080235.pngInvoiceNumber (left) drops to image-20241017-080235.pngInvoiceNumber (right).
    ✅ A green connection line graphically indicates the mapping.

  26. Repeat the step until all necessary fields on the left side are mapped to their counterpart in the right area. For this example, these are the InvoiceNumber, InvoiceDate, InvoiceTotal , and Name fields.

    image-20241017-085902.png
  27. Click image-20241009-130249.pngSave.

  28. Return to the Technical Process ImportInvoices.wrf.

Adding a description

  1. Drag the image-20241017-063603.pngTextbox element from the Palette view next to the image-20241017-063201.pngStylesheet: ExtractCaseFeatures element in the editor.

  2. Double-click the image-20241017-063603.pngTextbox element.
    The Text Editor opens.

  3. Enter the desired description text, e.g.: "This stylesheet (= "mapping") transforms the original invoice format into the format needed by the adapter in the following step, and therefore creates an XML with 4 "Feature" elements."

  4. Click OK.

  5. If necessary, adjust the size and position of the text box.

    image-20241111-125641.png
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.