7.0

18 minutes to read Download PDF Edit

7.0.2 General Availability

Release date: February 21st, 2017

Download

Migration from Mendix 6

To make migration easier, see Moving From 6 to 7.

Stateless runtime

An earlier version of Mendix enabled applications to move sessions to the database and files to an external file storage facility (for example, S3 or Azure Blob Storage). In Mendix 7, the server object state has been moved to the client, which means that the server is now completely stateless and can be scaled horizontally at will!

This functionality is enabled by default, so there is no need for additional configuration.

Because of this statelessness, it is the client that keeps track of objects that are not yet committed, objects that are not persistable, and even changes to the objects that weren’t committed yet. To keep the resource usage low, we periodically prune the stored state — we remove objects that are not displayed in the UI and not connected by references. For gaining insight into how big the state is in your app (and even why it exists), we built a basic tool: use the Ctrl + Alt + G key combination in your browser, and the information will be dumped to your browser’s console (note that this feature might be removed in a future release). Please be aware that reloading the browser window (as in, pressing F5) will drop the entire state.

Because the server doesn’t store the object state anymore, the client has to send it along with some requests, so the server-side microflow can access NPEs, uncommitted values, etc. We apply quite a few optimizations in order to send as little data as possible and to maintain the same network footprint as in previous Mendix versions. There is a new setting in the Runtime tab of Project Settings called Optimize network calls, so if you experience some awkward issues in your project (for example, a microflow called from the client doesn’t see the changes made by the data source microflow), you can try to disable these optimizations. (Note that this setting will be removed in a future release, so please report any issues you experience as soon as possible.)

Persistent sessions

Persistent sessions are now enabled by default. This is necessary for Mendix to work correctly in a clustered scenario. It’s still possible to disable persistent sessions by setting PersistentSessions to false. However, in that case, you can’t run Mendix in a clustered mode.

We optimized the system to reduce the performance impact of enabling this by default. This is achieved by allowing a Mendix Runtime instance to assume that a session is valid for a short timespan (by default, 30 seconds). A Mendix Runtime instance will only validate a session once within that timespan. However, this means that upon user logout, it may take up to that specific timespan (in the worst case scenario) before all the Mendix Runtime instances of a cluster (except for the one processing the logout) recognize that the user is logged out. This timeout can be configured by setting a value for SessionValidationTimeout, which represents the timespan in milliseconds.

Breaking changes

  • Uncommitted changes are not available anymore when reloading the browser window (as in, pressing F5). In Mendix 6 they were still available if you reached the changed object through objects that were already committed, as a reload would always bring you back to the home page.
  • The following methods from Session were obsolete and have been removed:retain, release, addToClientRoots, removeFromClientRoots, getClientRoots, getJavaActionRoots, and getData.
  • Sign-in microflows are not supported anymore, because they do not add any functionality. In a future version, the state will be automatically transferred from the anonymous user to the signed-in user by the client. In Mendix 7, having a sign-in microflow selected will result in a consistency check error. When this is solved by setting the microflow to None, the property will automatically disappear from the UI.

Known issues

For stateless runtime known issues in this release, see Known Issues.

Mendix Business Server Runtime Java API: now stricter and more complete

We removed and added classes from the Mendix Server Runtime Java Public API to make it more concise. The JavaDoc of the API is also now complete.

Note that apidocs.mendix.com has always been the reference of the public Java API. However, before Mendix 7, it was possible to access the internal API via Java code. In this release, we have restricted access to the non-public parts of the API in order to clearly demarcate what is public and what is private. In other words, it is no longer possible to navigate your way to unsupported APIs. Because of this we can now provide more stability, as it is easier to support an explicit scoped API.

Note that we also removed the deprecated parts of the API. All of the changes are documented in Moving from 6 to 7 in the Mendix Reference Guide.

Working towards a better isolation of projects, App Store modules and connectors, and the platform

We changed the mechanism that provides the isolation of project Java dependencies (in userlib) and the dependencies of the Mendix platform. In particular, the way Java classes are loaded has changed. This will allow us to improve the isolation of reusable App Store modules and connectors in forthcoming releases.

In general, this change should be transparent. The following are exceptions:

  • Java libraries in Mendix 7 shipped with the installation package are not available for projects anymore. If your project depends on such libraries, make sure that it is now “self-contained,” meaning all the required libraries needed to compile your custom Java Actions are present in userlib. Please note that there should never be a com.mendix Java library in your userlib.
  • If you have multiple versions of the same library in your userlib, only the latest one will be loaded. The other libraries will be evicted automatically. Eviction information is available in the M2ee log file. Selecting the version of duplicate Java libraries is now well-defined, but as a consequence, the selected version can be different than what it was before. If you need a specific version of a library to be picked up, make sure it is the most recent version in your userlib.

