Configuring Add-on and Solution Modules for Publishing

Last modified: April 18, 2024

1 Introduction

Add-on and solution modules are special types of modules that are developed to add functionality to an app. They have intellectual property (IP) protection enabled, and they have the .mxmodule extension. For more information on IP protection, see .

The main difference between an add-on and a solution module is their purpose. An add-on module is developed to be a stand-alone functionality that other users can consume in the their apps (for example, an add-on can be a connector).

Solution modules are always part of a solution, which is any Mendix app that is suitable to be sold to multiple different customers. Solution modules are dependent on each other and are inseparable. Solutions modules form the solution core of the solution.

2 Configuring Add-on and Solution Modules

You can mark a standard module (app module) as an add-on or solution module at any time, but Mendix recommends doing so right as you start developing. Mendix also recommends changing the module version for add-on and solution modules every time you make changes to them.

All the content in add-on and solution modules is set to be hidden from consumers by default (as modules have IP protection enabled). You can then decide what parts of the module you would like to make as usable, if any. For example, you can allow consumers to use certain entities and attributes.

2.1 Changing the Export Level of a Document/Element

Documents and some elements in the add-on and solution modules have the Export level property. This property defines whether the consumers are able to use a certain document/element in their app. For details on what documents and elements are supported for add-on and solution modules, see the Supported Documents section below.

The Export level has two values:

  • Hidden – the document/element content is hidden from a consumer
  • Usable – consumers are able to use the document/element in their apps (for example, you can mark some entities and their attributes as usable)

To change the Export level and mark documents/elements as Usable, do the following:

  1. In App Explorer, double-click Settings for the module you would like to set as an add-on or solution module.

  2. In the Module settings dialog box, select the type of the module and click OK.

  3. Open the document/element that you would like to mark as Usable.

  4. Navigate to its properties.

  5. Set the Export level property to Usable:

You can see that documents/elements that are marked as usable have an eye icon ( ). This means the document is a part of the API. The domain model gets an eye icon if any entity is usable.

2.2 Supported Documents

Not all documents/elements can be marked as Usable in add-on and solution modules. Some can only be Hidden.

Below is the list of documents and elements that can be mark as Usable:

  • Domain model:
    • Entity and attributes (including external entities)
    • Association
  • Microflow
  • Rules
  • Enumeration
  • Constants (when a constant is hidden, a consumer is not able to configure its value in the App settings)
  • Java Action
  • Regular expressions
  • Image collections
  • Custom widgets

3 Exporting Add-on Modules and Solutions

3.1 Exporting Add-on Module Package

To export the add-on module, right-click it in the App Explorer and select Export add-on module package:

It is possible to add files in an add-on module package. You can select them during export, and they will be imported.

The add-on module gets an .mxmodule extension.

3.2 Exporting Solution Package

A solution package is an app package that can be sold as an out-of-the-box solution and can be used by multiple customers. It has a solution core that consists of solution modules. It can also consists of app modules and add-on modules. For more information, see How to Create Solutions in the Marketplace Guide.

To export the solution package, right-click the name of the app in the App Explorer and select Export app package, or open File > Export App Package. For more information, see Export App Package.

The solution package gets an .mxsolution extension.

4 Updating Add-on and Solution Modules

When you update an individual add-on or a solution module to another version, you can export this module and distribute the new module package to your consumers.

5 Read More