Aller au contenu

Mappers

Dernière révision : 28 octobre 2026 · Nouveautés de la plateforme

En bref XML, JSON, CSV et messages financiers ramenés au format pivot par un mapper, champ par champ, et lisibles en blocs.

Mapper en vue Blocs

L'éditeur de mappers décrit un mapping : comment un message source — XML, JSON, CSV ou objet du projet — alimente, champ par champ, l'objet qu'un flux construit. Il s'ouvre sur un modèle de type « Mapping », rangé dans le dossier « Mappers » d'un projet application.

Créer un mapping

Dans le projet, « Actions » puis « Ajouter une ressource » : type « Data mapper », nom, clé et description, puis enregistrement de la ressource. Le mapping créé est vide ; il se remplit dans l'éditeur, en mode édition.

Les zones de l'écran

ZoneContenu
Barre d'outilsles trois vues « Correspondances », « Blocs » et « XML » ; hors vue XML, les boutons qui affichent ou masquent la structure source et la structure cible ; le compteur « Couverture » (champs cible alimentés sur le total) ; le résultat des contrôles (« Aucun problème », ou le nombre d'erreurs et d'avertissements) ; « Essayer » ; « Raccourcis clavier ». En lecture seule, une pastille « Lecture seule » s'y ajoute.
Source (à gauche)la structure du message reçu, avec un filtre « Filtrer les champs ». Un champ déjà employé porte une coche ; un champ répété (liste) porte le badge « [ ] ».
Centrela vue choisie.
Cible (à droite)la structure de l'objet construit.
Propriétés (à droite, vue Blocs)l'élément sélectionné et ses attributs.
Tiroir du basles onglets « Contrôles », « Essai » et « Raccourcis clavier ».

Les structures source et cible ne sont côte à côte que dans la vue Correspondances, où leurs champs se glissent sur les lignes. La vue Blocs les ouvre à la demande, en tiroir par-dessus les blocs, et la vue XML occupe toute la largeur.

Les colonnes source et cible se redimensionnent par leur séparateur, à la souris ou aux flèches du clavier, entre 200 et 560 px. La disposition choisie est retenue par le navigateur.

Choisir la source et la cible

  1. « Choisir la structure », dans le panneau Source, propose toutes les structures du projet : ses classes, les éléments de ses schémas XSD, les entités de ses services OData (un enregistrement lu en JSON) et ses fichiers texte, lus comme des échantillons. Le champ « Filtrer par nom, clé ou type » réduit la liste à ce qui contient chacun des mots tapés : « fpml swap » garde les classes du paquet FpML dont le nom contient « swap », « XSD » les éléments de schéma. Sous le nom d'une classe, son nom complet distingue deux classes de même nom. Côté cible, le même bouton et le même filtre proposent les classes du projet et les éléments de ses schémas XSD, dont la classe est alors générée.
  2. Un échantillon peut aussi être collé dans la zone « Collez un échantillon XML, JSON ou CSV », puis validé par « Utiliser cet échantillon ». Le format est reconnu tout seul ; pour un CSV, le séparateur aussi (virgule, point-virgule, tabulation ou barre verticale).
  3. « Retirer la structure » efface le choix.
  4. Côté cible, un mapping vide affiche « Ce mapping ne produit encore rien » et le bouton « Créer le bloc de correspondances ». Le champ « Objet construit » reçoit ensuite le nom complet de la classe produite ; ses champs apparaissent alors dans la grille et dans le panneau Cible.

Alimenter les champs

La vue « Correspondances » montre une grille : une ligne par champ de l'objet construit, alimenté ou non, avec sa « Source » et son « Champ cible ». Une ligne s'alimente de quatre façons :

  • glisser un champ de la source sur la ligne ;
  • cliquer la ligne, puis cliquer le champ source ;
  • glisser un champ source sur un champ du panneau Cible ;
  • choisir dans la liste « Source » de la ligne : champs source, variables du mapping, paramètres du template ouvert, templates, « Valeur ou expression… », ou « — non alimenté — ».

