You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/howto/integration/export-xml-documents.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ This how-to teaches you how to do the following:
18
18
19
19
## 2 Prerequisites
20
20
21
-
Before you can start exporting XML documents, you need data in your application that is used during the export. You first need to set up the data structure and GUI to maintain the customer data. Then you'll create the actual export logic and the corresponding export mapping. So, you need to know how to do the following:
21
+
Before you can start exporting XML documents, you need data in your application that is used during the export. You first need to set up the data structure and GUI to maintain the customer data. Then, you'll create the actual export logic and the corresponding export mapping. To do this, you need to know how to do the following:
22
22
23
23
* Create a domain model (for more information, see [Configuring a Domain Model](/refguide/configuring-a-domain-model/))
24
24
* Create a custom file document (for more information, see [File Manager](/refguide/file-manager/))
@@ -80,7 +80,7 @@ The XML schema describes what the contents of an XML document should be. We need
7. In the mapping editor, verify the following:<br />
94
-
1.**Method** is set to **By association**<br />
95
-
2.**Association to parent** is set to **XMLDocument_Customer**<br />
96
-
8. Select attributes for all five **Attribute to value element mapping** instances (or click **Map attributes by name** to accomplish this). You should have the following mapping:
94
+
***Method** is set to **By association**<br />
95
+
***Association to parent** is set to **XMLDocument_Customer**<br />
96
+
8. Select attributes for all five **Attribute to value element mapping** instances (or click **Map attributes by name**). You should have the following mapping:
14. Create a change item to set the **Name** attribute to:*'customers.xml'* (including the single quotation marks [']). The **Create Object** dialog box should now look like this:
151
+
14. Create a change item to set the **Name** attribute to *'customers.xml'* (including the single quotation marks [']). The **Create Object** dialog box should now look like this:
Mendix apps encourage the application of a services-oriented architecture, with multiple smaller services providing APIs and user interfaces for a specific set of data and logic. Enterprises build up complete solutions by assembling these services.
13
13
14
-
One important aspect of services is that all access to data and logic is handled by the service operations. Direct access to databases used for storing the service data is discouraged, because this would bypass the business rules and security handled by the service. This creates a challenge for generic reporting, data warehousing, and ETL tooling.
14
+
One important aspect of services is that all access to data and logic is handled by the service operations. Direct access to databases used for storing the service data is discouraged because this would bypass the business rules and security handled by the service. This creates a challenge for generic reporting, data warehousing, and ETL tooling.
15
15
16
-
The OData standard is being adopted because it enables generic data access within a services-oriented architecture. [OData](http://www.odata.org) is “an open protocol to allow the creation and consumption of queryable and interoperable Restful APIs in a simple and standard way.". In other words, it enables tools to use any REST/OData service by providing metadata that describes the data being provided, and by standardizing the messages exchanged with the OData services.
16
+
The OData standard is being adopted because it enables generic data access within a services-oriented architecture. [OData](http://www.odata.org) is “an open protocol to allow the creation and consumption of queryable and interoperable RESTful APIs in a simple and standard way.". In other words, it enables tools to use any REST/OData service by providing metadata that describes the data being provided, and by standardizing the messages exchanged with the OData services.
17
17
18
18
A reporting tool like Excel or Tableau can discover what data and functionality is available in an OData service, and provide a generic way for users to build new queries for the data.
19
19
20
-
**This guide will outline how to do the following:**
20
+
This how-to outlines how to do the following:
21
21
22
22
* Create a published OData service with resources
23
23
* Add the OData server to Tableau and Excel
@@ -26,10 +26,10 @@ A reporting tool like Excel or Tableau can discover what data and functionality
26
26
27
27
## 2 Prerequisites
28
28
29
-
Before checking out this guide, make sure you do the following:
29
+
Before reviewing this guide, make sure you do the following:
30
30
31
-
* Create an app that includes data you want to expose. You can either have published OData services already, or follow the steps in the [Creating a Published OData Service](#create-service) section below. For detailed steps to publishing an OData service,see the [Creating an App](/howto/integration/share-data/#createapp) and [Publishing to the Catalog](/howto/integration/share-data/#publishing) sections of *Share Data Between Apps*.
32
-
* Install Excel (we will use Excel for Office 365).
31
+
* Create an app that includes data you want to expose. You can either have published OData services already, or follow the steps in the [Creating a Published OData Service](#create-service) section below. For detailed steps to publishing an OData service,see the [Creating an App](/howto/integration/share-data/#createapp) and [Publishing to the Catalog](/howto/integration/share-data/#publishing) sections of *Share Data Between Apps*.
32
+
* Install Excel (this document uses Excel for Office 365).
33
33
* Download and install the public version of [Tableau](https://public.tableau.com).
34
34
35
35
## 3 Creating a Published OData Service {#create-service}
@@ -42,7 +42,7 @@ A published OData service can be used by third-party applications to read data f
42
42
4. Under **Entities**, click **Add**:
43
43
5. In the **Select Persistable Entity** window, select the entity you want to expose and click **Select**.
44
44
45
-
{{% alert color="info" %}}Security in OData is managed by the **App Security** settings and the entity-level access rules; therefore, if you have already configured access rules in your app, you do not have to configure security separately for OData.{{% /alert %}}
45
+
{{% alert color="info" %}}Security in OData is managed by the **App Security** settings and the entity-level access rules. If you have already configured access rules in your app, you do not have to configure security separately for OData.{{% /alert %}}
46
46
47
47
6. On the **Settings** tab, choose **As an associated id** for **Associations**. Excel can handle the setting **As a link**, but Tableau does not support it.
48
48
7. Start the application.
@@ -53,8 +53,8 @@ The OData service is now ready to be consumed.
53
53
54
54
1. Open Excel.
55
55
2. Open the **DATA** tab and select **Get Data** > **From Other Sources** > **From OData Feed**.
56
-
3.Retun to Studio Pro, and double-click the published OData service. Copy the link in the **Location** field to the clipboard.
57
-
4. Back in Excel, on the **OData Feed** dialog box, enter the copied link for the **URL** and Click**OK**:
56
+
3.Return to Studio Pro and double-click the published OData service. Copy the link in the **Location** field to the clipboard.
57
+
4. Back in Excel, on the **OData Feed** dialog box, enter the copied link for the **URL** and click**OK**.
58
58
5. Select the name of the published entity in the Navigator and click **Load**.
59
59
60
60
The data of the Mendix application is now available in Excel.
@@ -65,14 +65,14 @@ In this section, we will outline the steps for adding more than one published en
65
65
66
66
### 5.1 Use Case
67
67
68
-
Imagine that you have an app that helps with asset management. You have a Published OData Service with persistable entities called **SmartTask** and **Employee** that expose information. The domain model looks like this:
68
+
Imagine you have an app that helps with asset management. You have a Published OData Service with persistable entities called **SmartTask** and **Employee** that expose information. The domain model looks like this:
@@ -81,16 +81,16 @@ To visualize data from your app in Tableau, follow these steps:
81
81
82
82
4. Click **Sign In** to save the server connection. You should now see the data source details.
83
83
5. Click the name of the server connection and change it to a name related to your entity (in this case, **SmartTasks**) for readability.
84
-
6. Click **Data** > **New Data Source** and repeat step 1–5 to add a server connection for other published OData services.
84
+
6. Click **Data** > **New Data Source** and repeat steps 1–5 to add a server connection for other published OData services.
85
85
7. Open **Sheet1**. Under **Data**, click the first entity and drag a desired entity **Attribute** from **Measures** to **Dimensions**. In this case, click **Engineers** and drag **ID** from **Measures** to **Dimensions**:
8. Similarly, click and drag an attribute from the second entity from **Measures** to **Dimensions**. In this case, click **SmartTasks** and drag **SmartTask_Engineer** from **Measures** to **Dimensions**.
90
90
9. Go to **Data** > **Edit Relationships...** to define the relationship between the different data sources.
91
91
10. On the **Relationships** window, do the following:<br />
92
-
1. Select your first entity for the **Primary data source**. In our imagined scenario, that is **SmartTasks**.<br />
93
-
2. Select your second entity for the **Secondary data source**. In our imagined scenario, that is **Engineers**.<br />
92
+
1. Select your first entity for the **Primary data source**. In this scenario, that is **SmartTasks**.<br />
93
+
2. Select your second entity for the **Secondary data source**. In this scenario, that is **Engineers**.<br />
94
94
3. Switch to **Custom** mapping.<br />
95
95
4. Remove any default mappings.<br />
96
96
5. Click **Add...** to configure a field mapping.
@@ -119,13 +119,13 @@ You should now see a bar chart of the data.
119
119
120
120
## 6 Filtering Data With Query Parameters
121
121
122
-
By default, all data is retrieved by Tableau, but Mendix allows you to add filters to the query so only the desired data is being retrieved.
122
+
By default, all data is retrieved by Tableau, but Studio Pro allows you to add filters to the query so only the desired data is being retrieved.
123
123
124
124
To filter data with query parameters, follow these steps:
125
125
126
126
1. Right-click a data source and select **Edit Data Source...**.
127
127
2. Click the OData URL to change the connection settings.
128
-
3. Add *?$top=2* to the server URL (in order to only retrieve the first two values, engineers in this case) and click **Sign In**:
128
+
3. Add `?$top=2` to the server URL (in order to only retrieve the first two values) and click **Sign In**:
Mendix is the app platform for the enterprise organization, and in enterprise software, you likely do not work in a [green field](https://en.wikipedia.org/wiki/Greenfield_project). In almost every situation, you will need to integrate with existing systems. Mendix supports many ways of integration, but this how-to focuses on how you can import XML documents with Mendix.
12
+
Mendix is the app platform for the enterprise organization, and in enterprise software, you likely do not work in a [greenfield](https://en.wikipedia.org/wiki/Greenfield_project). In almost every situation, you will need to integrate with existing systems. Mendix supports many ways of integration, but this how-to focuses on how you can import XML documents with Mendix.
13
13
14
14
This how-to teaches you how to do the following:
15
15
@@ -28,7 +28,7 @@ Before you continue, make sure that you know how to create:
28
28
29
29
## 3 Preparing the Data Structure and GUI
30
30
31
-
The XML document used in this how-to contains customers. To be able to see the imported data, you first need to set up the data structure and GUI to maintain the customer data. Then, you need to facilitate the uploading and downloading of XML documents. Finally, you will create the actual import logic and the corresponding import mapping.
31
+
The XML document used in this how-to contains customers. To see the imported data, you first need to set up the data structure and GUI to maintain the customer data. Then, you need to facilitate the uploading and downloading of XML documents. Finally, you will create the actual import logic and the corresponding import mapping.
32
32
33
33
To prepare the data structure and the GUI, follow these steps:
34
34
@@ -38,21 +38,21 @@ To prepare the data structure and the GUI, follow these steps:
38
38
39
39
2. Create the overview and detail pages to manage objects of the **Customer** type.
40
40
3. Create a menu item to access the customer overview page.
41
-
4. Create an entity called **XMLDocument** that inherits all the properties from **System.FileDocument**:
41
+
4. Create an entity called *XMLDocument* that inherits all the properties from **System.FileDocument**:
5. Create the overview and detail pages to manage objects of the **XMLDocument** type.
46
-
6. Create a menu item to access the XML document overview page (for more information, see [Setting Up Navigation](/refguide/setting-up-the-navigation-structure/).
46
+
6. Create a menu item to access the XML document overview page (for more information, see [Setting Up Navigation](/refguide/setting-up-the-navigation-structure/)).
47
47
48
48
## 4 Adding an XML Schema (XSD)
49
49
50
-
Whether you plan to import or export documents, working with XML means that your application must contain an XML schema, which is also called an XSD. An XSD describes the possible contents of an XML file. Based on the XSD, your application knows how to read or write an XML file. If you don't have an XSD file, there are some online XSD generators that accept an XML document as input. For this how-to, you can use [Customers.xsd](/attachments/howto/integration/importing-xml-documents/18581652.xsd).
50
+
Whether you plan to import or export documents, working with XML means your application must contain an XML schema, which is also called an XSD. An XSD describes the possible contents of an XML file. Based on the XSD, your application knows how to read or write an XML file. If you don't have an XSD file, there are some online XSD generators that accept an XML document as input. For this how-to, you can use [Customers.xsd](/attachments/howto/integration/importing-xml-documents/18581652.xsd).
51
51
52
52
To add an XML schema (XSD), follow these steps:
53
53
54
54
1. Right-click a module in the **App Explorer** and select **Add Other** > **XML schema** from the menu.
55
-
2. Enter **CustomersXSD** as the **Name** and click **OK**:
55
+
2. Enter *CustomersXSD* as the **Name** and click **OK**:
@@ -117,7 +117,7 @@ To create the import logic, follow these steps:
117
117
118
118
3. Double-click the new button to open the **Edit Action Button** editor and do the following:<br />
119
119
1. Change the caption to *Import XML Document*<br />
120
-
2. For the **On click** event, select **Call a microflow**, then click **Select** for the microflow, create a new microflow, and name it **XMLDocument_Import**.<br />
120
+
2. For the **On click** event, select **Call a microflow**, then click **Select** for the microflow, create a new microflow, and name it *XMLDocument_Import*.<br />
0 commit comments