Ensure that your remote application can correctly publish additional assignment
fields to Pega Process Fabric Hub by configuring the
pyPF_SetRequest data transform. For example, you can prepare
your remote application to publish additional fields that pass information about a
region, or the skills that are required to resolve the assignment.
Before you begin:
Create or use existing properties that you want to pass as fields to Pega Process Fabric Hub. Create the properties in the
PPF-Data-Ext-Task class. For more information, see
Properties.
As a best practice, create additional properties that you
want to pass as fields to Pega Process Fabric Hub and configure the
pyPF_SetRequest 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 start the
sync with Pega Process Fabric Hub. For more information, see Managing applications in Pega Process Fabric Hub.
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 additional 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
Assign- class, open the
pyPF_SetRequest data transform that applies to the
Assign- class, as shown in the following
figure:
To edit a data transform for fields that you store in the
Work- class, open the
pyPF_SetRequest data transform that applies to the
Work- class.
To edit a data transform for fields that you store in a different class
than the Assign- and Work-
classes, open the pyPF_SetRequest data transform that
applies to the
System-Queue-PPF-Connect-Assign.
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, and then, in the Page name field,
enter RequestPage.custom, and in the
Class field, enter
$NONE.
RequestPage.custom is a page that stores additional
properties to pass to Pega Process Fabric Hub.
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 appears, 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 country, enter
.region.
In the Source column, enter a value that you want to
assign to the field.
For example: To display the name of a region, enter
"West".
You can use constants and autopopulated properties.
Optional: To add more fields, repeat steps 6 through 11.
Click Save.
For example: The following figure shows the
pyPF_SetRequest data transform in an application ruleset. The
data transform includes a new row that passes information about a region.
Mapping additional assignment fields
For correct publication and display of your additional assignment 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
.region property that corresponds with the field that stores the
region related to the assignment. Then, in Pega Process Fabric Hub, you create a
property that can accept data from your remote application, and that you can use to display
the region at run time in Interwoven Worklist. 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 type of properties is scalar, Page List, or
Page Group, and that you store the properties in the
PPF-Data-Ext-Task 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 scalar,
Page List, and Page Group properties. If your properties use advanced logic, copy
and then modify the PopulateAdditionalFields activity that
applies to the PPF-Data-Ext-Task 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-Task class, as shown in the following
figure:
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 .location.
In the Source column, enter the property that you store
on the RequestPage.custom data page in your remote
application.
For example: Enter .region.
Optional: To add more properties, repeat steps 5 through 8.
Click Save.
For example: The following figure shows the PopulateAdditionalFields data
transform that maps the .region property from the remote
application to the .location property from Pega Process Fabric Hub:
Optional: Validating additional assignment fields
If your business scenario requires restricting input in additional
assignment fields, you can validate the properties that correspond with the fields. As
a result, you ensure that assignment management in Pega Process Fabric Hub is
error-free and meets your business requirements.
For example, you can create
a property that stores a region related to the assignment, and then create validation to
ensure that users can provide only East, West, South, and North as input.
To provide validation for assignment 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-Task class. The validate rule and
the activity store conditions for validation, and the
MapToAPIFields decision table map 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-Task 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.
For example: The following figure shows a validation for the
.Region property. The validation
states that the only allowed values are
North,
South,
East, and
West. 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-Task
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.
Modifications of the
ValidateAdditionalFields activity
depend on your unique business scenario. For more
information, see Configuring steps in an activity.
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-Task 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.
Result: For more intuitive debugging, Pega Process Fabric Hub displays
the property name from your remote application in the error logs, as shown in
the following figure:
Optional: Preparing for publishing additional fields for real time updates
Publish additional fields associated with the assignment for real time updates to
meet your unique business scenario goals.
For example, you can receive real time updates based on the Region additional fields.
You configure the PublishAdditionalFields activity that applies
to the PPF-Work-Task class, and then, to receive task real time
updates based on same filtering condition with other entities additional data, you
configure UnifiedWorkListCustomDataFilter data transform that
applies to the @baseclass class, and, finally, you configure
IsMatch(task, customData) function in the
ppf-unified-worklist-extension JS file based on your unique
business scenario.
Configure the PublishAdditionalFields 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
PublishAdditionalFields activity that applies
to the PPF-Work-Task 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.
On the Steps tab, clear the
Label field for step 1.,
and then click the Expand method parameters icon
next to the Method field to add your additional
assignment fields to the pyJsonData property in the
JSON format.
On the PublishAdditionalFields activity rule form,
click Save.
For example: The following figure shows the settings for publishing of
additional assignments' data in the pyJsonData
property for real time updates.
Configure the UnifiedWorkListCustomDataFilter data
transform:
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
UnifiedWorkListCustomDataFilter data transform
that applies to the @baseclass class.
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, in the
Action column of action
2, select Set, and in
the Source column, add your additional assignment
fields to pyJsonData property in the JSON
format.
Click Save.
For example: The following figure shows the configuration of the
UnifiedWorkListCustomDataFilter data
transform.
Configure the ppf-unified-worklist-extension JS text
file:
In the navigation pane of Dev Studio,
click Records.
Expand the Technical category, and
then click Text File.
In the list of activity instances, click the
ppf-unified-worklist-extension JS
textfile.
On the activity rule form, click Save as.
On the Save as Text File form, in the
Context section, in the Add to
ruleset list, select a ruleset to store the activity,
and then click Create and open.
On the Main tab, in the text editor area, in the
IsMatch function, define return
true or return false based on the
additional data.
On the ppf-unified-worklist-extension JS text file
rule form, click Save.
For example: The following figure shows configuration of the
ppf-unified-worklist-extension JS file for real
time updates.
What to do next: You can perform any operation using default or additional
fields after saving your assignment fields by overriding the
PPF-Work-Task.PostSaveExtension activity, and then adding your
logic based on the business requirement. For more information, see Configuring steps in an activity.
Previous topic
Preparing for extending your data model with additional fields
Next topic
Preparing additional operator mapping fields for publishing