Pour une source XML, l'éditeur crée l'extraction du champ et y fait référence ; pour les autres formats, l'expression est écrite telle quelle. La barre de la grille porte un filtre « Filtrer les correspondances » et la case « Non alimentés ». « Alimenter ce champ » crée la correspondance d'un champ manquant, « Ajouter une correspondance » une ligne libre, et le menu « Actions de la ligne » (⋮) ouvre une ligne dans les blocs ou la retire (« Retirer »). Une ligne trop complexe pour la grille affiche « Expression complexe » et le bouton « Ouvrir dans les blocs ».

Les templates

Un template regroupe des mappings réutilisables ; il est déclaré en tête du mapping et s'appelle depuis une ligne, avec une valeur par paramètre.

Ajouter un template

  1. Depuis une ligne : liste « Source », puis « + Nouveau template… ». Le dialogue propose un nom (mapNomDuChamp), un paramètre par sous-champ de la cible, une sortie « objet » quand le champ est structuré, et la classe construite.
  2. Depuis le sélecteur « Correspondances affichées », en haut de la grille : « + Nouveau template… » crée un template indépendant.
  3. Le dialogue « Nouveau template » demande le « Nom du template », ses « Paramètres » (chacun devient une variable lisible dans le template), et « Ce que renvoie le template » : « Un objet construit champ par champ » (avec sa « Classe construite ») ou « Une valeur ».
  4. « Créer le template » le déclare et, depuis une ligne, remplace la valeur de la ligne par un appel au template ; l'ancienne valeur passe au paramètre du même nom. « Annuler » ne change rien.

Travailler dans un template

Le sélecteur « Correspondances affichées » passe du « Résultat du mapping » à un template. La grille montre alors les champs de l'objet que le template construit, ses paramètres et le nombre de correspondances qui l'appellent. « Revenir au résultat du mapping » ramène à la grille principale ; le menu « Actions du template » (⋮) propose « Renommer le template ou lui ajouter des paramètres », qui met à jour tous les appels, « Ouvrir dans les blocs » et, à part, « Supprimer le template », qui demande confirmation et prévient quand il est encore appelé. Sur une ligne qui appelle un template, le bouton « n paramètre(s) » déplie la valeur de chaque paramètre.

La vue Blocs

La vue « Blocs » montre le document entier, un bloc par élément, et chaque bloc se lit comme une phrase : « Variable currency = XPATH …/notionalStepSchedule/currency dans stream », « Correspondance tradeBook ← var portfolio ». La valeur qu'un élément contient s'écrit dans sa ligne, précédée de son genre (XPATH, JSONPATH, EXPR, VAR, ENTRÉE) ; un long chemin se dit par ses dernières étapes et s'affiche en entier dans son infobulle. Un clic sur la valeur la sélectionne, pour la modifier dans les propriétés.

À l'ouverture, le document est déplié jusqu'à ses déclarations : les templates, les variables et la sortie, et ce que contient chaque template. Le reste est plié, et un bloc plié dit ce qu'il contient : l'élément unique qu'il porte (par exemple « Bloc de correspondances pivot.SwapLeg »), ou le nombre d'éléments. Le chevron du bloc le plie et le déplie, comme les flèches → et ← sur un bloc qui a le focus. Une petite tuile de couleur donne la famille de chaque bloc : template, variable, lecture d'un format, condition ou boucle, sortie, appel.

Un bloc alimenté par un champ source le dit : « alimenté par … », même quand la valeur passe par des variables. Glisser un champ de la source sur une correspondance, un paramètre ou une variable l'alimente, comme dans la grille : l'extraction est déclarée une fois et réutilisée. La structure source s'ouvre pour cela en tiroir par-dessus les blocs, par son bouton dans la barre d'outils, et s'efface pendant le glisser. On peut aussi sélectionner le bloc, ouvrir la source, puis cliquer ou toucher le champ : le tiroir se referme sur le bloc alimenté. Un élément qui appelle un template, ou qui se trouve dans un template, ne prend pas de champ : un template ne voit que ses paramètres.