Action button

A long time ago, we introduced the Action button, which allowed you to trigger one of the following actions: call a microflow, open a page, or do nothing. We were so excited by the shiny future of that button that we overlooked the obvious — you had to perform an extra click to create the button you wanted (although you could also drag a microflow or page from the Project Explorer to the page in order to automatically create the Action button).

Today we introduce the Call microflow button and Open page button toolbar items in the Modeler. These items enable creating Action buttons at lightning speed with pre-selected actions. Plus, they immediately ask you to choose a target page/microflow.

And about that shiny future — we made the Action button more ubiquitous. So from now on, it takes over the Save button, Cancel button, Sync button, and Close page button. This means that these four buttons have become an Action button with a specific action: save changes, cancel changes, synchronize, and close page. And of course, these new actions are available in the same places as the “old” ones: list views, menus, images, and buttons.

Authentication widgets

It is now possible to model your very own sign-in form. In order to do this, we’ve added a few new widgets: the Login ID text box, the Password text box, and the Sign in button. Along with the Sign out button, you can find them in a new category called Authentication.

If an authentication attempt fails, a pop-up window will be displayed explaining the reason. You can also use the new Validation message widget to display errors instead.

On every profile, a custom sign-in page can be selected. If an anonymous user tries to open a page to which they have no access, a built-in pop-up window is displayed prompting them to sign in. If a custom sign-in page is selected, that page will be displayed instead. The sign-in page can be opened in content or as a (modal) pop-up window.

App Store modules grouped and moved in the Project Explorer

We realized that since the Mendix connectors from the Mendix App Store are becoming popular, this will lead to a bunch of modules in your model that are mainly read-only. So, we decided to improve the distinction between your own modules and the ones from the App Store.

We grouped the App Store modules in the Project Explorer pane and selection dialog boxes. In the Project Explorer, the App Store modules can now be found under the Project node.

Access to HTTP response for REST calls

It is now possible to access the latest HTTP response and the HTTP headers through the $latestHttpResponse variable. You can also access the message body of the HTTP response via this variable in the error flow (for status codes other than 2XX).

In addition, it is now possible to select HTTP response as the return type of the REST call action.

Improvements

  • We added association support for the Find and Filter list operations. Both of these operations can be used for reference and reference sets. Note that Find returns a single object, and Filter returns a list of objects (just as for Find and Filter on attributes).
  • When configuring the delete behavior of self-referential associations in the Modeler, we improved the texts that describe the side on which the object is being deleted. We hope that those texts are now clearer. (Ticket 38193)
  • When double-clicking Added change items in the Changes pane of the Modeler, the documents that are edited in a tab (as opposed to in a modal dialog box) are now opened in addition to being shown in the Project Explorer.
  • We improved the Cloud Foundry buildpack configuration to make it clearer for when you’re using a default Mendix build or your own custom one. We also included the auto discovery option, so your Cloud Foundry instance can discover the applicable offline buildpack automatically.
  • We moved the NavigationLayouts and Administration modules to the App Store. We also included them in the Blank project template, so when you are creating a new project, you can focus on your own modules instead.
  • We migrated the Modeler to the latest version of .NET Framework (4.6.2) to make it up-to-date with all the latest security, performance, and stability fixes. If you’re using MxBuild or any other .NET-based Mendix utility on Mono, we recommend upgrading to version 4.6.2 or higher.
  • We have changed the conflict message for the scenario in which a document, module, or folder doesn’t exist locally when merging changes from the repository. This accounts for cases when the file or folder was deleted locally or when it was never created locally. (Ticket 41830)
  • We improved how Mendix is displayed on high DPI displays for a number of screens and windows. We improved icon scaling, fixed the misaligned buttons, and fixed the layout and missing scrollbar problems. We did this for the web service microflow actions, consumed app service, published app service, JSON structure document, OData, and mappings documents.
  • Your project navigation contains four profiles: Desktop, Tablet, Phone, and Offline device. We’ve renamed Desktop to Responsive to be consistent with the page template categories. And Offline device has been changed to Hybrid tablet and Hybrid phone (which have the option of offline support).
  • In the Run menu, the View Desktop App option has also been renamed to View Responsive App. Hurray for consistency!
  • A data view with an Entity (path) data source gets its object from the context, either from an outer data container (for example, a list view or data view) or from the place that opens the page (for example, another page or a microflow). That is why we have rebranded this data source as the Context data source.
  • In a similar vein, the New button (which creates an object) has been renamed to Create button. This brings it in line with, for example, the create action in microflows. Fear not, the caption of the button will still be “New”, because we feel that makes more sense to users.
  • Some error messages have been reformulated to make them easier to understand. For example, the strangely redundant message “Undefined page ‘MyFirstModule.Page’ (no page ‘MyFirstModule.Page’)” is now “The selected page ‘MyFirstModule.Page’ no longer exists”.
  • MySQL 5.7 and MariaDB 10.1 are now supported.

