Ensure that your remote application can correctly publish additional case fields
to Pega Process Fabric Hub by configuring a data transform. For example, you
can prepare your remote application to publish an additional field that contains a case
description.
Note: You can add case fields if your remote application uses Pega Process Fabric Hub Connector for Pega Platform version 8.6 which
is compatible with Pega Process Fabric Hub version 2.1. For more information
about Pega Process Fabric Hub connector components, see the Pega Marketplace.Before you begin: - Create or use existing properties that you want to pass as fields to Pega Process Fabric Hub in the PPF-Data-Ext-Case
class. For more information, see Properties.Note: As a best practice, create additional properties and
configure the data transform before you register your application to
Pega Process Fabric Hub. If your business scenario requires
adding custom fields to a registered application, stop the sync between the
application and Pega Process Fabric Hub, configure additional
fields, and then sync with Pega Process Fabric Hub. For more
information, see Managing applications in Pega Process Fabric Hub.
- Ensure that you prepare your Pega Process Fabric Hub and
your remote system for publication. For more information, see Preparing for extending your data model with additional fields.
Depending on the class to which the additional field
belongs, override one of the following data transforms:
- Use pyPF_SetCaseRequest to pass additional fields that
belong to the Work- class.
- Use pyPF_SetRequest to pass additional fields that belong
to other classes.Note: After you install the Pega Process Fabric Hub Connector component, your remote application includes
multiple instances of the pyPF_SetRequest data
transform that apply to different classes. The instance that you select
depends on the class that stores your custom data model fields.
- In the navigation pane of Dev Studio,
click Records.
- Expand the Data Model category, and then click
Data Transform.
- In the list of data transform instances, open the data transform that you want
to edit:
- To edit a data transform for fields that you store in the
Work-class, open the
pyPF_SetCaseRequest data transform that applies to
the Work- class.
- To edit a data transform for fields that you store in a class that is
different from the Work- class, open the
pyPF_SetRequest data transform that applies to any
other class.
- Copy the data transform into your application ruleset:
- On the rule form header, click Save as.
- On the Save as Data Transform form, in the
Context section, in the Add to
ruleset list, select your application ruleset.
- Click Create and open.
- On the Pages & Classes tab, click Add
item.
- In the Page name field, enter
RequestPage.custom.
RequestPage.custom is a page that stores additional
properties to pass to Pega Process Fabric Hub.
- In the Class field, enter
$NONE.
- On the Definition tab, click Add a
row.
- In the Action column of the new row, select
Update Page.
- In the Target column, enter
RequestPage.custom.
- In the new row that is displayed, in the Action column,
select Set.
- In the Target column, select the field that you want to
publish to Pega Process Fabric Hub.For example: To add a field that represents a description, enter
.description.
- In the Source column, enter a value that you want to
assign to the field.For example: Enter "This case is for tracking claim
resolution".
You can use constants and autopopulated properties.
- Optional: To add more fields, repeat steps 8 to 13.
- Click Save.
Mapping additional case fields
For the correct publication and display of your additional case fields in
Pega Process Fabric Hub, ensure that you map properties that correspond
with the fields between your remote application and Pega Process Fabric Hub by
configuring the PopulateAdditionalFields data
transform.
For example, in your remote application, you can create a
.description property that corresponds with the field that stores
the description related to the case. Then, in Pega Process Fabric Hub, you create
a
.Description property that can accept data from your remote
application and that you can use to display the description at run time. Finally, you map
the property from your remote application to the property in Pega Process Fabric Hub.
Before you begin: In Pega Process Fabric Hub, create properties that
match properties in your remote application. Matching properties can have different
names in both applications. Ensure that the properties are of the scalar, page list, or
page group type and that you store the properties in the
PPF-Data-Ext-Case class. For more information, see Properties and Configuring page, page group, and page list properties.
You configure the
PopulateAdditionalFields data transform in Pega Process Fabric Hub.
Note: Configuration of the
PopulateAdditionalFields data transform applies to
properties of the scalar, page list, or page group type. If your properties use
advanced logic, copy and then modify the
PopulateAdditionalFields activity that applies to the
PPF-Data-Ext-Case class. Modifications to the
PopulateAdditionalFields activity depend on your unique
business scenario. For more information, see Configuring steps in an activity.- In the navigation pane of Dev Studio,
click Records.
- Expand the Data Model category, and then click
Data Transform.
- In the list of data transform instances, click the
PopulateAdditionalFields data transform that applies
to the PPF-Data-Ext-Case class.
- Copy the data transform into your ruleset:
- On the rule form header, click Save as.
- On the Save as Data Transform rule form, in the
Context section, in the Add to
ruleset list, select a ruleset to store the data
transform.
- Click Create and open.
- On the Definition tab, click Add a
row.
- In the Action column, select
Set.
- In the Target column, enter the property that you store
in Pega Process Fabric Hub.For example: Enter .Description.
- In the Source column, enter the property that you store
on the RequestPage.custom data page in your remote
application.For example: Enter .description.
- Optional: To add more properties, repeat steps 5 through 8.
- Click Save.
What to do next: You can perform any operation using default or additional
fields after saving your case fields by overriding the
PPF-Work-Case.PostSaveExtension activity, and then adding your
logic based on the business requirement. For more information, see Configuring steps in an activity. Optional: Validating additional case fields
If your business scenario requires restricting input in additional case
fields, you can validate the properties that correspond with the fields. As a result,
you ensure that case management in Pega Process Fabric Hub is error-free and
meets your business requirements.
For example, you can create a property that
stores a description that is related to the case, and then create validation to ensure that
the text that users can provide is no longer than 160 signs.
To provide validation for case fields, you configure the
ValidateAdditionalFields validate rule, or, if your properties
use advanced validation logic, the
ValidateAdditionalFields
activity, and then you configure the
MapToAPIFields decision table
that applies to the
PPF-Data-Ext-Case class. The validate rule and
the activity store conditions for validation, and the
MapToAPIFields decision table maps the properties from your
remote application to the properties from Pega Process Fabric Hub.
As a
result, Pega Process Fabric Hub can display error messages that include
property names from the remote application so that you can quickly identify and
investigate a property that fails validation.
- Provide validation for assignment fields:
Choices | Actions | If you use standard validation logic for your properties,
configure the ValidateAdditionalFields validate
rule. | - In the navigation pane of Dev Studio,
click Records.
- Expand the Process category, and then click
Validate.
- In the list of validate rules instances, click the
ValidateAdditionalFields validate
rule that applies to the
PPF-Data-Ext-Case class.
- On the validate rule form, click Save
as.
- On the Save as Validate rule form, in
the Context section, in the
Add to ruleset list, select a
ruleset to store the validate rule, and then click
Create and open.
- On the Validate tab, create
validation for your properties with required
conditions.
- On the Validate form, click
Save.For example: You can configure validation for the
.description property. The
validation prompt states that the allowed values are maximum
160 signs long. If users provide an incorrect value,
Pega Process Fabric Hub displays an error
message.
|
If you use advanced validation logic for your properties,
configure the ValidateAdditionalFields
activity. | - In the navigation pane of Dev Studio,
click Records.
- Expand the Technical category, and then
click Activity.
- In the list of activity instances, click the
ValidateAdditionalFields activity
that applies to the PPF-Data-Ext-Case
class.
- On the activity rule form, click Save
as.
- On the Save as Activity form, in the
Context section, in the
Add to ruleset list, select a
ruleset to store the activity, and then click
Create and open.
- Modify the validation method for your property.
- On the ValidateAdditionalFields
activity rule form, click Save.
|
- Configure the MapToAPIFields decision table:
- In the navigation pane of Dev Studio,
click Records.
- Expand the Decision category, and then click
Decision Table.
- In the list of decision table instances, click the
MapToAPIFields decision table that applies to
the PPF-Data-Ext-Case class.
- On the decision table rule form, click Save
as.
- On the Save as Decision Table form, in the
Context section, in the Add to
ruleset list, select the ruleset to store the decision
table, and then click Create and open.
- On the Table tab, in the field
name column, enter the property from Pega Process Fabric Hub that you want to validate.
- In the Return column, enter the matching
property from your remote application.
- Optional: To map more properties, on the toolbar, click Insert Row
After, and then repeat steps 2.f and 2.g.
- Click Save.
Optional: Displaying additional case fields
You can incorporate your additional case fields in reports and then use the reports
in your landing pages, which helps users manage the cases. For example, you can create
additional fields that correspond with case descriptions, and then add the fields to the
GetResolvedCases and GetUnresolvedCases report
definitions. As a result, Pega Process Fabric Hub displays the Cases
description additional field on the My Cases landing page.
You add custom case fields to reports by configuring the
GetResolvedCases and
GetUnresolvedCases report definitions that apply to the
PPF-Work-Case class and a MyCasesTable
section. You perform the configuration in the system that hosts Pega Process Fabric Hub.
- Configure the GetResolvedCases report definition:
- In the navigation pane of Dev Studio,
click Records.
- Expand the Reports category, and then
click Report Definition.
- In the list of report definition instances, click the
GetResolvedCases report definition that
applies to the PPF-Work-Case class.
- In the rule form header, click Save as.
- On the Save as report definition form, in the
Context section, in the Add to
ruleset list, select a ruleset to store the report
definition.
- On the Query tab, click Add
column.
- In the Column source column, enter the property
from Pega Process Fabric Hub that you want to display.
Note: Ensure that you start the property name with
.Custom. For example, to add a field that
stores a case description, enter
.Custom.Description.
- In the Column name column, enter a label for the
field that you want to use in reports.For example: Enter Case description.
- Optional: To add more properties, repeat steps 1.f through 1.h.
- On the Pages & Classes tab, in the
Page name field, enter
MyCasesTable.
- Click Save.
- Configure the GetUnresolvedCases report definition:
- In the navigation pane of Dev Studio,
click Records.
- Expand the Reports category, and then
click Report Definition.
- In the list of report definition instances, click the
GetUnresolvedCases report definition that
applies to the PPF-Work-Case class.
- Repeat steps 1.d through 1.k.
- Configure the MyCasesTable section:
- In the navigation pane of Dev Studio,
click Records.
- Expand the User Interface category, and
then click Section.
- In the list of section instances, click the
MyCasesTable section that applies to the
PPF-Work-Case class.
- On the rule form header, click Save as.
- On the Save as section form, in the
Context section, in the Add to
ruleset list, select a ruleset to store the report
definition, and then click Create and open.
- On the Design tab, click a column in the table
next to which you want to display an additional field, and then, on the
toolbar, click: either Insert column before
selected or Insert column after
selected based on your requirement.
- Double-click the header of the new column, and then, in the
Cell Properties dialog box, in the
Value field, enter a label for the new
column.
- Click Submit.
- Double-click the cell in the new column, and then, in the
Cell Properties dialog box, in the
Property field, enter the additional
assignment property from Pega Process Fabric Hub.
- Click Submit.
- Optional: To add more fields, repeat steps 3.f through 3.j.
- Click Save.