Data transforms are essential tools in Pega applications, designed to manipulate and convert data into the desired format. By using data transforms, developers can streamline the process of data handling, ensuring efficient and effective application maintenance.
What is a Data Transform?
A data transform in Pega defines how to convert data from one format and class (the source) to another format and class (the target). Supported formats include clipboard and JSON. Utilizing a data transform instead of an activity to set property values can significantly speed up development and simplify application maintenance.
Types of Data Transforms
There are two primary types of data transforms:
Standard Data Transform: Used for managing application data within internal Pega Platform applications.
JSON Data Transform: Ideal for integrating disparate data, such as web-based data with information from internal sources.
Key Usage Scenarios
Data transforms are widely used across different parts of the Pega Platform, including:
Optional Data Mapping on Property Forms: Copies a subset of data from a data page to a property.
Request Data Transform: Maps Pega Platform data to fields required by a connector to communicate with a data service.
Response Data Transform: Normalizes data from various sources into a common application data model.
Data transforms can also be referenced in activities, starter flows, flow actions, and various user interface elements like "Refresh This Section" actions and "On-click" control rules.
Actions in Data Transforms
Data transforms support a variety of actions, such as:
Append and Map To
Apply Data Transform
Auto-map
Exit For Each Page
For Each Page In
Set
Sort
Update Page
These actions enable comprehensive data manipulation, ensuring data is accurately transformed and utilized within the application.
Creating and Configuring a Data Transform
Creating a data transform in Pega involves several steps:
In Dev Studio: Navigate to `Create > Data Model > Data Transform`.
Enter Details: Provide a short description in the Label field. Optionally, manually set the identifier.
Select Data Model Format: Choose between Clipboard or JSON.
Specify Context: Select the application layer and class, then add the record to a ruleset.
Configure Details: Based on the selected data model, configure the data transform using the appropriate actions and properties.
For clipboard-based data transforms, specify actions and their corresponding targets, relationships, and sources. For JSON-based data transforms, select the element structure (object or array), map properties, and define actions and behaviors for JSON elements.
Saving and Using Data Transforms
Once configured, save the data transform and reference it where needed within your application to ensure data is properly manipulated and converted.
Understanding and effectively utilizing data transforms in Pega can significantly enhance your application's data handling capabilities, streamlining development and ensuring seamless data integration and manipulation.
-Team Enigma Metaverse
Comentarios