Skip to content

Commit 3fa4eff

Browse files
committed
Merge branch 'development' of https://github.com/mendix/docs into development
2 parents 590833a + 5a5f37a commit 3fa4eff

51 files changed

Lines changed: 502 additions & 129 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/en/docs/appstore/use-content/platform-supported-content/modules/SAML/_index.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,22 +514,33 @@ For more information on using the Deep Link module (with Mendix 8 and 9), see th
514514
Page URLs and Microflow URLs are supported with SAML for Mendix version 10.6 and above. To do this, follow the steps below:
515515
516516
1. In the **Runtime** tab of the **App Settings**, configure the page **URL prefix** to **link** instead of the default **P** to maintain compatibility with existing URLs.
517-
2. Ensure to remove the Deep Link module from your app to start the app successfully.
518-
3. To implement the SSO redirection, add the following lines of code to your login page (for example, `login.html`):
517+
2. Ensure to remove the Deep Link module from your app to start the app successfully. For more information, see the [Migrating to Page and Microflow URLs](/appstore/modules/deep-link/#migrate-page-micro) section of the *Deep Link*.
518+
519+
#### Steps for SAML Versions Below v3.6.15 and v4.0.0
520+
521+
1. To implement the SSO redirection, add the following lines of code to your login page (for example, `login.html`):
519522
* Extract the return URL: `var returnURL = window.location.hash.substring(1) + window.location.search;`
520523
* For automatic redirection: use `window.onload` to automatically redirect users to the SSO login page.
521524
`window.location.href = 'sso/login' + (returnURL ? '?cont=link' + encodeURIComponent(returnURL) : '');` or,
522525
* For manual redirection: add an onclick event to the button that manually triggers the SSO login.
523526
`this.href = 'sso/login' + (returnURL ? '?cont=link' + encodeURIComponent(returnURL) : '');`
524-
4. To allow the end users to navigate to the desired page, URL can be formed as follows:
527+
2. To allow the end users to navigate to the desired page, URL can be formed as follows:
525528
* If a single IdP is configured, the URL will be the base URL of your application followed by `SSO/login?cont={page/Microflowurl}`.
526529
For example, `http://localhost:8080/SSO/login?cont=link/pagepath`.
527530
* If Multiple IdPs are configured, you can specify which IdP should be used by adding the alias (MyIdPAlias) `SSO/login?_idp_id={MyIdPAlias}&cont={page/Microflowurl}`.
528531
For example, `http://localhost:8080/SSO/login?_idp_id=Okta&cont=link/pagepath`.
529532
530-
Once the above changes are applied, end users can directly navigate to the desired page. If not logged in, they will be redirected to the IdP login page for authentication. After successful log in, they will be directed to the desired page using page and microflow URLs.
533+
#### Steps for SAML Versions above v3.6.17 and v4.0.1
531534
532-
For more information, see the [Migrating to Page and Microflow URLs](/appstore/modules/deep-link/#migrate-page-micro) section of the *Deep Link*.
535+
1. To use the Page URL functionality, replace the content of *login.html* with the content of *login-with-mendixsso-automatically.html* (located in the **resources** > **mendixsso** > **templates** folder) without changing the file name.
536+
2. To implement the SSO redirection, replace the code in the `<script>` tag your login page (for example, *login.html*) with the following code:
537+
* For automatic redirection: use `window.onload` to automatically redirect users to the SSO login page.
538+
`const returnURL = encodeURIComponent(window.location.search+window.location.hash);`
539+
`self.location = '/SSO/login?cont='+returnURL;`
540+
* For manual redirection: add an onclick event to the button that manually triggers the SSO login.
541+
`window.location.href='/SSO/login?cont=' + encodeURIComponent(window.location.search + window.location.hash);`
542+
543+
Once the above changes are applied, end users can directly navigate to the desired page. If not logged in, they will be redirected to the IdP login page for authentication. After successful log in, they will be directed to the desired page using page and microflow URLs.
533544
534545
### Using Deep Link Module{#using-deeplink}
535546
@@ -558,6 +569,7 @@ When enabling the log node SSO to show trace messages, you can find detailed inf
558569
* **“MSIS7046: The SAML protocol parameter ‘RelayState’ was not found or not valid.”** – This error can be shown on the ADFS server, most likely when you are using Mac OSX and a Safari browser. Setting the `BindingURI_Redirect` constant to true might help resolve the issue. By default, Mendix favors the `Post` binding, as the maximum size exceeds that of a `Redirect` binding due to its use of cookies and post information instead of URL parameters. The size can be a factor when using encryption.
559570
* **"Unable to validate Response, see SAMLRequest overview for detailed response. Error: An error occurred while committing user: p:'johndoe@company.com'/u:'JoHnDoE@CoMpAnY.CoM'"** – All user names passing through the SAML module are converted to lower-case, so make sure all the existing user names and new user names are also converted to lower-case. This is because certain systems are not case-sensitive (for example, Active Directory).
560571
* **“Could not create a session for the provided user principal.”** – This error can be shown if the IdP configuration does not contain any application attributes for the entity where the user (and user principal) is to be found (and stored).
572+
* **"WARN org.apache.xml.security.signature.XMLSignature - Signature verification failed"** – This warning occurs when the signature validation process fails due to multiple certificates in the IdP metadata used for SSO. As the service provider attempts to verify the signature against each certificate, it logs **Signature verification failed** warnings for mismatched certificates. Separate messages are generated to specify the exact issue: **The response is not signed correctly** if the response signature fails, and **The assertion is not signed correctly** if the assertion signature fails. These messages also include the identifier of the key used during verification, providing more clarity on the cause of the failure.
561573
562574
### Troubleshooting an Endless Redirect Loop in Mendix 9 and 10
563575

content/en/docs/appstore/use-content/platform-supported-content/modules/database-connector-mx10.md

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,21 @@ Then, use the parameter in the query:
123123

124124
`select * from customers where contactFirstName like {paramFirstName}`
125125

126-
{{% alert color="info" %}}
127-
If you need to pass a list of values to a parameter, you can use the following approach:
126+
To pass a list of values to a parameter, you can use the following approach:
128127

129-
`WITH empids AS (
130-
SELECT empid FROM json_table( {EmpIdList}, '$[*]' columns ( empid number path '$' ))
128+
```sql
129+
WITH empids AS (
130+
SELECT empid
131+
FROM json_table({EmpIdList}, '$[*]' columns (empid number PATH '$'))
131132
)
132133
SELECT *
133-
FROM emp WHERE empno IN (SELECT empid FROM empids);`
134+
FROM emp
135+
WHERE empno IN
136+
(SELECT empid
137+
FROM empids);
138+
```
134139

135-
where parameter `EmpIdList` is of type String with the value `[1,7946,3,4,7942,7943,7945]`.
136-
{{% /alert %}}
140+
Here, the parameter `EmpIdList` is of type String with the value `[1,7946,3,4,7942,7943,7945]`.
137141

138142
### Using Query Response {#use-query-response}
139143

@@ -276,3 +280,31 @@ Execute queries as you would with supported databases, and retrieve responses in
276280
{{% alert color="info" %}}
277281
By default, autocommit is set to false for design time queries.
278282
{{% /alert %}}
283+
284+
### Resolving Dependency Issues with Apache Arrow on JDK 17 or 21
285+
286+
When using JDK versions 17 or 21 (or any version above 16), you may encounter compatibility issues if database you are connecting to has a dependency on Apache Arrow.
287+
288+
#### To resolve Apache Arrow dependency issue in Snowflake:
289+
290+
The Snowflake JDBC Driver uses Arrow as the default result format for query execution to improve performance. However, you can override this default setting by switching the result format to JSON.
291+
292+
To set the result format at the Snowflake session or user level, use the following SQL statement:
293+
294+
```sql
295+
**ALTER USER <user_name> SET JDBC_QUERY_RESULT_FORMAT='JSON';**
296+
```
297+
298+
This approach ensures compatibility with JDK 16+.
299+
[For more details](https://community.snowflake.com/s/article/Getting-java-lang-NoClassDefFoundError-for-class-RootAllocator).
300+
301+
#### To resolve Apache Arrow dependency issue in Databricks:
302+
303+
The Databricks JDBC Driver uses Arrow for serialization as it improves performance.
304+
305+
To override this setting add below parameter to JDBC URL
306+
307+
```sql
308+
EnableArrow=0
309+
```
310+
[For more details](https://community.databricks.com/t5/data-engineering/java-21-support-with-databricks-jdbc-driver/td-p/49297)
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
title: "Configure the External Database Connector for Databricks"
3+
linktitle: "Databricks"
4+
url: /appstore/modules/databricks/external-database-connector/
5+
description: "Describes the steps required to use the Mendix External Database connector with Databricks."
6+
---
7+
8+
## Introduction
9+
10+
The [External Database connector](/appstore/modules/external-database-connector/) allows you to connect to databases and select data to use in your app. You can use it to directly test connections and queries during configuration in Studio Pro at design time. For Mendix apps that use Databricks as their database, the External Database connector is the recommended integration option for Mendix 10.20.0 and up.
11+
12+
This how-to describes the steps required to enable your app to use the External Database connector with Databricks.
13+
14+
## Prerequisites
15+
16+
For some general information on how to use bring your own JDBC driver with the external database connector, read [External Database Connector: Configure for Any Database](https://docs.mendix.com/appstore/modules/external-database-connector/#byod).
17+
18+
## Configuring the Connection Between Your Mendix App and Databricks
19+
20+
To connect your Mendix application to Databricks with the External Database connector, follow these steps:
21+
22+
1. Install the [External Database connector](https://marketplace.mendix.com/link/component/219862) version 5.1.1 or higher.
23+
2. Ensure that you have the required Databricks JDBC Driver by choosing one of the following options:
24+
25+
* To have the dependency downloaded automatically on running your project, add a **Java Dependency** in the **Settings** of you module and provide the following information:
26+
* **Group ID** - set to **com.databricks**
27+
* **Artifact ID** - set to **databricks-jdbc**
28+
* **Version** - set to **2.7.1**
29+
30+
{{< figure src="/attachments/appstore/platform-supported-content/modules/databricks/JavaDependency.png" >}}
31+
32+
* To install the dependency manually, download version 2.7.1 of the [JDBC driver](https://www.databricks.com/spark/jdbc-drivers-archive) that Databricks provides and put the .jar file into the *userlib* of your Mendix project.
33+
34+
3. Run you Mendix project and run the [Connect to Database wizard](/appstore/modules/external-database-connector/#configuration), selecting **Other** as the database type.
35+
36+
{{< figure src="/attachments/appstore/platform-supported-content/modules/databricks/DatabricksConfig.png" >}}
37+
38+
4. Provide a name for the database connection document.
39+
5. Enter the following connection details:
40+
41+
* **User name** - set to **token**
42+
* **Password** - set to the personal access token (PAT) that you can generate through the user settings in Databricks:
43+
44+
{{< figure src="/attachments/appstore/platform-supported-content/modules/databricks/PAT.png" >}}
45+
46+
7. In your Databricks account find the JDBC URL related to the SQL warehouse or cluster which you are using.
47+
8. Copy the URL into the **JDBC URL** field and add *UID=token;PWD=`PAT`*, where `PAT` is your actual PAT.
48+
49+
{{< figure src="/attachments/appstore/platform-supported-content/modules/databricks/JDBC_URL.png" >}}
50+
51+
9. Click **Test Connection** to verify the connection details, and then click **Save**.
52+
53+
Your Mendix app now connects to Databricks with the provided connection details. When the connection is successful, you can see your Databricks tables in your Mendix app.
54+
55+
{{< figure src="/attachments/appstore/platform-supported-content/modules/databricks/Database_structure.png" >}}
56+
57+
You can now configure the queries that you need to run on your Databricks database. The following section of this document provides an example of a common query. For general information about creating queries, see [External Database Connector: Querying a Database](/appstore/modules/external-database-connector/#query-database) and [External Database Connector: Using Query Response](/appstore/modules/external-database-connector/#use-query-response).
58+
59+
## Configuring a Basic Query
60+
61+
This section shows a basic example of how to use the database connector to execute a query on your Databricks data.
62+
63+
### Creating Data in your Databricks Workspace
64+
65+
If you do not have any test customer data in your Databricks workspace, you can create it by running the following SQL command in your workspace's SQL Editor:
66+
67+
```sql
68+
CREATE TABLE customerData (
69+
name varchar(64),
70+
address varchar(64),
71+
postal_code varchar(6),
72+
gender varchar(64)
73+
);
74+
75+
INSERT INTO customerData (name, address, postal_code, gender) VALUES
76+
('Henk de Vries', 'Klaprooslaan 5, Bloemenstad', '1234AB', 'Male'),
77+
('Sanne Verbeek', 'Molendam 8, Waterveen', '2345CD', 'Female'),
78+
('Jan-Willem Bos', 'Zonstraat 22, Zomerhoven', '3456EF', 'Male'),
79+
('Marieke de Groot', 'Windmolenweg 33, Korenveld', '4567GH', 'Female'),
80+
('Bert van Dijk', 'Vlinderplein 15, Lenteveen', '5678JK', 'Male'),
81+
('Lotte van Dam', 'Regenboogpad 10, Kleurenburg', '6789LM', 'Female'),
82+
('Koen Smits', 'Eikenlaan 2, Bosrijk', '7890NO', 'Male'),
83+
('Emma Visser', 'Druppelweg 45, Regenstad', '8901QP', 'Female'),
84+
('Thomas Mulder', 'Sterrenhof 7, Hemelrijk', '9012RS', 'Male'),
85+
('Sophie Jansen', 'Kersenstraat 12, Fruitdorp', '0123TU', 'Female');
86+
```
87+
88+
{{< figure src="/attachments/appstore/platform-supported-content/modules/databricks/SQL_Editor.png" >}}
89+
90+
### Querying the Data
91+
92+
After you have created a table with some entries, you can now be query from your Mendix application.
93+
94+
1. In your Mendix app, in the **App Explorer**, find and open the external connection document that you created with the Connect to Database wizard.
95+
2. In the **Name** field, enter a name for your query, for example, *CustomerData_Get*.
96+
3. Enter the following **SQL Query**:
97+
98+
```sql
99+
SELECT * FROM customerData
100+
```
101+
102+
4. Click **Run Query**.
103+
104+
{{< figure src="/attachments/appstore/platform-supported-content/modules/databricks/Query.png" >}}
105+
106+
5. Verify that the results are correct, and then generate the required entity to collect the data in your Mendix application. For more information, see [External Database Connector: Creating an Entity from the Response](/appstore/modules/external-database-connector/#create-entity).
107+
6. Create a microflow that will run the query by doing the following steps:
108+
1. In the **App Explorer**, right-click on the name of your module, and then click **Add microflow**.
109+
2. Enter a name for your microflow, for example, *ACT_Customerdata_Get*, and then click **OK**.
110+
3. In your **Toolbox**, find the **Query External Database** activity and drag it onto the work area of your microflow.
111+
4. Position the **Query External Database** activity between the start and end event of your microflow.
112+
5. Double-click the **Query External Database** microflow activity to configure the required parameters.
113+
6. In the **Database** section, select your Databricks database.
114+
7. In the **Query** list, select the query name that you entered in step 2.
115+
10. In the **Output** section, provide the following values:
116+
* **Return type** - **List of *{your module name}*.customerdata**
117+
* **Use return value** - set to **Yes**
118+
* **List name** - enter *Customerdata_list*
119+
11. Click **OK**.
120+
121+
{{< figure src="/attachments/appstore/platform-supported-content/modules/databricks/JA_Query.png" >}}
122+
123+
7. Link the microflow to a microflow button and use the Debugger to test if the objects are properly returned.

content/en/docs/appstore/use-content/platform-supported-content/modules/email-connector.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ Configuring local clients, such as [Papercut](https://github.com/ChangemakerStud
352352

353353
### Adding Attachments
354354

355+
#### Normal Attachment
356+
355357
To add attachments to the email message, do the following:
356358

357359
1. Create an **Attachment** entity. The **Attachment** entity extends the **FileDocument** entity by making it usable in all the places where the **FileDocument** entity is required.
@@ -360,6 +362,20 @@ To add attachments to the email message, do the following:
360362

361363
2. Set the **Attachment_EmailMessage** association.
362364

365+
#### Inline Attachment
366+
367+
To add inline attachments to an email message, you can use the Rich text editor to insert an image (or images) into the email body. You can also insert inline attachments by using a microflow. To use a microflow, follow these steps:
368+
369+
1. Create an EmailMessage with the *Content* property set as seen below:
370+
371+
```
372+
'before inline image<br><img src="cid:mxcid:test.png" width="530" height="110"><br>after inline image'
373+
```
374+
375+
2. Specify the image's tag source using the **cid:mxcid** prefix before the source file to have the image added as inline image.
376+
3. Create the attachment with the Position attribute set to **ENUM_AttachmentPosition.Inline**.
377+
4. Associate the attachment with EmailMessage. You can then send the email using the **SUB_SendEmail** microflow.
378+
363379
### Page Styling
364380
365381
If the **Email connector** page styling is affected as you select and view email messages, it likely due to errors in the email message CSS. To resolve the errors, turn on **Sanitize email to prevent XSS attacks** in [Account Settings](#other-account-settings).

content/en/docs/appstore/use-content/platform-supported-content/modules/genai/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To familiarize yourself with the GenAI capabilities of Mendix, explore the secti
2727

2828
#### Familiar with GenAI
2929

30-
If you are already familiar with GenAI and want to start building, refer to [How to Build Smarter Apps Using GenAI](/appstore/modules/genai/using-genai/) guide to start building your first GenAI-powered application and access further supportive resources.
30+
If you are already familiar with GenAI and want to start building, refer to [How to Build Smarter Apps Using GenAI](/appstore/modules/genai/how-to/) guide to start building your first GenAI-powered application and access further supportive resources.
3131

3232
#### New to GenAI
3333

content/en/docs/appstore/use-content/platform-supported-content/modules/genai/concepts/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: "Get Started with Generative AI"
2+
title: "GenAI Concepts"
33
url: /appstore/modules/genai/get-started/
4-
linktitle: "Get Started with GenAI"
4+
linktitle: "GenAI Concepts"
55
weight: 20
66
description: "Describes the concepts behind generative AI and what you might implement with it."
77
aliases:

content/en/docs/appstore/use-content/platform-supported-content/modules/genai/using_genai/_index.md renamed to content/en/docs/appstore/use-content/platform-supported-content/modules/genai/how-to/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "How to Build Smarter Apps Using GenAI"
3-
url: /appstore/modules/genai/using-genai/
3+
url: /appstore/modules/genai/how-to/
44
linktitle: "How to Build Smarter Apps using GenAI"
55
weight: 10
66
description: "Tutorial on how to get started with GenAI for Smarter Apps"
@@ -27,7 +27,7 @@ Generative Artificial Intelligence (GenAI) transforms business applications, emp
2727

2828
### Additional Resources
2929

30-
* Basic documentation on [Get Started with Generative AI](/appstore/modules/genai/get-started/) is an essential resource for anyone beginning their GenAI journey.
30+
* Basic documentation on [GenAI Concepts](/appstore/modules/genai/get-started/) is an essential resource for anyone beginning their GenAI journey.
3131
* The [GenAI For Mendix](https://marketplace.mendix.com/link/component/227931) is a bundle containing [GenAI Commons](/appstore/modules/genai/commons/), [Conversational UI](/appstore/modules/genai/conversational-ui/), and the [Mendix Cloud GenAI Resource Packs](/appstore/modules/genai/MxGenAI/) offering a comprehensive overview of the technical aspects.
3232
* The [OpenAI](/appstore/modules/genai/openai/) provides essential information about the OpenAI connector.
3333
* The [Amazon Bedrock](/appstore/modules/aws/amazon-bedrock/) provides key information about the AWS Bedrock connector.

0 commit comments

Comments
 (0)