Pega - Activity Interview Questions


Staff member
Activity Interview Questions and Answers

1. Creating User Defined, activities a best practice of development?
A. No, We need to avoid creating our own activity, whenever it is possible.

2. What are the max records that an Obj-Browse can fetch?
A. 10000 records.

3. What is the difference between Primary page and Step Page
A. Primary page is the Page on which a rule runs.
B. Step page is the one which we mention at a step. If we don’t mention any page at step, that will be occupied by Primary page.

4. Difference Between Call, Branch and Queue


It Calls Child Activity, then Parent activity waits for child activity to get completed, once child activity execution completes, control comes back to parent activity. Further steps after call step gets executed.

This behavior is called synchronous processing It Branches Child Activity, then Parent activity waits for child activity to get completed, once child activity execution completes, controls comes back to parent activity. Further steps after Branch step will be ignored

This behavior is called synchronous processing It Queues Child Activity, But Parent activity will not wait for child activity to get completed, The parent activity and child activity executes in different threads. This behavior is called Asynchronous processing

5. How to pass parameter page from one rule to another?
A. By selecting the Option “Pass Current Parameter Page”.

6. How to see param values?
A. Parameters we can not see on clipboard. We only see on tracer. Paramter page name “Unnammed”.

7. What is the difference between Write Now and Commit methods?
Write Now
It performs Immediate Commit on Specific Obj-Save , on which it is selected. It will not be able to release LOCK

It performs commit of Entire Differ Queue , More than one Obj-save, those are executed so far, gets committed.
This will release the lock

8. What is the difference between Roll back and Obj-Save Cancel?

This is going to rollback(ERASE) the latest uncommitted obj-Save.

This methods rolls back (Erases) entire differ Queue, all the obj-Save methods, executed so far, gets erased.

9. When do we need to use Commit, Write now option in the Obj-Save/Obj-Delete activity.

A. When the activity is NOT part of WO (Transactional) processing, then we need above options, else not needed.

10. What is the option “Allow direct invocation from the client or a service” ?when we use it?

A. When we call activity from Services, Agents, Connectors, HTML controls, we need to select this option.

11. What are different Activity Types?
A. Activity, Utility, On change, Trigger, Load Data page, Route, Assign etc…

12. What is the Different between Activity Types, Activity & Utility?
A. Activity type Activity can be called from other activities and HTML rules. Whereas utility can be called from Utility shape.

The main difference is Utility can use only back ground processing methods. We cannot use front end methods like Show-HTML, Show-Page, Show-Harness, Show-Property etc….

13. What is the option “Requires Authentication”? When we use it?

Select to require that only authenticated requestors can start this activity, generally the activity which part of security rule and create in class Code-Security.

14. Suppose when we save multiple records of data let’s say 100, suppose if record 59 is failed for some reason. How to ensure to revert all the records saved so far to be reverted.

A. We can use OOTB activity “CommitWithErrorHandling” make sure transaction is fully committed.

15. What is the Difference between, “Continue Whens”, “Skip Whens” at activity pre or post conditions?

For example
Condition1 ContinueWhen
Condition2 Skipwhens
Condtion3 ContinueWhens

Continue Whens : When a condition is satisfied, it will execute next when condition. If there are is not when condition after the current condition, then step will get executed.

Skip Whens : When a condition is satisfied, It ignore the execution of next when conditions, proceeds executing the step.

16. What is the property for Step Status in activity?

17. When we have OOTB when rule StepStatusGood, Why do we need again another when rule StepStatusFail?

A. It’s not only two Status for Step, we have Warn, GoodWarn etc…

18. I want to update the value of px-properties using Activity, how to active this?
A. We can use a method Property-Set-Special. We can update pxProperties.

19. What is the difference between class key and pzInsKey?

A. Class key is Unique ID of an instance, which is defined in the class rule form. For a given class, we can have more than class key, is possible.

pzInsKey is Unique Primary of an instance. An instance will have one and only one pzInsKey.

20. What is difference between obj-open, obj-Open-By-Handle?

Both will be fetching one record , page format.
Open will fetch based on class key(s).
Open-By-Handle fetches based on pzInsKey.

21. Different between Write-Now and Commit locking?

A. Write Now can not release the lock, whereas commit releases the lock.

22. Can we pass local variables from one rule to other rule?
A. No. only params can be passed.

23. Where can see local variable defined on the rules?

A. We can see local variable on tracer, on a page LocalVariables.
To see this, we need to choose an option on tracer settings, Local Variables.


24. What is Obj-Refresh-And-Lock Or how to do exception handling to ignore locked cases while obj-Open?

A. We can use Obj-Refresh-And-Lock
This method fetches one record onto step page like obj-open.
If the instance is already being acquired with lock, this method will not have any impact.
Else, this method opens the record on to step page and acquire lock on it.
This method is introduced as exception handling of Obj-Open, in case of clocking.

If we try obj-Open, if lock is already acquired on case, this will halt the program by throwing error message.
But Obj-Refresh-And-Lock will not halt the program, as given above, that’s what we call exception handling, during locking.

25. How to call flow from activity?

We can do this is by calling OOTB activities

Call NewFromFlow(WorkClasSName, FlowName)
Call New
Call Add
Call AddWork