Pega 3pdf
Pega 3pdf
Pega 3pdf
In some cases, a data reference is insufficient for your business need. Pega Platform™
provides data transforms to copy selected data from one source to another and manipulate
the data as needed.
Topics
Contact Us
Data Transforms
Data transforms
https://academy.pega.com/module/application-data-manipulation/v2/print 1/11
02/08/2024 16:50 | Pega Academy
Consider another example. An auto repair parent case has a child case that handles
providing the necessary repairs. The child case contains a menu of possible items and
services that can be provided, including unit costs. The items and services that are
provided are copied to the parent case for invoicing. Use a data transform to iterate
over the list of possible items and services and only copy those entries with a quantity
greater than zero.
Contact Us
case.
https://academy.pega.com/module/application-data-manipulation/v2/print 2/11
02/08/2024 16:50 | Pega Academy
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.
4. 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.
5. In the Context section, specify the Pega Platform ruleset context for your data
transform:
Contact Us
6. 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.
7. Click Create and open.
8. On the Definition tab, configure details of the data transform, based on the
selected data model:
https://academy.pega.com/module/application-data-manipulation/v2/print 3/11
02/08/2024 16:50 | Pega Academy
Choices Actions
Configure the data transform by a. In the Action column, select an action that
using the Clipboard tool you want to perform on the data.
Contact Us
actions in the highest-level data transform.
Auto-map the data transform by a. Select the Auto-map all data check box.
using JSON
Configure the data transform by a. In the Top element structure section, select
using JSON whether the structure for your data
transform is an object or an array.
b If your element structure is an array in the
https://academy.pega.com/module/application-data-manipulation/v2/print 4/11
02/08/2024 16:50 | Pega Academy
b. 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.
c. In the Action column, select an action that
you want to perform on the data.
Default value
Contact Us
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.
h. Optional:
To add more actions to your data transform,
click Add element, and then repeat steps 8.c
through 8.g.
9. Optional:
To hide all child rows, click Collapse All.
https://academy.pega.com/module/application-data-manipulation/v2/print 5/11
02/08/2024 16:50 | Pega Academy
10. Optional:
To show all child rows, click Expand All.
11. Click Save.
Contact Us
Note: The following content, referenced from Pega
Community, is included here to help you better
achieve the module learning objectives.
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.
When you configure a data transform using the Clipboard data model, you select an
action that you want to perform on the data. You can select the following actions:
Set
Sets the target to equal the source. You can set single-value properties, top-level pages,
embedded pages, page lists, and page groups. You typically use this action to initialize
properties. If the target pages that you specify do not exist on the clipboard, the Set action
creates the pages.
Remove
Deletes the target and any associated values from the clipboard.
https://academy.pega.com/module/application-data-manipulation/v2/print 6/11
02/08/2024 16:50 | Pega Academy
Update Page
Sets the context for setting properties on the target page. Use to set properties on a page
that is different from the primary page. If the target page does not already exist on the
clipboard, the system creates the page. If the source page is different from the primary
page, from the Relation list, select with values from, and then specify the source page.
Sort
Creates custom ordered lists. You can sort a page list according to single-value properties in
that page list. You can specify a sorting order for each property as either ascending or
descending order. In the Target column, click the View Sorting Properties icon to specify the
properties on which to sort and the sorting order for each property.
Comment
Specifies descriptive text. Use this action to provide comments within the sequence. For
example, you can explain the goal of a branch of steps.
When
Specifies a condition to evaluate to determine whether to apply the subsequent actions. If
the condition evaluates to true, the system applies the action within the child rows. If the
condition evaluates to false, the system continues with the action specified within the next
row. If the action in the next row is Otherwise or Otherwise When, the system applies the
action if the condition evaluates to true.
Otherwise When
Specifies another condition to meet before the system applies an alternate condition. If the
condition evaluates to true, the system applies actions within the child rows. If the
condition evaluates to false, the system continues with the action specified within the next
row. You can use this action after you use a When or Otherwise When action.
Contact Us
Otherwise
Specifies the alternate actions to apply if the preceding When or Otherwise When action
evaluates to false. You can only use this action after a When or Otherwise When action.
Note: If you add When, Otherwise When, and Otherwise actions to your data
transform, the system performs only one of these actions, depending on the first
of these actions that evaluate to true.
Append to
Copies a page to the target. You can copy a page if the source and the target are of the
same class, or if one of the classes is higher in the class hierarchy in the inheritance path.
Append and Map to
Adds a page to the target and maps properties and their source values to the target
properties. The source and target can be of different classes.
https://academy.pega.com/module/application-data-manipulation/v2/print 7/11
02/08/2024 16:50 | Pega Academy
Exits the current iteration defined by the preceding For Each Page action. You can use this
action only as a child row of a For Each Page In action.
Exit Data Transform
Stops the data transform at the row that contains the Exit Data Transform action.
Referencing properties
Provide the data necessary to process your cases by referencing information in the
form of properties. When you refer to a property, your application calls a specific
piece of information, such as a customer phone number or an address.
You can reference value properties that are strings of data such as text, number, or
dates. You can also reference page properties that contain multiple value properties.
For example, a page property .Customer might include value properties .Name,
.Address, and .Phone.
Contact Us
To refer to a property, prefix the property name with a period.
To refer to an entry in a Value Group property, enter the Value Group name, and
then the property name in parentheses.
https://academy.pega.com/module/application-data-manipulation/v2/print 8/11
02/08/2024 16:50 | Pega Academy
To refer to an entry in a Value List property, enter the Value List name, and then
the index number of the entry in the list.
To refer to an entry in a Page Group property, enter the Page Group name, and
then the entry in parentheses.
Contact Us
addresses, enter .Address(Work).
To refer to a page in a Page List property, enter the Page List name, and then the
page number in parentheses.
For example: To reference the third page in the page list that contains
ordered items, enter .OrderedItems(3).
To refer to a specific property on a page, enter the page name as a prefix for the
property name.
https://academy.pega.com/module/application-data-manipulation/v2/print 9/11
02/08/2024 16:50 | Pega Academy
Contact Us
To save time, define a place in your case where a data transform occurs by adding the
data transform to a process. You typically add a data transform between two
assignments. For example, while processing a purchase order, you can populate a
shipping address with data that a user provides as a billing address.
1. In the navigation pane of Dev Studio, click Case types, and then click the case
type that you want to open.
2. On the Workflow tab, hover over a process to which you want to apply a data
transform, and then click Configure process.
3. On the toolbar, click Open process.
4. Double-click a connector between two assignments where you want to add a data
transform.
5. In the Connector properties dialog box, in the Set properties section, select
Apply data transform.
6. In the Data transform field, press the Down arrow key, and then select the data
transform.
7. Click Submit.
https://academy.pega.com/module/application-data-manipulation/v2/print 10/11
02/08/2024 16:50 | Pega Academy
8. Click Save.
Referencing properties
Provide the data necessary to process your cases by referencing information in
the form of properties. When you refer to a property, your application calls a
specific piece of information, such as a customer phone number or an address.
Data transforms
A data transform defines how to convert data that is in one format and class (the
source) into data of another format and class (the target). The supported formats
are clipboard and JSON. Using a data transform instead of an activity to set
property values speeds up development and makes application maintenance
easier.
Contact Us
https://academy.pega.com/module/application-data-manipulation/v2/print 11/11