Fixes

  • When using the Modeler to merge changes from a Team Server branch line and then committing those changes, the Modeler would tell you that you needed to update your local copy of the model first, even though you were already up-to-date. From now on, this will only happen when you actually need to update.
  • When you connected to the internet using a proxy server that needed a username/password, it was not possible to sign in to the Modeler without first going to the Preferences dialog box to configure the proxy settings. This prevented some users from signing in, as the Modeler only allows you to open the Preferences dialog after the first successful sign-in. Now, the proxy settings can be configured directly from the Sign In dialog box, resolving this catch-22. (Ticket 45324)
  • When deploying an app as a Free App, it was necessary to install the AppCloud Service module to run the app. This is no longer necessary.
  • We made changes to Mendix Runtime to prevent it from blacklisting Refresh in Client events. This prevents Mendix Runtime from getting into a mode in which those instructions are no longer sent to the client. In addition, we ensured that the amount of events going through the system is reduced by ignoring the Refresh in Client instruction, in case the microflows are being run using a system context (which applies, for example, to scheduled events). Also, a warning is logged when the amount of feedback instructions (of which the Refresh in Client instructions are a subset) reaches a certain threshold (5000 items), because such an amount would render the client useless. (Tickets 47984, 48211, 48264, 48564, 49054, 48802)
  • Mendix Runtime will no longer start in acceptance/production mode when an admin user has a password of “1”.
  • When a web service call is invoked, a configuration file is read in the memory. This file was never released from the memory, thus causing a memory leak. In Mendix 7, we make sure that this configuration file is released from memory on each web service call. (Ticket 44624)
  • We fixed the issue in the Call Web Service action so that it now only evaluates advanced header and body parts if they have been checked. (Ticket 46950)
  • We fixed the issue with an empty enumeration attribute being sent as a 0-length string instead of xsi:nil in an app service call. (Ticket 465414)
  • We fixed the issue with an immutable list as the return of a web service call. (Ticket 46718)
  • We fixed the consistency error from a call web service action that occurred when no import mapping was defined in response.
  • We fixed numbers with leading zeros not being handled correctly when importing XML. (Ticket 45827)
  • We fixed the XML export of choice-with-inheritance. (Ticket 466380)
  • We added a consistency error for a call web service action when WSDL parameters are reordered. (Ticket 464695)
  • We added a consistency error for when a non-existing attribute is exposed in a published REST resource (for example, by changing your inheritance structure). (Ticket 48415)
  • We fixed the app service return type when using entities without attributes. (Ticket 43705)
  • We fixed the error in the Modeler that occurred when adding a consumed app service that contains untranslated enumerations.
  • We fixed the web service issue that occurred when a namespace is defined in the SOAP operation and this namespace should be used instead of the namespace defined in the schema. For an existing consumed web service user, if you encounter an error like “WSDLReader:None of the matching operations for soapAction … could successfully load the incoming request. Potential typemapper problem HRESULT=0x80070057: The parameter is incorrect.“, please re-import your WSDL. (Ticket 48851)
  • We fixed the importing of XML. When you find values by keys that contain special characters (like a quote), the system now updates the object instead of creating a new object. (Ticket 47441)
  • We fixed the unknown primitive types that should not be allowed for selection in the mapping. (Ticket 48903)
  • We fixed the issue in which enumerations without translations throw an error when importing an app service. (Ticket 48806)
  • We fixed the issue in which building a deployment package of your project in the Mendix Cloud resulted in an error (whereas building the package locally and then uploading it manually worked correctly). (Tickets 38372, 38506, 38256, 39943, 40344, 39989, 43819, 46883, 48796, 43854)

