Skip to content

Restructure Mx10 Integration attachment files #9749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 18 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ weight: 15

An XML schema is defined in an XML Schema Definition (XSD) file and can be imported in your model. It describes what a certain XML document should look like. The schema can then be used in [Import Mappings](/refguide/import-mappings/) and [Export Mappings](/refguide/export-mappings/).

{{< figure src="/attachments/refguide/modeling/integration/xml-schemas/18582294.png" alt="Figure 1" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/mapping-documents/xml-schemas/schema.png" alt="Figure 1" class="no-border" >}}

## XSD File Support

Expand All @@ -33,7 +33,7 @@ In the mapping editor for import mappings, you can check elements that can occur

### XSD Constraints

* If the XSD contains any of the unsupported constructs, they will be highlighted in the mapping editor with this warning icon: {{< figure src="/attachments/refguide/modeling/integration/xml-schemas/xml-schema-support/16843903.png" class="no-border" >}}
* If the XSD contains any of the unsupported constructs, they will be highlighted in the mapping editor with this warning icon: {{< figure src="/attachments/refguide/modeling/integration/mapping-documents/xml-schemas/warning.png" class="no-border" >}}

* This will be next to each unsupported element or attribute. Checking any of such elements or attributes will result in consistency errors.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ To download the modules, follow these steps:
1. Open the **Mendix Marketplace** from within Studio Pro.
2. Search for the keyword *reflection* and select **Mx Model reflection**:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/18581166.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/mx-model-reflection.png" class="no-border" >}}

3. Click **Download** to include the module in your app. It will be imported into **App** > **Marketplace modules** in the **App Explorer**.
4. Search for the keyword *Excel*, select **Excel exporter**, and download that module into your app:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/exporter.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/exporter.png" class="no-border" >}}

{{% alert color="warning" %}}
Depending on the layout selected when the app was created, errors in Studio Pro may arise due to the new module's default layouts. To correct this, open each page that has an error and update the layout to the desired layout within the app.
Expand All @@ -47,15 +47,15 @@ In this section, you will learn how to add the required pages in the app's **Nav
1. In the [App Explorer](/refguide/app-explorer/), go to **Navigation**.
2. Add a **New item** to the navigation to open the page **MxModelReflection.MxObjects_Overview**:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/new-menu-item-mxreflection.png" alt="new-menu-item-mxreflection" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/new-menu-item-mxreflection.png" alt="new-menu-item-mxreflection" class="no-border" >}}

3. Add a new item to the Navigation to open the page **XLSReport.Excel_Document_Overview**:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/new-menu-item-excel-exporter.png" alt="new-menu-item-excel-exporter" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/new-menu-item-excel-exporter.png" alt="new-menu-item-excel-exporter" class="no-border" >}}

4. Open **App Security** and assign these two modules to the Administrator user role:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/security.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/security.png" class="no-border" >}}

## Creating an Input Object Entity

Expand All @@ -64,7 +64,7 @@ In this section, you will create an entity which will be used to export the Exce
1. Open the domain model for your app and add an entity to serve as a "primary export" entity that is a specialization of **FileDocument**.
2. Create an association between the newly created entity and the entity (or entities) that you will want to serve as a base for the Excel export.

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/18581908.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/create-association.png" class="no-border" >}}

## Configuring Mx Model Reflection {#configure-mx-model-reflection}

Expand Down Expand Up @@ -104,7 +104,7 @@ To set up a template, follow these steps:

7. Provide a **Description** for identifying and documenting what this template is for:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/new-excel-template.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/new-excel-template.png" class="no-border" >}}

8. Specify the **Date time export format** which defines how the dates and times should appear in the Excel file once exported.

Expand All @@ -116,7 +116,7 @@ To upload an Excel file as a template, perform the following steps:

1. Click the following icon:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/upload-excel-file.png" alt="upload-excel-file" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/upload-excel-file.png" alt="upload-excel-file" class="no-border" >}}

2. For **File**, click **Browse** and navigate to the Excel file that you want to use as a template.

Expand All @@ -132,7 +132,7 @@ To create the worksheet layout, follow these steps:

1. Under the **Worksheets** section for the template, select **New** to create a new sheet template:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/18581907.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/new-sheet-template.png" class="no-border" >}}

2. Specify the **Name** that will be given to the sheet when the file is exported.

Expand All @@ -144,11 +144,11 @@ To create the worksheet layout, follow these steps:

The following figure shows a template where worksheet has **Reference to the template input object** and **Sheet input Object** configured:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/worksheet-with-input-object.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/worksheet-with-input-object.png" class="no-border" >}}

The following figure shows a template where worksheet does not have **Reference to the template input object** and **Sheet input Object** configured:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/worksheet-without-input-object.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/worksheet-without-input-object.png" class="no-border" >}}

5. Configure the **Start retrieved data at row** to set the ordinal number in which the data should be exported.

Expand Down Expand Up @@ -180,15 +180,15 @@ To create the worksheet layout, follow these steps:

Below you can find an example of the definition of a template and the corresponding exported Excel file: the two worksheets are defined as **Topic** and **PubMessage** in the template, and the corresponding Excel file has two sheets that have the same names.

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/multiple-sheets.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/multiple-sheets.png" class="no-border" >}}

### Configuring Dynamic Column Data {#dynamic-column-data}

To configure the dynamic column data, follow these steps:

1. On the **Column Data** tab, select **New** to create a new export column:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/18581905.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/new-export-column.png" class="no-border" >}}

2. The **Column number** will be set automatically, but can be overwritten to the desired ordinal number.
3. Define a **Name** for the column. This will be the **Column Header** when exported.
Expand All @@ -205,7 +205,7 @@ To configure the static data in the sheet, follow these steps:

1. Open the **Static Data tab** and select **New** to create a new export column.

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/18581903.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/static-data-tab.png" class="no-border" >}}

2. Specify the **Row** and **Column** that the static value should be placed.
3. Enter a name for the cell in the **Name** field.
Expand All @@ -218,7 +218,7 @@ To configure the custom formatting and styling for the cells, follow these steps

1. Back on the main page for your new template, click **New** in the **Styles** section to create a new style that can be applied to any of the data in the Excel export:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/18581900.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/styles.png" class="no-border" >}}

2. Specify the properties of the style that will be applied to the cells.

Expand All @@ -234,17 +234,17 @@ In this section, you will learn how to call the newly created Excel export templ

2. In the microflow, retrieve a single object which is the template you set up earlier to use for the export.

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/retrieve-template.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/retrieve-template.png" class="no-border" >}}

3. In your microflow, call the **XLSReport.GenerateExcelDoc** Java action (available from the module's **JavaActions** folder) to pass the required objects to the module.

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/java-action.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/java-action.png" class="no-border" >}}

4. In your microflow, download the resulting FileDocument object.

Your microflow should look similar to this:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/microflow-for-generate.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/microflow-for-generate.png" class="no-border" >}}

If your template definition does not have **Input Object**, your microflow can directly retrieve the template object and **Row Object** from the database for the export.

Expand Down Expand Up @@ -272,7 +272,7 @@ To run the microflow you created above, you will need to create another microflo

Your new microflow should look similar to this:

{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/using-the-excel-exporter/associating-objects.png" class="no-border" >}}
{{< figure src="/attachments/refguide/modeling/integration/use-excel-documents/export-to-excel/associating-objects.png" class="no-border" >}}

{{% alert color="info" %}}
If you create a **PolicyDoc** with *no* associations to **Policy** objects, you will export an empty spreadsheet with the structure defined in the template.
Expand Down
Loading