MxValidator

Content Type: Module
Categories: Tracing

Overview

This module provides the developer with creating, managing and executing validation rules of any entity data persisted within the given development environment. This capability helps to identify data defects raised by the discrepancies between the formerly created/generated data and the continuously changing data constraints produced by the iterative development approach.

Before diving to analyze an undesired behavior of your new function, I suggest applying this module and running your existent validation flows on your data. Maybe your new function is perfect, and you should care for your obsolete data instead!

Documentation

Description

This module provides the developer with creating, managing and executing validation rules of any entity data at the used environment. This capability helps to identify data integration defects caused by the continuously changing if the DB schema of the application.

Typical usage scenario

You are developing the application which is continuously changing the entity structure and the constraining rules. However these changes are not reflected in the formerly created and stored entity instances. These instances are left in the Mendix environment and will cause unexpected results and false alarms relating to the developed functions because the new function is not prepared to handle invalid data.

This situation can be helped by identifying the data that became invalid because they can prevent an unnecessary investigation and/or allow you to manage these data properly. 

Features and limitations

  • Create and manage validation rules per entity type.
  • Execute validation rule built by an XPath expression. (The XPath specifies the invalid instances.)
  • Execute validation rule built by referring to a validation MF. Error results include validation feedback messages.
  • Export error entries to Excel file.
  • Export/Import validation rules to/from XML.

Dependencies

This module is compatible with the Mendix v9.24.0.

Required external modules:

Installation

  1. Import the MxValidator module from the Mendix MarketPlace.
  2. Assign necessary application user role(s) to the ‘User’ module role. The application developer users need access to this module to manage and use validation rules. (The purpose of the ‘Developer’ module role relates to the development of this module.)
  3. Add the ‘SUB_InitMxValidator’ to the application main ‘After Startup’ MF, or assign this MF for it.
  4. Add the ‘ValidationRule_Overview’ page to the application UI with navigation flow which allows the developer to access it.
  5. Login to the application with a developer user and start to manage validation rules:
    • select all the module into the scope of reflection that include the entity to be validated (Assumed that the Mx Model reflection is already integrated into the application accordingly);
    • navigate to the validation rules overview and then start to create and run validation rules.

Configuration

You can configure the module capabilities by means of the following environment constants:
  • ValidationReportTemplateFilePath: the path of the XML file containing the exported content of the ‘ValidationReport’ template.
  • ValidationReportTemplateName: the name of the excel export template that the module applies to generate validation report excel files.

Known bugs/issue

Not yet. 🙂

Please use the ‘User reviews’ channel of this module at the Mendix Marketplace to report any issue you experience. Thanks!

 

Releases

Version: 1.0.0
Framework Version: 9.24.0
Release Notes: First public release.