Skip to main content
The Java function returns a JSON string. Transform that string with a record of type Data Transform so the result displays as case fields. For the function itself, see Create a Java function in Pega.

Create the Data Transform record

1

Create a case type

Open Dev Studio and create a new case type.
2

Add the case fields

On the Data model tab, add the fields to be handled by your case, and then click Save.
Screenshot of the Data model tab in Pega Dev Studio showing the case fields Attachments, Currency, Invoice Date, Invoice Number, Line Items, and Total.
3

Open the Create Data Transform window

Click Records → Data Model → Data Transform, and then click Create.
4

Configure the record

  1. In the Label field, specify a name for your new record.
  2. In the Additional configuration options section, select JSON.
  3. In the Apply to field, specify the full name of the case type you created earlier.
Screenshot of the Create Data Transform window in Pega Dev Studio with the Label set to JsonToInvoiceFields, JSON selected as the data model format, and the Apply to field set to the case type.
5

Map the JSON properties to the case fields

Click Create and open. In the window that opens, map the JSON properties in the JSON column to the case fields in the Clipboard column.
Screenshot of the Edit Data Transform Definition tab in Pega Dev Studio mapping JSON properties to the Clipboard case fields .InvoiceNumber, .InvoiceDate, .Total, .Currency, and .LineItems.
6

Save the record

Click Save.