Data types
can be referenced
from cases. For example, you can add a data type and all its fields to a form when you click
Configure view
for a step.
When you create a data type by using REST, the following artifacts are created:
- A data type that is a class rule
- The data model for the data type
- A REST connector
- A data page
To add data types to your application, perform the following steps:
-
In your application, click
Turn editing on.
-
To view the list of current data types in your application, in the navigation panel,
click
Data.
-
To start the data type wizard, click
.
-
In the
Create data type
field, enter a short name for
your data type that indicates the type of data that the data type will manage,
for example, customer.
- Optional:
To
reuse assets from another data type, click
Advanced, and
select a data type.
-
Click
Continue.
-
In the
Source name
field, enter a descriptive name for
the source.
-
For the GET method, in the
Endpoint URL
field, enter the
endpoint URL of the data.
Note: Heterogeneous JSON structures are not supported in Pega Express. Even
though rule generation shows as successful, runtime execution fails. Use
Designer Studio for heterogeneous JSON structures.
- Optional:
In
the
Parameters
section, choose which parts of the URL are
dynamic and need to be parameterized for future calls.
- Click the URL part that you want to parameterize.
-
In the
Parameter name
field, enter the
name.
- Optional:
In
the
Headers
section, specify request headers and their
values.
- Optional:
In
the
Authentication
section, select basic or NTLM
authentication, and specify the user name, password, realm, or domain to use for
authentication.
-
Click
Initialize call
to connect to the REST service and
return the JSON response.
-
Optional:
Click the
Information
icon
to view the raw response data.
-
Select the fields that you want to keep.
-
Click
Add all
to keep all the fields.
-
Click
Add new
next to a field that you want to
add. Map the field to a different field by entering the field name in the
Map to
field, and select the data type.
-
Click a field name to change its mapping. In the
Map to
field, enter the field name to map to and select the data type.
-
Click
Submit.