Configuring Actions for data objects

Why

Every application has the features or use cases to manage the information in data objects for various purposes. The best approach is to define dedicated actions to complete specific tasks.

Having dedicated actions helps in maintaining the granular control over the authorization or access that can be provided to various users.

Supported actions for data objects

Pega supports 2 different actions for data objects

  1. Create case

  2. Update details

Create case action

With Create case option, a new case type can be launched from the context of the data object with the details of the object being automatically populated into the case type.

Below are the steps to be performed to configure this action.

  1. Create a case type for the action to be performed. Eg: Employment letter.

  2. Create a data reference field in the case data model. Eg: Employee

  3. Navigate to the actions tab of the data object and choose create case option and select the case type to be launched.

  4. Now select the data reference property in the case to hold the details of the object and save the changes.

Note: When the data object is saved with this configuration, the AllowedStartingFields data transform is updated to support the data propagation to the case type when its launched.

Update details action

With the Update details we can configure different actions against the data object to perform specific tasks.

Below are the steps to be performed to configure this

  1. Navigate to the actions tab of the data object and choose update details option and provide an appropriate name.

  2. Now click on configure user action on the right panel to configure the View and save the changes.

A new flow action is created for each of the action that is added as below.

How to leverage these actions

These actions can be leveraged from 2 places

  • Menu of the Data object overview

  • List view

Actions in data object overview

Actions being displayed from the menu of the Employee data object.

Actions in the list view
To display actions in the list view, please enable the below checkbox with appropriate configurations on the list view settings.

Summary

In summary, actions of a data object can be leveraged to provide more granular options to interact with data for various purposes. This feature can be leveraged to even kickstart the case type journey from a predefined context.

Useful Articles

  1. https://docs.pega.com/bundle/platform/page/platform/data-integration/working-optional-actions-data-types.html

  2. https://docs.pega.com/bundle/platform/page/platform/data-integration/journey-crud/introducing-crud-operations.html

  3. https://docs.pega.com/bundle/platform/page/platform/data-integration/journey-crud/crud-data-pages.html

  4. https://support.pega.com/discussion/managing-external-system-record-through-rest-crud-actions-pega-constellation

Constellation 101 series

Enjoyed this article? See more similar articles in Constellation 101 series.

@tiruk great document - using Data on Landing Pages and Cases is really powerful and often overlooked in Constellation (or it was in 8.8 - '23, though I am seeing it more and more these days)

@tiruk It’s a great document. Thanks a lot. We have a business requirement in my project, and for that I was trying this design pattern for some advance requirements, and I found some limitations in this. Please check below the details of my POC and also please check the attached PDF where you can find the screenshots.

Configured below actions on a data type:

  • OOTB CRUD operation (Create, Edit, Delete)
  • Local action: Create a Constellation case type
  • Local action: Create a UIKit case type (I need for my project as my project is a Hybrid project - Constellation & UIKit)
  • Update details (Local action: Update data object items)

Behaviour:

  • The Constellation case gets initiated, data propagation work properly. The Constellation case processing works in Modal till the Create stage, then the case goes away; so once it goes to 2nd stage, it’s unable to replace current screen. Rather getting a black temporary banner at the screen bottom with case id.
  • The UIKit case gets initiated, data propagation work properly. The UIKit case goes away, it’s unable to replace current screen. Rather getting a black temporary banner at the screen bottom with case id.

Expectation:

  • The business requirement is to continue processing the case (regardless Constellation or UIKit) from the data object landing page.

Question:

  • Am I doing something wrong in the configuration or this kind of advance requirement is not possible to achieve from this design pattern?

@MarcCheong @Kamil Janeczek @Vikram Bandodkar @NileshV1 @RoshanC8055

POC_DataObjects_LocalAction_DesignPattern_Pega24_2.pdf (669 KB)

@Subhadip Das thanks Subhadip for your message.

To clarify what would you expect in both cases:

  • Constellation case - that after create stage your new case replacing content in your main view?

  • UI Kit case - that on action menu item click it immediately replace your content in main screen?

@Kamil Janeczek Yes Kamil exactly right. We want to it to replace the current screen (main view) with case processing (regardless the Constellation or UIKit case type).

Thanks a lot for looking into this!

@Subhadip Das

This is a pattern we are following where in - if a user is on a landing page and creating a case, the modal dialog is closed once the create stage is done and the toaster displayed will give the user a message that the case has been created along with the case ID. We haven’t provided this choice, of whether to continue with case processing or close the case and display a message, as configuration option to the application developer as of now. So this would be the OOTB behaviour of the platform.

Regards

Shahi Naquash

@NAQUS Thanks for the clarification Shahi.

@MarcCheong @tiruk

How can we perform CRUD operations from the landing page when the Data Object has primary key fields other than pyGUID? The Create view is showing the primary keys of the data object in read-only mode, which prevents us from entering data for those fields. How can we achieve this? Doesn’t the OOTB CRUD functionality support this?

@Kamil Janeczek

@NAQUS @Kamil Janeczek

I have performed some testing (24.2.2) with both constellation and UI Kit cases and have observed the behavior to be slightly different depending if the landing page is configured as as a stand alone list view, or if the the list is included in a dashboard page.

  • In the case that the landing page is a stand alone list view, I am seeing the case created, and then opened in the portal replacing the current screen (Constellation and UI Kit)
  • In the case that the list view is included in a dashboard page i observe the noted behavior with the toast popup and link to the case. (Constellation and UI Kit)

Do we expect the same behavior in both scenarios or is this expected? I believe that @Subhadip Das may not observe quite the same behavior with UI Kit cases in stand alone list view as I do so we are interested to understand when the case new case is opened in the portal vs when it is not.

@VamseedharaR you might want to look at Managing external system of record through REST with CRUD actions in Pega Constellation | Support Center

Two things to look at:

  • Should you be using alternative keys (maybe not)
  • You can update the datapage save plans to save the data as you like

I have not specifically configured this use case before, it might well be Constellation assume primary keys should always be read only. I can see why there is that assumption..

@Subhadip Das

We have conducted an internal review and confirmed the inconsistency in behavior. When users create a new object from a list, the behavior should remain consistent. The anticipated outcome is that users remain on the same page after submitting the Create modal.

The inconsistency arises in the List page template, where it is not expected to redirect users away from the list.

The only instance in which users are directed to the Full Object page is when they create from the Create menu in the main navigation.

This inconsistency will be addressed in a future release.