Test and troubleshoot a mapping
A mapping can be tested on its own data before a port runs it. A test run only transforms the text you paste; nothing is imported into or exported from Finance and Operations. This page also lists the messages the mapper shows and what to do about them.
Test a mapping #
- On the Format mapping form, select Edit if the form is in view mode. INPUT DATA accepts text in edit mode only.
- Open the Test transformation tab.
- Paste data into INPUT DATA.
- Select Run. The result appears in OUTPUT DATA.
The run uses the current script of the mapping. Leaving the Mapping tab in edit mode saves the diagram first, so a test always runs the latest version. When the input is empty, or is not valid in the format of Incoming type, a message says so.
Test with real files, including unusual ones: empty values, missing fields, a single record, and many records.
When a port run fails #
A test run proves the mapping on the data you pasted. When the port itself fails, the transformation step appears in the execution log, and a retained snapshot shows the payload the script received and the output it produced. See Diagnosing a failing script and Snapshot viewer. Most failures come from input that is not shaped the way the sample was: compare the snapshot with the sample the trees were built from.
The time and memory a script may use are limited in Outbridge parameters. See Execution limits.
Messages while drawing #
| Message | What to do |
|---|---|
| Invalid source / target | The line was released where it cannot end, for example on another source field. Release it on the dot of a target field or on a block input. |
| This field carries a value of its own; delete it before drawing a line to it | The target field has a constant or an expression. Clear them in the field's panel, then draw the line. |
| Function blocks would feed each other in a circle | The line would make a chain of blocks feed itself. Connect the blocks in one direction only. |
| Source and target types look incompatible | A warning only. Check that the value fits the field, or convert it with a function such as to-number or to-string. |
| A number is expected, the value was not taken | A numeric input of a block received text in its panel. Enter a number. |
| This diagram does not know that function | The mapping uses a function this version does not have. Replace the block. |
| Use the menu of this tree to fill it | The tree is empty. Load a sample, or fill it from DMF. |
Messages when filling a tree #
| Message | What to do |
|---|---|
| The sample file is empty. | Choose a file with content. |
| A tree can be built from a JSON or an XML sample only. | Convert the sample to JSON or XML. |
| The data project of this port maps no fields for the entity on the header | Add the entity to the port's data project with its field mapping, or check the Entity field on the header. |
| The sample declares more than one default namespace / declares the prefix … for more than one namespace | The XML sample is unusual; the first namespace is used. Check the result with a test run. |
| The incoming data writes the prefix … for …, a prefix the stylesheet keeps for itself | The sample uses a namespace prefix the script reserves for itself, for example xsl, xs, or f. Nodes written with that prefix cannot be mapped. |
Messages when saving #
| Message | What to do |
|---|---|
| … repeats and no loop runs over …, so only its first value is written | Draw a loop over the repeating element, or pass the field through join, sum, or first. |
| Nothing the map reads from the incoming data repeats, so the transform writes a single record | The sample had one record. When real files can hold more, mark the element as repeating; see Repeating elements in XML samples. |
| No loop was drawn, so the transform repeats over array … | The mapper chose the deepest array the mapped fields sit under. Check that this is right, or let a line create the loop. |
| … is left out of the stylesheet: a function block on the way to it is missing inputs | Connect or fill every input of the blocks in the chain. |
| Target node … is not part of the entity schema | The entity has changed since the tree was filled. Fill the target tree again from DMF. |
| The loop over … produces …, which is not an element of the target document | The target tree has changed. Delete the loop and draw the line again. |
| The stored diagram of this mapping could not be read | The stored diagram is damaged. The picture is empty; draw the mapping again and save. |
| The mapping document is version …, which this build does not understand | The mapping was made with a newer version of Outbridge. Open it in an environment with that version. |
Common situations #
| Situation | Solution |
|---|---|
| The … button of the right tree cannot be selected | The open Functions palette lies over it. Fold the palette by selecting its caption. |
| The label of a loop cannot be selected | A block covers it. Move the block by its handle (⠿). |
| A function in the palette is out of reach | Fold the palette groups you do not need. |
| Nothing on the diagram can be changed | The form is in view mode: select Edit. When the Mapping tab says that the script is maintained by hand, see Editing the script by hand. |
| The diagram looks wrong after an update | Refresh the browser with Ctrl+F5. |
| The output has one record although the file has several | The source element was not recognized as repeating. Mark it as repeating, or check the loop. |