Mapping Different Types of Data

The mapper opens when you click any element in the input schema tree in an activity configuration tab.

Mapping for the following is supported:
  • 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.
Important: Be sure to 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 and new 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 TIBCO Cloud Integration - Flogo (PAYG), it results in runtime errors.
  • Use of anonymous array is not supported in 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 can not 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 example below, in the upper image name under Upstream Output does not contain any special characters, hence it is displayed in dot notation. In the lower image name 1 contains a space, hence it appears in the bracket notation.

This section covers the following topics:

Related concepts
Related tasks