Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Preparing additional assignment fields for publishing

Updated on February 25, 2022

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.
  • 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.
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.

  1. In the navigation pane of Dev Studio, click Records.
  2. Expand the Data Model category, and then click Data Transform.
  3. 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:
      Opening pyPF_SetRequest data transform
      A list of pyPF_SetRequest data transforms that apply to different classes.
    • 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.
  4. Copy the data transform into your application ruleset:
    1. On the rule form header, click Save as.
    2. On the Save as Data Transform form, in the Context section, in the Add to ruleset list, select your application ruleset.
    3. Click Create and open.
  5. 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.

  6. On the Definition tab, click Add a row.
  7. In the Action column of the new row, select Update Page.
  8. In the Target column, enter RequestPage.custom.
  9. In the new row that appears, in the Action column, select Set.
  10. 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.
  11. 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.
  12. Optional: To add more fields, repeat steps 6 through 11.
  13. 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.
pyPF_SetRequest data transform
The data transform with a new row added.

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.
  1. In the navigation pane of Dev Studio, click Records.
  2. Expand the Data Model category, and then click Data Transform.
  3. 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:
    Opening the PopulateAdditionalFields data transform
    A list of PopulateAdditionalFields data transforms that apply to different classes.
  4. Copy the data transform into your ruleset:
    1. On the rule form header, click Save as.
    2. 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.
    3. Click Create and open.
  5. On the Definition tab, click Add a row.
  6. In the Action column, select Set.
  7. In the Target column, enter the property that you store in Pega Process Fabric Hub.For example: Enter .location.
  8. In the Source column, enter the property that you store on the RequestPage.custom data page in your remote application.For example: Enter .region.
  9. Optional: To add more properties, repeat steps 5 through 8.
  10. 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:
PopulateAdditionalFields data transform
The data transform with sample property mapping.

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.

  1. Provide validation for assignment fields:
    ChoicesActions
    If you use standard validation logic for your properties, configure the ValidateAdditionalFields validate rule.
    1. In the navigation pane of Dev Studio, click Records.
    2. Expand the Process category, and then click Validate.
    3. In the list of validate rules instances, click the ValidateAdditionalFields validate rule that applies to the PPF-Data-Ext-Task class.
    4. On the validate rule form, click Save as.
    5. 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.
    6. On the Validate tab, create validation for your properties with required conditions.
    7. On the Validate form, click Save.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.
      Property validation
      Validation rule form for a .Region property with allowed values.
    If you use advanced validation logic for your properties, configure the ValidateAdditionalFields activity.
    1. In the navigation pane of Dev Studio, click Records.
    2. Expand the Technical category, and then click Activity.
    3. In the list of activity instances, click the ValidateAdditionalFields activity that applies to the PPF-Data-Ext-Task class.
    4. On the activity rule form, click Save as.
    5. 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.
    6. 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.
    7. On the ValidateAdditionalFields activity rule form, click Save.
  2. Configure the MapToAPIFields decision table:
    1. In the navigation pane of Dev Studio, click Records.
    2. Expand the Decision category, and then click Decision Table.
    3. In the list of decision table instances, click the MapToAPIFields decision table that applies to the PPF-Data-Ext-Task class.
    4. On the decision table rule form, click Save as.
    5. 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.
    6. On the Table tab, in the Field name column, enter the property from Pega Process Fabric Hub that you want to validate.
    7. In the Return column, enter the matching property from your remote application.
    8. Optional: To map more properties, on the toolbar click Insert Row After, and then repeat steps 2.f and 2.g.
    9. 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:
    Error logs in Pega Process Fabric Hub
    Error logs with a property name sourced from the remote application.

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.

  1. Configure the PublishAdditionalFields activity:
    1. In the navigation pane of Dev Studio, click Records.
    2. Expand the Technical category, and then click Activity.
    3. In the list of activity instances, click the PublishAdditionalFields activity that applies to the PPF-Work-Task class.
    4. On the activity rule form, click Save as.
    5. 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.
    6. 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.
    7. 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.
      The PublishAdditionalFields activity configured to publish additional fields for real time updates
      The PublishAdditionalFields activity configured to publish additional fields for real time updates.
  2. Configure the UnifiedWorkListCustomDataFilter data transform:
    1. In the navigation pane of Dev Studio, click Records.
    2. Expand the Data Model category, and then click Data Transform.
    3. In the list of data transform instances, click the UnifiedWorkListCustomDataFilter data transform that applies to the @baseclass class.
    4. On the rule form header, click Save as.
    5. 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.
    6. Click Create and open.
    7. 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.
    8. Click Save.For example: The following figure shows the configuration of the UnifiedWorkListCustomDataFilter data transform.
      The UnifiedWorkListCustomDataFilter data transform
      The UnifiedWorkListCustomDataFilter data transform.
  3. Configure the ppf-unified-worklist-extension JS text file:
    1. In the navigation pane of Dev Studio, click Records.
    2. Expand the Technical category, and then click Text File.
    3. In the list of activity instances, click the ppf-unified-worklist-extension JS textfile.
    4. On the activity rule form, click Save as.
    5. 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.
    6. On the Main tab, in the text editor area, in the IsMatch function, define return true or return false based on the additional data.
    7. 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.
      The configuration of the ppf-unified-worklist-extension js file for real time updates
      The 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

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us