Deprecations

  • The mx.server.request client API method has been deprecated. We bet you never even knew it existed! If you did, be aware that it no longer handles validations. This responsibility has been moved to mx.data.
  • The MxContext methods setTrackId and setTrackEntity have been deprecated. Use the setContext method instead.

Breaking changes

NPE attribute-level security

We have prohibited NPE (non-persistent entity) attribute-level security for attributes that do not have at least read access. The reason for this is that non-readable attributes cannot be sent to the client. A separate object (which is not sent to the client at all) should be used for these attributes instead.

Autocommitted objects for system sessions

If you have two new objects referencing one another and you try to commit one of those, you should also commit the other one. If you don’t and you are running the microflow in a system session (for example, a scheduled event), you will now get an exception. Note that if you are running in a user session that is not required, we’ll handle it for you.

Sign-in microflows

Sign-in microflows are no longer supported, because they do not add any functionality. In a future version, the state will be automatically transferred from the anonymous user to the signed-in user by the client. In Mendix 7, having a sign-in microflow selected will result in a consistency check error. When this is solved by setting the microflow to None, the property will automatically disappear from the UI.

Methods removed from runtime API

The following methods from Session were obsolete and have been removed: retain, release, addToClientRoots, removeFromClientRoots, getClientRoots, getJavaActionRoots, and getData.

System.Statistics entity

The System.Statistics entity has been removed from the System module, as the entity has become obsolete with the introduction of stateless Runtime. The RuntimeStatistics page and the ViewStatistics microflow are automatically removed from your project when they are in their default location (in the Administration module). The Runtime Statistics menu item is also automatically removed.

Client API changes

  • The semantics have changed for MxObject.get and mx.parser.parseValue. They now return a value of an appropriate type (for example, Big for numbers, numbers for dates) instead of always returning a string. For more details, see the documentation for Class: mendix/lib/MxObject.
  • Support for dojo.require has been dropped. It never worked in hybrid apps, and we have now made it official. Write your custom widgets in the AMD style, as described in How to Create a Basic Hello World Custom Widget and the App Store Widget Boilerplate.
  • Dojo APIs exposed through the global dojo object are no longer supported, as they were never supposed to work in AMD widgets. Some of these APIs (for example, dojo.html) have already been removed, but others will be removed in the future without notice. So, use these at your own risk, or better yet, don’t use them at all!

Apply context and remove from context

The Apply context and Remove from context options of the reference selector, data grid, and template grid data sources were deprecated long ago (in Mendix 5.19.0), and they have now been removed. You will now get consistency errors in places where you used them. We suggest using explicit XPath constraints instead.

Client APIs deprecated since Mendix 5

These are the client APIs deprecated since Mendix 5 that have been removed or replaced:

  • mxui/dom.{p,div,span...} and mxui/dom.builder have been removed in favor of using mxui/dom.create
  • MxMetaObject.isNumber and MxObject.isNumber have been replaced with isNumeric methods
  • mxui/dom.{copyChildren,insertBefore,insertAfter} has been removed in favor of using plain dom APIs
  • mx.ui.hideLogin has been replaced with hide on the object returned by mx.ui.showLogin
  • The mx.login signature has been changed to mx.login(username, password, onLoginSucceed, onLoginFailure)
  • _WidgetBase.resume, _WidgetBase.suspend, and _FormBase.startup have been removed, as they had no effect

Split panes

We dropped support for the vertical and horizontal split pane widgets that have been deprecated since Mendix 6. From now on, these widgets will result in consistency errors in the Modeler. To smooth out the conversion path for you, we introduced a tool to convert existing split panes (one-by-one or all together) into layout grids. You can access the tool by right-clicking the consistency error message or from the Tools menu.

Note that while the tool is definitely awesome, it is not perfect. The resulting layout grids will not be able to dynamically resize (via the animated resize feature of the split panes, which is no longer supported in the platform), and the markup and scrolling behavior might be a bit different. So, please test your applications after updating to Mendix 7! (Do we really have to mention that?)

Legacy navigation layout

Support for navigation layouts of the Legacy type has been dropped. Layout types define how pages are opened in the web client: in a (modal) pop-up window or in the content. For navigation layouts of the Legacy type, that behavior was defined via the button (or microflow) opening the page, which could result in inconsistent behavior. All the navigation layouts of the Legacy type result in errors in the Modeler now.

For more information, see Layouts in the Mendix Reference Guide and the blog post titled Layouts Have Types.

Known issues

For known issues in this release, see Known Issues.

Copyright © Mendix. All rights reserved. | Mendix.com | Terms of Use | Privacy Policy