Configuring a data transform
To make application development maintenance more convenient and efficient, set property values by using data transforms. When you create a data transform, you convert data from one format and class to another format and class.
For example, if a customer enters a shipping address on an order form, you can configure a data transform to populate the billing address with the same details.- In the header of Dev Studio, click .
- In the Label field, enter a short description for your data
transform.For data transforms that initialize cases, use the pyDefault name.
- Optional: To manually set the identifier of your data transform, in the
Identifier section, click Edit.By default, the system automatically populates this field with a read-only value that is based on the sentence that you enter in the Identifier section. The system ignores spaces and special characters.
- In the Additional configuration options section, select a data
model format for your data transform:
- If you want to use the Clipboard tool as your data model, select Clipboard.
- If you want to use JSON as your data model, select JSON.
- In the Context section, specify the Pega Platform ruleset context for your data transform:
- Select an application layer in which you want to store the record.
- In the Apply to field, select the class to which this data transform applies.
- In the Add to ruleset field, select the name of a ruleset to which you want to add the record, and then, in the list, select the version number.
- Optional: To override the default work item that your application associates with this
development change, in the Work item to associate field, press the
Down arrow key, and then select a work item.For more information about default work items, see Setting your current work item.
- Click Create and open.
- On the Definition tab, configure details of the data transform,
based on the selected data model:
Choices Actions Configure the data transform by using the Clipboard tool - In the Action column, select an action that you want
to perform on the data.For more information about actions available for the Clipboard tool, see Data transform actions for Clipboard.
- In the Target column, specify the target of the selected action.
- If available, in the Relation column, specify the
relationship between the target and the source. The Relation column will show available selections based on the action selected in step a.
- In the Source column, specify the source of the selected action.
- Optional: To add more actions in your data transform, click Add a row, and then repeat steps 8.a through 8.d.
- Optional: To chain together this data transform and data transforms with the same name
in any of its parent classes, select the Call superclass data
transform checkbox.At run time, the system first performs the actions in the highest-level data transform.
Auto-map the data transform by using JSON - Select the Auto-map all data check box.
- In the Top element structure section, select whether the structure for your data transform is an object or an array.
- If your element structure is an array, in the Pagelist Property field, select the property to which to map the array, and then select the JSON elements.
Configure the data transform by using JSON - In the Top element structure section, select whether the structure for your data transform is an object or an array.
- If your element structure is an array, in the Pagelist Property field, select the property to which to map the array, and then select the JSON elements.
- In the Action column, select an action that you want
to perform on the data.For more information about actions available for JSON, see Data transform actions for JSON.
- In the Clipboard column, select the clipboard value to use for JSON serialization or deserialization.
- If available, in the Relation column, specify the
relationship between the target and the source. The Relation column will show available selections based on the action selected in step a.
- In the JSON column, enter the array, object, or simple field name from the JSON data.
- In the Empty behavior column, control the mapping
results of a JSON data transform by selecting an empty behavior.The configuration choices include the following options:
- Default value
- The JSON data transform serializer maintains the preexisting value. This configuration supports backward compatibility with Pega Platform that are earlier than 8.5.
- Null
- Represents a null value in the JSON data transform when the associated ClipboardPage / ClipboardProperty exists with an empty value,
- Skip
- Skips mapping in JSON when the associated ClipboardPage / ClipboardProperty exists with an empty value.
- Optional: To add more actions to your data transform, click Add element, and then repeat steps 8.c through 8.g.
- In the Action column, select an action that you want
to perform on the data.
- Optional: To hide all child rows, click Collapse All.
- Optional: To show all child rows, click Expand All.
- Click Save.
- Data transform actions for Clipboard
To save time while processing your cases, populate data in your application by using data transforms. When you use data transforms, you can convert data from one format and class to another format and class.
- Data transform actions for JSON
Save time while processing your cases by providing data for your application through data transforms. When you apply a data transform, you populate target values with values form a source that you specify, so that you avoid providing the same data twice.
Previous topic Creating a data transform Next topic Data transform actions for Clipboard