Mapping Different Types of Data
The mapper opens when you click any element in the input schema tree on an Activity configuration tab.
You can map the following elements:
- A single element from the input to another single element in the output.
Note: If the single element comes from an array in the output, then you must manually add the array index to use. For example,
$flow.body.Account.Address[0]
city. - A standalone object (an object that is not in an array).
- An array of primitive data type to another array of primitive data type.
- An array of non-primitive data types (object data type or a nested array) to another array of the same non-primitive data type.
Keep the following in mind when using the mapper:
- Make sure that you map all elements that are marked as required (have a red asterisk against them), whether they are standalone primitive types, within an object, or within an array. When mapping identical objects or arrays, such elements get automatically mapped, but if you are mapping non-identical objects or arrays, be sure to map the elements marked as required individually.
- The
in
andnew
attributes are treated as special characters if you use them in the schema that you enter in the REST Activity or trigger. For example, mappings such as$flow.body ["in"]
and$flow.body ["new"]
are not supported. If an imported app contains these attributes after the app is imported into Flogo. It results in runtime errors. - Use of the anonymous array is not supported on the Flow Input & Output tab and the Return Activity configurations. To map to an anonymous array, you must create a top-level object or a root element and render that.
- You cannot use a scope (identified with a beginning
$
sign) in an expression, for example,renderJSON($flow, true)
. You can use an object or element under it, for example,renderJSON($flow.input, true)
. - You can only map one element at a time.
Note: If the output element names contain special characters other than an underscore ( _ ), they appear in bracket notation in the mapping text box.
In the following example, name under Available data does not contain any special characters. Hence it is displayed in dot notation.
In the following example, name under Available data does not contain any special characters. Hence it is displayed in dot notation.
In the following example, name 1 contains a space. Hence it appears in the bracket notation.

Subtopics