
The 23.04 release of OCI Process Automation (OCIPA) introduces transformations. A transformation is a special type of data mapping usually used between input and output data types that don’t match.
In this blog we will cover what transformations are and when you can use them in your OCIPA flows.
Before we introduce transformations, let’s quickly recap the other data mapping constructs in OCIPA:
Data Associations: are the simplest form of data mapping in OCIPA. Here you simply map a source value or an expression to a target data element. Data Associations allow you to map data between different objects but cannot be applied recursively to elements within an array (this is where transformations come in). Data Associations can be extended with conditions, filters, and transformations.

Conditions: are an extension of a data association. They add a predicate condition which must be met for the data association to be applied. Conditions are not reusable and perhaps most importantly cannot work within array objects (this is where filters come in).

Filters: are used to conditionally map data elements from a source array to a target array object, effectively catering for the limitation of conditions by allowing users to apply a condition upon which an array item will be mapped to the target array. Filters work on the same data object, meaning that the source and target object must have the same definition.
Transformations:
A transformation is like a data association in that it is used to map different input and output objects but also has a few key differences. Unlike data associations, transformations are re-usable and can map data objects that do not match within arrays.
Let’s have a look at some of the main characteristics of transformations in a bit more detail:
- Reusability: Transformations are re-usable mappings that you can configure once and re-use throughout your process application.
- Nesting: Transformations can contain nested transformations. This is an important feature that lets you transform array objects at different levels.
- Extensibility:
- Transformations can be applied conditionally. Doing so would ensure that the transformation is only executed when the condition is true. This is very useful when you need to map data differently based on a condition (e.g., an attribute within the source data set). For example, if you need to map data between a source data object (person) and a target data object (employee) depending on whether the person is based in the US or the EU.
- Transformations can also contain Filters. This means you can conditionally map data inside a transformation where an array object has the same structure in a source and target system.
- Limitations:
- Creating or appending arrays is not yet supported.
- Creating conditional data associations within a transformation is not supported.
- A transformation cannot source data from multiple sources. It is a mapping between a single source and target object. Once created, you cannot change the source/target object for a transformation, but you can create a new one.
- As transformations are re-usable across an application, you cannot reference process variables in them. This is because process variables are not global (they are confined within the scope of a single process) and hence cannot be re-used in other processes.
With the above definition in place, let’s explore when to use transformations by reviewing the below scenarios:
Scenario 1: Map objects with a different structure

Let’s start off with a simple scenario, where we want to map two objects with different types. To depict this use case, I am using a transformation between a source and a target object which both capture address information. As you can see these data objects are very different and I need to do some data manipulation to ensure that the data is correctly transformed to the format that the target (in this case an API) requires. So why use a transformation here, after all I can implement the same mapping in a Data Association. The main reason for doing so is re-usability, but more on that later.
Scenario 2: Map array objects with a different structure:

In this scenario imagine that we have an array of objects in a source and target systems, both representing the items ordered through a procurement process. As is often the case, the data objects of the two systems vary and different field names and types are used. To be able to map data between these systems we need to use an OCIPA transformation. In this scenario, I have created the below transformation which will apply the following mapping to each item in the array.

So now the overall mapping would look like this:

Scenario 3: Map nested array objects
In the previous scenario we showed how you can create a transformation between two different arrays in a source and target data object. But what if that array also contains a child array. This is where nested transformations come in to play.
To cater for this scenario, start by creating a transformation for the parent level array:

Then drag the two child arrays you want to map and create another nested transformation between the child arrays:

The net result of the parent transformation will now be:

And that’s it, you can use this approach to apply a mapping for each iteration of an array at any level of a data object.
Scenario 4: Conditional transformation
Conditional transformations are very useful when you need to transform data between objects in a different way based on some predicate. Consider the below scenario; here I have a conditional transformation based on the employee’s country. If the country is Italy, I will map the data one way and if the country is equal to US, then the data will be mapped in another way. To create a conditional transformation, simply associate a condition to the Data Association which your transformation is applied to:

Scenario 5: Re-use a transformation
If you ever need to map the same data objects again, our engine will automatically recommend the transformation that can be re-used. To do this simply drag the same source and target data object in the data mapper and select the option to apply a transformation. A pop-up will then appear that shows you the re-usable transformation that applies to those specific objects:

OCIPA also allows you to browse through the catalogue of transformations by selecting the Actions menu in any data mapper. Transformations can be re-used by all activities that carry a data mapper within an application. This means you can reuse transformations in activities that are part of the same or even different processes if you are within the scope of the same application container:


Summary
We are excited to introduce transformations in the 23.04 release of OCI Process Automation. This feature will allow process designers greater control in mapping data objects containing arrays and provide the ability to re-use data transformations. For more details please check out our documentation.
