If you would like to upgrade to a newer long-term support version of Studio Pro, see Moving from Mendix Studio Pro 8 to 9.

Export With Mapping

Last modified: August 20, 2024

Introduction

The Export with mapping activity allows you to export the data stored in domain model entities into an XML document, JSON document, or string variable.

Properties

An example of export with mapping properties is represented in the image below:

export with mapping properties

There are two sets of properties for this activity, those in the dialog box on the left, and those in the properties pane on the right.

The export with mapping properties pane consists of the following sections:

Action Section

The Action section of the properties pane shows the action associated with this activity.

You can open a dialog box to configure this action by clicking the ellipsis () next to the action.

You can also open the dialog box by double-clicking the activity in the microflow or right-clicking the activity and selecting Properties.

Export Mapping

The Export Mapping action defines in which way the data in the domain model corresponds with the XML schema or JSON structure.

Parameter Type

If the export mapping requires an input, this field shows the type of the input.

Parameter

If the export mapping requires an input, you can select a parameter of the correct type.

Content Type

If the export mapping is based on a message definition, it can export both XML and JSON. Choose which type of output you want.

Validate Against Schema

This determines whether the export action should validate the outgoing XML against the schema (XSD).

Setting this to yes can ipmact performance!

Default: No

Optional and Nillable

Elements in a schema can be optional (minOccurs=0) and/or nillable. When an empty value for an element is encountered, the server will check the schema to decide whether to exclude the element (optional) or send the element with a nil attribute (nillable). In case an empty value is encountered but the element is not optional or nillable, the server will throw an exception, which you need to handle yourself in the microflow. This will occur regardless of the XML validation settings. It is recommended to make sure the data that is being exported is valid according to the schema.

Store In

You can choose whether to store the result of an Export Mapping activity in an object which is a ‘System.FileDocument’ or a specialization of that entity or in a string variable.

Name

The name of the object or string which is the result of the activity.

Common Section

For more information on properties in this section, see Common Properties.