La « Palette », à droite des blocs, se range en trois groupes : « Courant » (bloc de correspondances, correspondance, valeur, référence, variable, choix et ses branches, boucle « pour chaque », sortie), « Avancé » (templates, appels, boucle conditionnelle, « Essayer et rattraper » et ses cas d'erreur, erreur levée, appel de code) et « Formats » (lecture et écriture XML, messages financiers, écriture Excel). Elle n'offre que ce que le moteur sait exécuter. Un clic ajoute l'élément dans l'élément sélectionné (le document lui-même quand rien ne l'est), à la place que le schéma lui impose (templates en tête, sortie en dernier) ; on peut aussi le glisser dans les blocs. Les éléments que l'élément sélectionné ne peut pas recevoir restent visibles mais désactivés, et leur infobulle dit pourquoi : élément qui ne contient rien, élément non accepté à cet endroit, ou place déjà prise (une seule sortie, une seule valeur par correspondance).

Le panneau « Propriétés », à droite, modifie l'élément sélectionné. Un attribut qui désigne un champ se remplit aussi par un clic sur ce champ dans la structure source ou cible, ouverte en tiroir. Le bouton « Actions de l'élément » (⋮) de chaque bloc propose « Monter », « Descendre » et, à part, « Retirer » ; un bloc qui en contient d'autres demande confirmation avant d'être retiré avec eux. Un bloc se déplace aussi par sa poignée ou par Alt+↑ et Alt+↓, jamais au-delà de la place que le schéma lui impose. En lecture seule, rien ne se modifie.

La vue XML

La vue « XML » montre le document en texte, modifiable en édition. En quittant la vue, le texte est relu ; s'il est illisible, la vue reste ouverte avec le message « Ce XML ne peut pas être lu. Corrigez-le pour quitter la vue XML : rien n'a été perdu. ».

Essayer le mapping

Un mapping construit les classes de son application, appelle son code et ses dépendances : seul un moteur qui a l'application les a tous. L'essai se fait donc sur un moteur de l'organisation, mais il ne passe par aucun flux : le moteur lit le fichier du mapping et l'exécute lui-même sur l'échantillon. Aucune route n'est appelée, aucun message n'est émis ni consommé, rien n'est écrit dans une file, une boîte de dépôt, une base ou le journal de l'application, et le résultat ne part nulle part.

  1. « Essayer » ouvre l'onglet « Essai » du tiroir. La zone d'échantillon est préremplie avec l'échantillon de la source quand il y en a un.
  2. « Moteur cible » propose les moteurs démarrés de l'organisation : en tête, et choisis par défaut, ceux où l'application est déjà installée (« application déjà installée ») ; ensuite les autres. Le moteur choisi est retenu pour l'application, sauf s'il ne la porte pas alors qu'un autre la porte. Sous la liste, le panneau dit ce que l'essai fera sur ce moteur.
  3. « Lancer l'essai » (ou Ctrl+Entrée) compare d'abord l'état enregistré du projet à l'application installée sur le moteur, puis essaie le mapping selon l'un des modes ci-dessous. Les étapes s'affichent pendant l'essai.
  4. Le résultat affiche la classe produite, la durée et l'objet obtenu en JSON ; un échec affiche son statut (« Le mapping a échoué », « Essai impossible ») et ses diagnostics. Une dernière ligne dit ce que l'essai a fait sur le moteur.

Les modes d'essai

ModeQuandMapping exécutéCe qui est touché
Sur l'application à jourle moteur exécute déjà l'état enregistrécelui de l'application installée, qui est l'état enregistrérien : ni construction ni installation, l'application continue de tourner
À partl'application n'est pas installée sur le moteur, ou vous choisissez « Essayer à part »celui de l'état enregistré, ouvert à part par le moteurrien de ce qui tourne : la première fois, une construction d'essai est faite (une à deux minutes), installée nulle part, puis réutilisée tant que l'état enregistré ne change pas
Sur la version installéevous choisissez « Essayer la version installée »celui de la version en place, qui peut différer de ce que montre l'éditeurrien
Après remplacementvous choisissez « Remplacer et essayer »celui de l'état enregistré, une fois installécomme une publication : construction, enregistrement des portées, installation à la place de la version en place

Quand une autre version de l'application est installée sur le moteur — par une publication, un pipeline ou un essai précédent —, ou que le moteur ne dit pas laquelle, rien n'est touché avant votre réponse au dialogue « Une autre version de l'application est installée ». Il donne la date d'installation de la version en place, dit pourquoi elle n'est pas tenue pour l'état enregistré, et propose « Essayer à part », « Essayer la version installée » (si ses flux tournent), « Remplacer et essayer » et « Annuler », sur lequel le dialogue s'ouvre.

Ce que l'essai touche, et ce qu'il ne touche pas

  • Flux de l'application installée : ils continuent de tourner dans tous les modes, sauf après remplacement. Remplacer arrête l'application, la désinstalle, installe l'état enregistré et le démarre : ses consommateurs (files, Kafka, boîtes de dépôt, sondes) s'arrêtent le temps du redémarrage — environ une minute pour une application comme tradecapture — puis reprennent avec l'état enregistré.
  • Configuration : l'essai lui-même ne lit pas la configuration de l'application ; à part, rien ne démarre, le serveur de configuration et le coffre ne sont pas sollicités. Après remplacement, l'application relit sa configuration à son démarrage, comme après une publication.
  • Portées et droits : seul le remplacement enregistre les portées de l'application, comme une publication. Les autres modes n'en déclarent ni n'en modifient aucune.
  • Données : l'essai n'écrit ni n'efface aucune donnée de l'application. Après remplacement, l'application redémarrée reprend son travail sur ses données avec l'état enregistré, exactement comme après une publication de cet état.
  • Dépôt Maven partagé : la construction d'essai y est rangée sous une version distincte (<version>-TRIAL-SNAPSHOT) ; la version publiée, celle qu'un moteur réinstallerait, n'est pas touchée. Le remplacement, lui, construit et installe la version publiée.

Dans tous les modes, le mapping s'exécute seul : sans l'échange Camel qui le porterait dans un flux (ni en-têtes ni propriétés), sans connexion à une base ou à une file. Il dispose de ses classes, de celles que génère le projet, du code personnalisé et des dépendances de l'application. À part, c'est tout ce qu'il a ; sur une application installée, il voit aussi ce que l'application démarrée a pu mettre en place dans ses classes, un état statique d'un code personnalisé par exemple.

Pour reconnaître l'état enregistré, le studio inscrit dans chaque application qu'il construit une empreinte de ce qui la compose (en-tête Clomoon-Revision de son manifeste), que le moteur restitue. Une application construite avant cette empreinte, ou installée sur un moteur qui ne la restitue pas, n'est jamais tenue pour à jour. Le moteur garde ouvertes quelques constructions d'essai (trois au plus, la dernière de chaque application) et les efface à son arrêt.

L'essai exécute ce qui est enregistré : tant qu'une modification n'est pas enregistrée, le bouton est désactivé et le dit. Sans moteur démarré dans l'organisation, il est désactivé lui aussi, avec le nom et le code de l'organisation et le lien « Créer un moteur ». Il faut le droit de déployer sur le moteur (écriture d'infrastructure dans son organisation). L'exécution est bornée à dix secondes, à un échantillon de 512 Kio et à deux essais à la fois par moteur.

Contrôles

Les contrôles se mettent à jour à chaque modification. Un clic sur un message amène à la ligne ou à l'élément concerné ; « Corriger » applique les corrections sûres (réordonner une branche, ajouter un paramètre manquant).

MessageSens
Le champ « … » n'est alimenté par rien : l'exécution échouera.une correspondance sans valeur
Le champ cible « … » est alimenté deux fois.deux lignes visent le même champ
« … » n'existe pas sur « … ».le champ n'appartient pas à la classe construite
« … » n'existe pas dans « … ».le chemin source n'existe pas dans la structure source (avertissement)
Le template « … » est appelé mais n'est pas déclaré.appel orphelin, par exemple après une suppression
Le template « … » attend le paramètre « … », qui n'est pas fourni.paramètre manquant dans un appel (corrigeable)
« … » est déclaré mais jamais lu.variable ou extraction inutilisée (avertissement)
La branche « otherwise » doit venir en dernier.ordre d'une condition (corrigeable)

Raccourcis clavier

TouchesEffet
Alt+1, Alt+2, Alt+3vues Correspondances, Blocs, XML
Ctrl+F ou ⌘+Frechercher dans la grille, ou dans la structure ouverte en tiroir (la vue XML garde sa propre recherche)
Ctrl+Entréeexécuter l'essai
Alt+↑, Alt+↓monter ou descendre le bloc sélectionné
→, ←déplier ou plier le bloc qui a le focus
Échapfermer le tiroir du bas, puis le panneau latéral

Enregistrement

Le mapping n'est marqué modifié que si le document produit diffère de celui qui est enregistré : une modification dans la grille, les blocs, les propriétés ou le texte XML, une correction, ou le choix de la structure source, retenu avec le modèle. L'ouverture, le changement de vue, la sélection, les filtres et l'essai ne marquent rien. L'outil « Exporter le modèle » télécharge le document en XML ; « Importer une nouvelle version » (mode édition) le remplace par un fichier.

En lecture seule, les vues, la navigation dans les templates, les filtres, les contrôles, l'essai et le redimensionnement restent disponibles ; la palette, les glisser-déposer, les suppressions, le choix de structure et les corrections disparaissent, et les listes de source deviennent du texte.

Sur téléphone et tablette

  • À partir de 960 px, la vue Correspondances montre ses trois colonnes côte à côte, et la vue Blocs garde les propriétés à côté des blocs.
  • Entre 600 et 959 px, les structures source et cible s'ouvrent en tiroirs par-dessus la grille ; un toucher à côté les ferme.
  • Sous 600 px, un seul panneau est affiché à la fois, choisi par la commande « Source » / vue courante / « Cible ». Les lignes de la grille deviennent des cartes et le tiroir du bas passe en plein écran. Après le choix d'une ligne, un bandeau « Choisissez un champ : il alimentera « … ». » et le bouton « Choisir dans la source » guident le geste.
  • Au doigt, un champ ne se glisse pas : on touche la ligne, puis le champ source qui l'alimente.
  • Sous 960 px, les propriétés de la vue « Blocs » s'ouvrent en tiroir, avec la structure cible.
La syntaxe complète d'un mapper, ses lectures XML, JSON, FIX et MT, ses expressions et les messages de ses contrôles : Syntaxe des mappers.
Documentation de la plateforme Clomoon, éditée par Clover Consulting · Mentions légales · Confidentialité · Contact
Skip to content

Mappers

Last revised 28 October 2026 · Platform changelog

In short XML, JSON, CSV and financial messages brought to the pivot format by a mapper, field by field, and readable as blocks.

Mapper in the Blocks view

The mapper editor describes a mapping: how a source message — XML, JSON, CSV or an object of the project — feeds, field by field, the object a flow builds. It opens on a model of type “Mapping”, kept in the “Mappers” folder of an application project.

Creating a mapping

In the project, “Actions” then “Add new resource”: type “Data mapper”, name, key and description, then the resource is saved. The new mapping is empty; it is filled in the editor, in edit mode.

The areas of the screen

AreaContent
Toolbarthe three views “Mappings”, “Blocks” and “XML”; outside the XML view, the buttons showing or hiding the source structure and the target structure; the “Coverage” counter (target fields populated out of the total); the result of the checks (“No issue”, or the number of errors and warnings); “Try”; “Keyboard shortcuts”. Read-only, a “Read-only” pill is added.
Source (left)the structure of the received message, with a “Filter fields” filter. A field already used shows a tick; a repeated field (list) shows the “[ ]” badge.
Centerthe chosen view.
Target (right)the structure of the built object.
Properties (right, Blocks view)the selected element and its attributes.
Bottom drawerthe “Checks”, “Trial run” and “Keyboard shortcuts” tabs.

The source and target structures sit side by side only in the Mappings view, where their fields are dragged onto rows. The Blocks view opens them on demand, as drawers over the blocks, and the XML view takes the whole width.

The source and target columns are resized by their separator, with the mouse or the keyboard arrows, between 200 and 560 px. The chosen layout is remembered by the browser.

Choosing the source and the target

  1. “Choose the structure”, in the Source panel, offers every structure of the project: its classes, the elements of its XSD schemas, the entities of its OData services (a record read as JSON) and its text files, read as samples. The “Filter by name, key or type” field narrows the list to what holds each word typed: “fpml swap” keeps the classes of the FpML package whose name holds “swap”, “XSD” the elements of schemas. Under the name of a class, its full name tells two classes of the same name apart. On the target side, the same button and the same filter offer the classes of the project and the elements of its XSD schemas, whose class is then generated.
  2. A sample can also be pasted in the “Paste an XML, JSON or CSV sample” area, then confirmed with “Use this sample”. The format is recognized by itself; for a CSV, so is the separator (comma, semicolon, tab or vertical bar).
  3. “Remove the structure” clears the choice.
  4. On the target side, an empty mapping shows “This mapping produces nothing yet” and the “Create the mapping block” button. The “Built object” field then takes the full name of the class produced; its fields appear in the grid and in the Target panel.

Feeding the fields

The “Mappings” view shows a grid: one row per field of the built object, populated or not, with its “Source” and its “Target field”. A row is populated in four ways:

  • drag a source field onto the row;
  • click the row, then click the source field;
  • drag a source field onto a field of the Target panel;
  • pick in the “Source” list of the row: source fields, mapping variables, parameters of the open template, templates, “Value or expression…”, or “— not mapped —”.

For an XML source, the editor creates the extraction of the field and refers to it; for the other formats, the expression is written as is. The grid bar holds a “Filter the mappings” filter and the “Not fed” box. “Feed this field” creates the mapping of a missing field, “Add a mapping” a free row, and the “Line actions” menu (⋮) opens a row in the blocks or removes it (“Remove”). A row too complex for the grid shows “Complex expression” and the “Open in the blocks” button.

Templates

A template gathers reusable mappings; it is declared at the top of the mapping and is called from a row, with one value per parameter.

Adding a template

  1. From a row: “Source” list, then “+ New template…”. The dialog suggests a name (mapFieldName), one parameter per sub-field of the target, an “object” output when the field is structured, and the built class.
  2. From the “Mappings shown” selector, at the top of the grid: “+ New template…” creates a standalone template.
  3. The “New template” dialog asks for the “Template name”, its “Parameters” (each becomes a variable readable in the template), and “What the template returns”: “An object built field by field” (with its “Built class”) or “A value”.
  4. “Create the template” declares it and, from a row, replaces the value of the row with a call to the template; the former value goes to the parameter of the same name. “Cancel” changes nothing.

Working inside a template

The “Mappings shown” selector switches from the “Mapping result” to a template. The grid then shows the fields of the object the template builds, its parameters and the number of mappings calling it. “Back to the mapping result” returns to the main grid; the “Template actions” menu (⋮) offers “Rename the template or add parameters to it”, which updates every call, “Open in the blocks” and, set apart, “Delete the template”, which asks for confirmation and warns when it is still called. On a row calling a template, the “n parameter(s)” button unfolds the value of each parameter.

The Blocks view

The “Blocks” view shows the whole document, one block per element, and each block reads as a sentence: “Variable currency = XPATH …/notionalStepSchedule/currency from stream”, “Mapping tradeBook ← var portfolio”. The value an element holds is written in its line, after its kind (XPATH, JSONPATH, EXPR, VAR, INPUT); a long path is shown by its last steps and in full in its tooltip. A click on the value selects it, to change it in the properties.

When it opens, the document is unfolded down to its declarations: the templates, the variables and the output, and what each template holds. The rest is folded, and a folded block says what it holds: the single element it holds (for instance “Mapping block pivot.SwapLeg”), or the number of elements. The chevron of a block folds and unfolds it, as do the → and ← keys on a focused block. A small colored tile gives the family of each block: template, variable, format reading, condition or loop, output, call.

A block populated by a source field says so: “fed by …”, even when the value goes through variables. Dragging a field of the source onto a mapping, a parameter or a variable feeds it, as in the grid: the extraction is declared once and reused. The source structure opens for that as a drawer over the blocks, with its button in the toolbar, and steps aside during the drag. The block can also be selected, the source opened, and the field clicked or tapped: the drawer closes on the populated block. An element calling a template, or inside a template, takes no field: a template only sees its parameters.

The “Palette”, on the right of the blocks, comes in three groups: “Common” (mapping block, field mapping, value, reference, variable, choice and its branches, “for each” loop, output), “Advanced” (templates, calls, conditional loop, “Try and catch” and its error cases, raised error, code call) and “Formats” (XML reading and writing, financial messages, Excel writing). It only offers what the engine can run. A click adds the element to the selected element (the document itself when none is selected) at the place the schema requires (templates first, output last); it can also be dragged into the blocks. The elements the selected element cannot hold stay visible but disabled, and their tooltip says why: an element that holds nothing, an element not accepted there, or a place already taken (a single output, a single value per mapping).

The “Properties” panel, on the right, changes the selected element. An attribute naming a field can also be filled by a click on that field in the source or target structure, opened as a drawer. The “Element actions” button (⋮) of each block offers “Move up”, “Move down” and, set apart, “Remove”; a block holding others asks for confirmation before being removed with them. A block is also moved with its handle or with Alt+↑ and Alt+↓, never beyond the place the schema requires. In read-only mode, nothing changes.

The XML view

The “XML” view shows the document as text, editable in edit mode. When leaving the view, the text is read again; if it cannot be read, the view stays open with the message “This XML cannot be read. Fix it to leave the XML view: nothing has been lost.”.

Trying the mapping

A mapping builds the classes of its application, calls its code and its dependencies: only an engine that has the application holds them all. The trial therefore runs on an engine of the organization, but it goes through no flow: the engine reads the mapping file and runs it itself on the sample. No route is called, no message is sent nor consumed, nothing is written to a queue, a drop box, a database or the journal of the application, and the result goes nowhere.

  1. “Try” opens the “Trial run” tab of the drawer. The sample area is prefilled with the sample of the source when there is one.
  2. “Target engine” offers the started engines of the organization: first, and chosen by default, those where the application is already installed (“application already installed”); then the others. The engine chosen is remembered for the application, unless it does not carry it while another one does. Below the list, the panel says what the trial will do on that engine.
  3. “Run the trial” (or Ctrl+Enter) first compares what is saved of the project with the application installed on the engine, then tries the mapping in one of the modes below. The steps show while the trial runs.
  4. The result shows the class produced, the duration and the object obtained as JSON; a failure shows its status (“The mapping failed”, “Trial not possible”) and its diagnostics. A last line says what the trial did on the engine.

The trial modes

ModeWhenMapping runWhat is touched
On the up-to-date applicationthe engine already runs what is savedthe one of the installed application, which is what is savednothing: no build, no install, the application keeps running
Apartthe application is not installed on the engine, or you choose “Try apart”the one of what is saved, opened apart by the enginenothing that runs: the first time, a trial build is made (one to two minutes), installed nowhere, then reused as long as what is saved does not change
On the installed versionyou choose “Try the installed version”the one of the version in place, which may differ from what the editor showsnothing
After replacingyou choose “Replace and try”the one of what is saved, once installedas a publication: build, registration of the scopes, install in place of the version installed

When another version of the application is installed on the engine — by a publication, a pipeline or an earlier trial —, or the engine does not say which one, nothing is touched before you answer the dialog “Another version of the application is installed”. It gives the date the version in place was installed, says why it is not taken for what is saved, and offers “Try apart”, “Try the installed version” (when its flows run), “Replace and try” and “Cancel”, on which the dialog opens.

What the trial touches, and what it does not

  • Flows of the installed application: they keep running in every mode but after replacing. Replacing stops the application, uninstalls it, installs what is saved and starts it: its consumers (queues, Kafka, drop boxes, pollers) stop while it restarts — about a minute for an application such as tradecapture — then resume with what is saved.
  • Configuration: the trial itself does not read the configuration of the application; apart, nothing starts, the configuration server and the vault are not called. After replacing, the application reads its configuration again when it starts, as after a publication.
  • Scopes and rights: only replacing registers the scopes of the application, as a publication does. The other modes declare and change none.
  • Data: the trial writes and deletes no data of the application. After replacing, the restarted application resumes its work on its data with what is saved, exactly as after a publication of it.
  • Shared Maven repository: the trial build goes there under a version of its own (<version>-TRIAL-SNAPSHOT); the published version, the one an engine would install again, is not touched. Replacing, for its part, builds and installs the published version.

In every mode, the mapping runs on its own: without the Camel exchange that would carry it in a flow (no headers, no properties), without a connection to a database or a queue. It has its classes, those the project generates, the custom code and the dependencies of the application. Apart, that is all it has; on an installed application, it also sees what the started application may have set up in its classes, a static state of custom code for instance.

To recognize what is saved, the studio writes in every application it builds a fingerprint of what it is made of (the Clomoon-Revision header of its manifest), which the engine reports. An application built before that fingerprint, or installed on an engine that does not report it, is never taken for up to date. The engine keeps a few trial builds open (three at most, the latest of each application) and deletes them when it stops.

The trial runs what is saved: as long as a change is not saved, the button is disabled and says so. Without a started engine in the organization it is disabled too, with the name and code of the organization and the “Create an engine” link. It takes the right to deploy on the engine (infrastructure write in its organization). The run is bounded to ten seconds, a sample of 512 KiB and two trials at a time per engine.

Checks

The checks are updated at each change. A click on a message leads to the row or element concerned; “Fix” applies the safe fixes (reordering a branch, adding a missing parameter).

MessageMeaning
Field “…” is fed by nothing: the run will fail.a mapping without a value
Target field “…” is written twice.two rows aim at the same field
“…” does not exist on “…”.the field does not belong to the built class
“…” does not exist in “…”.the source path does not exist in the source structure (warning)
Template “…” is called but not declared.orphan call, for instance after a deletion
Template “…” expects parameter “…”, which is not supplied.missing parameter in a call (fixable)
“…” is declared but never read.unused variable or extraction (warning)
The “otherwise” branch must come last.order of a condition (fixable)

Keyboard shortcuts

KeysEffect
Alt+1, Alt+2, Alt+3Mappings, Blocks, XML views
Ctrl+F or ⌘+Fsearch the grid, or the structure opened as a drawer (the XML view keeps its own search)
Ctrl+Enterrun the trial
Alt+↑, Alt+↓move the selected block up or down
→, ←unfold or fold the focused block
Escapeclose the bottom drawer, then the side panel

Saving

The mapping is marked modified only if the document produced differs from the saved one: a change in the grid, the blocks, the properties or the XML text, a fix, or the choice of the source structure, kept with the model. Opening, switching views, selecting, filtering and the trial run mark nothing. The “Export the model” tool downloads the document as XML; “Import a new version” (edit mode) replaces it with a file.

Read-only, the views, browsing the templates, the filters, the checks, the trial run and resizing remain available; the palette, drag and drop, deletions, the choice of structure and the fixes disappear, and the source lists become plain text.

On phones and tablets

  • From 960 px, the Mappings view shows its three columns side by side, and the Blocks view keeps the properties beside the blocks.
  • Between 600 and 959 px, the source and target structures open as drawers over the grid; a tap beside them closes them.
  • Under 600 px, one panel is shown at a time, chosen by the “Source” / current view / “Target” control. The grid rows become cards and the bottom drawer goes full screen. After a row is chosen, a “Pick a field: it will feed “…”.” banner and the “Pick in the source” button guide the gesture.
  • By touch, a field is not dragged: the row is tapped, then the source field feeding it.
  • Under 960 px, the properties of the “Blocks” view open as a drawer, with the target structure.
The complete syntax of a mapper, its XML, JSON, FIX and MT reads, its expressions and the messages of its checks: Mapper syntax.
Documentation for the Clomoon platform, published by Clover Consulting · Legal notice · Privacy · Contact