Integrate Software AG Products Using Digital Event Services 10.4 | Integrate Software AG Products Using Digital Event Services | MashZone NextGen Help | Appendix | Legacy Presto components | Mashables and Mashups | Mashups in MashZone NextGen Wires | Creating Mashups in Wires | Add Actions or Other Blocks | Map Results to Known Structures
 
Map Results to Known Structures
Mapper Block Video rectMapper Block Video
The Mapper action allows you to change the structure and data from document results to a specific, well-known document structure that you chose. MashZone NextGen administrators must add document structures to this list.
* To define the transformation
1. Connect document-type results from another block as input to Mapper.
2. Click Choose output structure and choose:
*Choose From active services > mashable/mashup name if the structure you need to map to is used by a mashup or mashable block in this mashup.
*Choose From schema files > Load schemas if the structure you need to map to is defined by an XML schema.
Note: MashZone NextGen administrators must add relevant schemas for this option to be available.
Then choose From schema files > schema-name for the schema you need and select the root node for this new document.
The Block Properties for this action displays three panes with the structure of the input document, a pane where you choose the well-known output structure that you want to map to, and a pane with properties you can assign to the currently selected output node or field.
Tip: It helps to maximize the Block Properties/Preview panel with the button while you work with both structures.
Both the input and output structure can contain:
* = a root or structure node that contains children but does not repeat. The root node completely wraps the entire document of the results.
* = a repeating node, usually with children.
* = a field (node) that contains data. If the node name begins with @ this is an XML attribute. Otherwise it is an XML element.
3. For each output data field, either:
*Map a data field from the input document to a data field in the output document.
*Map an input field from the mashup, add an input field to the mashup and map that, or map any data field from the results of other blocks.
Select the output data field you want to map. In the Output Node Settings pane, set the Mapping option. Click to open the Path Selector list and select the data field or mashup input field to map to this output.
*Enter a literal value or calculate a value using a function. See Enter or Calculate Data for instructions.
With mapping, you can map single input fields to single output fields or to repeating output fields. Similarly, you can map repeating input fields to single output fields or to repeating output fields. You can also map entire documents to output fields. The result will be:
From > To
Result
>
Single input value populates the single output field.
>
Single input value populates all the repeating output fields.
>
The values from all repeating input fields are joined, in order, with spaces between the values and this single joined value populates the output field.
>
Each repeating item from the input document generates a corresponding repeating item in the output. Data fields from a repeating input item populate the mapped field in the repeating output item.
Document > or
The full structure of the input document is appended as a child of the single output field or all repeating output fields.
You can also copy and paste node property settings from one output node to another with the and buttons in the Output Structure toolbar.
4. Use Run to preview the results as needed.

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release