Work with Transformations

A transformation is a special type of data association between input and output data types that don’t match. A transformation both associates input and output objects and maps their types. And because transformations are reusable, you can configure them once for use throughout the application, then apply them as needed.

Transformations are particularly useful for matching slightly differing data attributes, such as address or employee data. For example, your process might connect to a service that returns employee data with slightly different attributes that need to be mapped. In the illustration below, the bottom two associations are transformations between mismatched address objects.

You can use transformations with arrays, and they're applied to each item in the array.

Note that transformations have their own icon, which differs slightly from the data association icon. As with data associations, the icon is green when valid. When invalid, the icon is red and its error displays.

You create and apply transformations while configuring data associations. You can either transform a selected data association or create a transformation and then apply it. You can even create transformations within transformations.

Create, Apply, and Edit Transformations

You create and apply transformations while creating data associations.

  1. In the process editor, follow the steps to configure a data association. Select a flow element that needs data association, click the Data Association button, and map objects to the association input and output fields.
  2. Click the data association icon, and select Transform. (The association can be valid or invalid.)
  3. In the Transformations window (named based on the objects you selected), click Create. In the New Transformation dialog box, enter a name, and click Create.
    The Transformation Editor displays. It looks and functions much like the Data Association Editor, except that its left and right panes reflect the selected objects to transform.
  4. Configure a transformation between the objects by dragging and dropping elements to the input and output fields. You can also begin typing and select from autocomplete entries that display.

    If needed, click the fx (Expression) icon and use the Expression Editor to create an expression for an input field. See Work with Expressions.

    Description of data-transform-config4.png follows
    Description of the illustration data-transform-config4.png

  5. Click Save to save the transformation. You can use the Save As button to create a new transformation based on the selected one.
    Process applies and validates the new transformation, displaying a green transformation icon if valid, or a red transformation icon and error if invalid. Note that you can save an invalid transformation and fix it later.
    Valid transformation icon Valid transformation
    Invalid transformation icon Invalid transformation
  6. Click the Data Association link to close the transformation editor and return to the data association editor.
  7. Create, edit, or change transformations as needed.

    At any time, you can display a list of all transformations defined for the application by clicking the Transformations button in the Data Association Editor. This displays the All Transformations window, which includes options for searching for, creating, editing, and deleting transformations. If creating a transformation from this window, you must select the input and output objects to transform from the application data objects listed in From and To fields, then apply the transformation to a data association.

    Description of data-transform-all.png follows
    Description of the illustration data-transform-all.png

    • To apply a transformation to a data association, click its icon in the Data Association Editor and select the Transform link. From the list of transformations available for the selected data types, select a transformation to apply and click OK.
    • To apply a different transformation, click a transformation icon in the Data Association Editor and select the Change link. From the list of transformations available for the selected data types, select another transformation and click OK.
    • To edit a transformation, click its transformation icon in the Data Association Editor, select the Edit link, and make edits in the Transformations Editor.
    • To delete a transformation, click the Transformations button, select it from the Transformations list, and click Delete. If the transformation is in use, a warning lists where it's in use and will be removed if you proceed with the deletion.

Create Transformations Between Enum Items

You can create and apply transformations between enum items when creating data associations.

Enum transformations work similarly to regular transformations, with a few differences highlighted below. Note that you can create enum transformations between enums only.
  1. In the process editor, follow the steps to configure a data association: select a flow element that needs data association, and click Data Association.
  2. In the data association editor, drag and drop source and target enums. Click the invalid association icon, and select Transform.
  3. In the Transformations window (named based on the objects you selected), click Create. In the New Transformation dialog box, enter a name, and click Create.

    The Transformation Editor displays. It looks and functions much like the Transformation Editor does when enum types aren't selected, with several differences:

    • Instead of Input and Output tabs on each side of the transformation, you see the enums and their enum items to map individually.

    • No expression editor icon is shown, because simple expressions aren’t allowed in enum transformations.

    Description of transform_enum2.png follows
    Description of the illustration transform_enum2.png

  4. Configure the transformation by dragging and dropping enum items to map source and target fields. For example, you might convert X_1 from IntEnum to ONE from StringEnum. Note that you can’t create transformations between enum items.
  5. Click Save to save the transformation. You can also click Save As to create a new transformation. If needed, click Apply to apply the transformation you created to the data association.
    Process validates the new transformation, displaying a green transformation icon if valid, or a red transformation icon and error if invalid.