pega4engineers
ALL ABOUT METHODS (ACTIVITY)
An activity is the fundamental sequential processing unit of the Process Commander system in Pega. Methods are individual operations that are performed in each step of an activity. This section provides the usage information on some of the most used methods.
1. Property-Set :
Use the Property-Set method to set the value of one or more properties.
Specify the property in the PropertiesName field, and the desired value in the PropertiesValue field.
2. Call
The Call method instructs the current activity to find and run another activity using Rule Resolution. After the called activity completes, the calling activity resumes processing. The called activity can use its own parameter page, or share the parameter page of the calling activity.
3. Branch
Similar to the Call method, the Branch method refers to another activity. Execution of the original activity ends when execution of the branched activity is complete.
4. Obj-Browse
The Obj-Browse method searches instances of one class and copies specified properties onto the clipboard, creating a list of instances, each on an embedded page.
5. Obj-Open
The Obj-Open method returns a single instance stored in the PegaRULES database, or in an external database table that is linked to an external class. The returned instance is then converted to a clipboard page. This method differs from the Obj-Browse method by not allowing you to define search criteria; you must identify the key of the instance.
6. Page-Copy
The Page-Copy method replicates the entire contents (all properties and embedded properties) of an existing clipboard page to a new or existing clipboard page.
7. Page-Remove
The Page-Remove method deletes one or more named pages from the clipboard.
To remove a page, enter one ore more pages in the Page field, or enter the page in the Step Page field.
8. Show-Page
The Show-Page method sends an XML representation of the current page (as specified in the Step Page field) to your browser window. This method is primarily used for debugging.
9. Activity-End
Use the Activity-End method to cause the system to End the current activity and all calling activities.
10. Exit-Activity
The Exit-Activity method ends the current activity and returns control to the calling activity.
11. Page-New
The Page-New method is used to create a page on the clipboard. The new page may be a top-level page or an embedded page.
12. Page-Set-Messages
Use the Page-Set-Messages method to add a message to a clipboard page. Like a message associated with a property, a message associated with a page normally prevents the page from being saved into the database.
13. Property-set-message
The property-set-message method is used to associate a text message with a property or a step page. The system reads the appropriate property and adds the message to the page. We can provide the entire literal text of the message, or reference a message rule key that in turn contains message text. (Rule-Message rule type).
14. Property-Map-DecisionTable
Use the Property-Map-DecisionTable method to evaluate a decision table rule and save the result as the value of a property.
15. Property-Map-DecisionTree
The Property-Map-DecisionTree method is used to evaluate a decision tree rule (Rule-Declare-DecisionTree rule type) and store the result as the value of a property.
16. Property-Map-Value
The Property-Map-Value method evaluates a one-dimensional map value (Rule-Obj-MapValue rule type) defined in the parameter. The method sets the result as a value for a Single Value property.
17. Property-Remove
Property-Remove method is used to delete a property or properties and its associated value from the step page or another specified page. This does not affect the property rule, its definition.
18. Show-HTML
The Show-HTML method is used to cause the activity to process an HTML rule and send the resulting HTML to a user for display by Internet Explorer. This may involve the interpretation of JSP tags (or the older directives), which can access the clipboard to obtain property values, or can insert other HTML rules, and so on.
19. Obj-list
The obj-list method is used to retrieve data to the clipboard as an array of embedded pages. This method creates one embedded page for each instance retrieved. The Obj-List-View method often produces more efficient SQL statements and provide better performance than the Obj-List method.
20. Obj-list-view
The obj-list-view method is used to execute the retrieval and sorting operations, but not the formatting and display processing, of a list view rule. The system uses rule resolution to find the list view rule and executes it, but does not produce any HTML output display.
21. Obj-Open-By-Handle
Use the Obj-Open-By-Handle method only if we can determine the unique handle that permanently identifies which instance to open. Otherwise, use the Obj-Open method.
22. Obj-delete
The obj-delete method is used to delete a database instance corresponding to a clipboard page and optionally to delete the clipboard page too. We can cause the deletion to occur immediately, or until execution of a Commit method.
23. Obj-Save-Cancel
We can reverse or cancel a previously executed Obj-Delete method by using the Obj-Save-Cancel method.
24. Obj-save
The obj-save method is used to save a clipboard page to the PegaRULES database or if the page belongs to an external class save a clipboard page to an external database. The Obj-Save method uses properties on the page to derive the internal key under which it will be saved. This method can create a new database instance or overwrite a previous instance with that key.
25. Commit
Commit method is used to commit all uncommitted database changes. This method writes all the instances specified by one or more earlier Obj-Save methods to the PegaRULES database (for internal classes) and to external databases (for external classes).
26. Obj-validate
The obj-validate method is used to apply a validate rule (Rule-Obj-Validate rule type) for the object identified on the primary page or step page. A validate rule (Rule-Obj-Validate rule type) can call edit to validate rules (Rule-Edit-Validate rule type).
27. Obj-Sort
Obj-Sort method is used to sort the clipboard pages that are the values of a property of mode Page List. We can specify one or more properties to sort on, and whether the sort sequence is ascending or descending for each sort level.
HAPPY LEARNING !!!