Ciphix Token Replacer

Content Type: Module
Categories: Utility,Data,Communication

Overview

The Ciphix Token Replacer is all you need to get app data into texts. Examples are e-mails (mail merge) and letters. The Ciphix Token Replacer makes it easier to set it up as a developer and to maintain or edit the tokens as an administrator. Although some knowledge of the domain model is good to have, the administrator pages have certain usability features built-in, in which tokens are easier to configure correctly.

Documentation

Description

The Ciphix Token Replacer is all you need to get app data into texts. Examples are e-mails (mail merge) and letters. The Ciphix Token Replacer makes it easier to set it up as a developer and to maintain or edit the tokens as an administrator. 

Although some knowledge of the domain model is good to have, the administrator pages have certain usability features builtin, in which tokens are easier to configure correctly.

 

Typical usage scenario

This module is perfect for applying advanced tokens in texts, which makes it easy to use free formatted templates for both e-mails and letters. Also, this can be applied to contextual texts in the application itself, where account (related) specific data needs to be presented to the user.

 

Features and limitations

  • Used the new Atlas UI.
  • Works from one top value object (any Mendix object).
  • Is language-dependent, but can by any language. Useful for enumerations, dates, and decimals → e.g. localizations).
  • Can reach the entire domain model as long if there are associations.
  • Can make use of specializations.
  • Works with lists that are sortable. Comes in handy when parsing multiple child objects, like order lines or invoice lines. Sorting can be applied to strings, dates, decimals and integers or longs.
  • (Supported from 1.5 and up: nested lists and associated object tokens)
  • Use the following tokens to activate the list functionality:
  • {%LIST_START%} … some text with tokens to be duplicated per instance … {%LIST_END%}
  • Specific formatting for specific data types.
  • Decimals: Grouping, number of decimals;
  • Strings: Escape HTML;
  • Dates: Specific format;
  • Content parser to apply specific logic based on the key-value stored in the attribute to use in the token replacement. Useful i.e. for correspondence headings, like 'Dear [MALE -> Mr.] or [FEMALE -> Mrs.]' and this is also language-dependent.
  • Specific logging is applied in INFO, DEBUG, AND TRACE which makes it easier to understand as a developer what's happening.
  • Works completely with both persistent entities and non-persistent entities.
  • The ability to export en import any token replacer definition.
  • Abilty to apply system tokens like object id, configuration key like application url or constants. This provides for example deeplinks builds out-of-the-box.
  • Added more after startup helpers that can be used for specific data type and system tokens.

 

Dependencies

  • 7.13.1 and up
  • MxModelReflection
  • Included libraries as of 2.2.1:
  • commons-text-1.10.0
  • commons-lang3-3.12.0

 

Installation

Use the _USE_ME-folder for integration in the application.

  • Place TokenReplacer_Start in navigation.
  • Use the Java-action ReplaceTokens to apply the logic or the microflow activity ‘Replace tokens’
  • Use the after startup helpers to generate tokens on startup or import a definition with json.
  • Use the exposed microflow actions for more convenient implementation.

 

Configuration

At least make sure the MxModelReflection is synchronized for all modules to be used for tokens.

 

Known bugs

-

 

Future enhancements

  • Let me know!

 

Frequently Asked Questions [optional]

  • Q: Can I use this for multiple lists?
  • A: Yes, the Ciphix Token Replacer works with multiple lists and also with multiple nested lists.

Releases

Version: 3.7.1
Framework Version: 10.18.0
Release Notes: Show parent object name if needed for extra clarity (e.g. "System.Owner" associations)
Version: 3.7.0
Framework Version: 10.18.0
Release Notes: UI updated so that the module can now also be used in projects using the React client.
Version: 3.6.1
Framework Version: 10.18.0
Release Notes: 3.6.1 - 2025/01/21 - upgrade for modelreflection - adjusted 'GetDataTypeFromPrimitiveType'
Version: 3.4.0
Framework Version: 10.12.5
Release Notes: Updated to Mendix 10 MTS (10.12.5) and all depencies moved from Userlib to managed dependencies.
Version: 3.3.0
Framework Version: 10.0.0
Release Notes: - Added option to keep list tokens, so the same text can be applied multiple times with different token replacers. - Added fix to processing logic, where lists determination was not correct. - Updated deprecated functions in Java.
Version: 3.2.0
Framework Version: 10.0.0
Release Notes: - Improved validation to accommodate an empty value better and returning an empty string that works also in specific situations.
Version: 3.1.0
Framework Version: 10.0.0
Release Notes: - Update to latest Atlas UI version. - Enhanced and updated pages and styling to have an improved UX.
Version: 3.0.0
Framework Version: 10.0.0
Release Notes: - Upgraded to Mendix 10.
Version: 2.5.0
Framework Version: 9.24.3
Release Notes: - Added option to keep list tokens, so the same text can be applied multiple times with different token replacers. - Added fix to processing logic, where lists determination was not correct. - Updated deprecated functions in Java.
Version: 2.4.0
Framework Version: 9.24.3
Release Notes: - Improved validation to accommodate an empty value better and returning an empty string that works also in specific situations.