0% found this document useful (0 votes)
15 views6 pages

Asset-V1 PUAP+AD+2024+type@asset+block@Enhanced Skill Lab - Using An Activity To Change The Locale of An Operator

Uploaded by

choti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views6 pages

Asset-V1 PUAP+AD+2024+type@asset+block@Enhanced Skill Lab - Using An Activity To Change The Locale of An Operator

Uploaded by

choti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Using an activity to change the locale of an

operator
Scenario
Update a property for one Operator ID instance by opening the instance, updating the
clipboard page, saving the updated clipboard page, and committing the result to the
database.

IMPORTANT: This simple example shows how methods work together and does not
cover security, validation, locking, error-handling, or performance considerations.

Pre-Requisites
Creating the Warranty application and operator must be completed in order to proceed
with this exercise.

Use the following credentials to log in to the exercise system:

Your Assignment
Your assignment consists of the following tasks:

Task 1: Log in to the exercise environment.


Login.
Task 2: Create an activity rule to update the locale and save it to the database.
Create an activity named Update Locale, which will open an Operator ID record based on
input parameters and copy the relevant data from the database to a clipboard page. Save
the updated page back to the PegaRULES database, making the updates permanent.

Task 3: Verify your work.

NOTE: Detailed steps to complete your assignment can be found on the pages that
follow.
Detailed Steps

Task 1: Enter the following credentials to log in to the exercise environment:


a. In the User name field, enter [admin@rgb]
b. In the Password field, enter [rules]

Task 2: Create an activity rule to update the locale and save it to the database.
1. In Dev Studio, create an activity named Update Locale in the RGB-Prod-Warranty-
Work class.

2. Set the parameters in the Parameters tab as below.


3. Configure the Pages & Classes tab, enter the name of a page that can hold the
contents of the Operator ID record returned by the Obj-Open method.

4. On the Steps tab, add an Obj-Open method. This method opens a single record
from the database, as described above. Set the criteria as the pyUserIdentifier
property is equal to the parameter defined on the Parameters tab.

NOTE: In methods that return data from an object (such as Obj-Browse and Obj-Open),
the returned data is placed on the page identified as the Step Page.

5. Add a Property-Set method to update the .pyUserLocale property. You can


optionally set multiple properties, like the date and time of the update and the user
who edited it.

NOTE: The properties we reference are located in a different class, so you will need to
use the More… option if you using autocomplete to find the fields.
6. Save the updated record by using an Obj-Save method. And commit it to the database
using the Commit method.

7. Add the method Show-Page to show the current page XML.

8. Remove the Operator page by using the Page-Remove method.


9. Save the activity record.

Task 3: Verify your work.


1. Test the activity by clicking the Actions > Run from the rule header. Enter
admin@rgb for OpName and en_US for Locale.

2. Click Run. After executing the activity, a dialog is displayed showing the XML. An
excerpt is shown below:
3. Close the window showing the XML.
4. Close the Run dialog.
5. Navigate to the Operator ID record for Admin@rgb, and we can see the update in the
Default Locale on the Operator page.

6. Log off.

You might also like