Skip to main content


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

Methods

Updated on August 10, 2022

This book contains reference topics for methods in Pega Platform.

  • Branching to another activity

    Use the Branch instruction to cause the current activity to find another specified activity and branch to it without a return. When the system executes a Branch step, control transfers to another activity found through rule resolution. Execution of the original activity pauses.

  • Calling another activity

    Use the Call instruction to cause the current activity to find another specified activity and execute it. When that activity completes, control returns to the calling activity.

  • Using the Collect instruction

    Use the Collect instruction in an activity step to call a collection rule. Collections define an ordered sequence of rules to execute.

  • Use of Java in an activity step

    Most activities can be defined by using only methods and instructions. Some activities require inline Java.

  • Queue instruction – run an activity asynchronously

    The Queue instruction uses a Java thread from a limited thread pool. If using the queue instruction, set the agent/threadpoolsize value in the prconfig.xml file or dynamic system settings appropriately based on concurrency needs.

  • Connect-Cassandra method

    Use the Connect-Cassandra method to start a request/response interaction between the Pega Platform and the external data store identified by a Connect Cassandra instance.

  • Connect-CMIS method

    The Connect-CMIS method is reserved.

  • Connect-dotNet method

    Use the Connect-dotNet method to invoke a Web service identified in a Connect dotNet rule (an instance of the Rule-Connect-dotNet rule type).

  • Connect-EJB method

    Use the Connect-EJB method to invoke a connector to an external Enterprise JavaBean.

  • Connect-File method

    Use the Connect-File method to invoke a Connect File rule ( Rule-File-Connect rule type). The rule can create, add contents to, or close an output file.

  • Connect-FTP method

    Use this method to copy a file from one file system to another file system using File Transfer Protocol.

  • Connect-HBase method

    Use the Connect-HBase method to start an request/response interaction between the Pega Platform and the external data store identified by a Connect HBase instance ( Rule-Connect-HBase rule type).

  • Connect-HTTP method

    Use the Connect-HTTP method to start an HTTP request/response interaction between the Pega Platform and the external system identified by a Connect HTTP rule ( Rule-Connect-HTTP rule type).

  • Connect-Java method

    Use the Connect-Java method to call a public method of an external Java class, using a Rule-Connect-Java rule.

  • Connect-JCA method

    Use the Connect-JCA method to communicate through a JCA resource adapter to an external system.

  • Connect-JMS method

    Use the Connect-JMS method to send a JMS message to an external system using the Java Message Service application programmer interface.

  • Connect-MQ method

    Use the Connect-MQ method to invoke a connector to an external system that uses IBM WebSphere MQ messaging services.

  • Connect-REST method

    Use the Connect-REST method to start an HTTP request/response interaction between the Pega Platform and the external system identified by a Connect REST rule ( Rule-Connect-REST rule type).

  • Connect-SOAP method

    Use the Connect-SOAP method to invoke a Web service identified in a Connect SOAP or Connect SAP rule ( Rule-Connect-SOAP rule type).

  • Connect-Wait method

    Use the Connect-Wait method

  • Commit method

    Use this method 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).

  • Activity-Clear-Status method

    Use this method to clear the activity status value, setting it to Good or another status determined by the operation of the parameter.

  • Activity-End method

    This method appears in activities that support the Pega Platform infrastructure, but is otherwise rarely needed. In ordinary circumstances, use the Exit-Activity method, not Activity-End, to return to a calling activity from an internal step of the current activity.

  • Activity-List-Add method

    Three activity lists are maintained for each requestor, stored in Java constructs. The lists are:

  • Setting the status of an activity using the Activity-Set-Status method

    Use the Activity-Set-Status method to set the execution outcome of an activity. This method sets the status (pxMethodStatus property) of the activity to the severity that you specify.

  • Apply-DataTransform method

    Use the Apply-DataTransform method to invoke a data transform for updating an existing clipboard page or pages. (In contrast, use the Page-New method to create a new page and invoke a data transform in a single step.)

  • Apply-Parse-Delimited method

    Use this method to locate and execute a Parse Delimited rule ( Rule-Parse-Delimited rule type). Parse Delimited rules parse character-delimited data into multiple property values on the clipboard.

  • Apply-Parse-Structured method

    Use this method to locate and execute a Parse Structured rule ( Rule-Parse-Structured rule type). Parse Structured rules parse structured text string into property values added to the clipboard. The source of the input data depends on which rule type calls this method:

  • Apply-Parse-XML method

    Use this method in activities to parse an XML document contained in the value of a property and add them to the step page. This method locates and executes a Parse XML rule ( Rule-Parse-XML rule type) and parses the XML document text into values for multiple other properties.

  • Assert-No-Invocation method

    Reserved. Do not use this method.

  • Assign-EstablishContext method

    Do not use this deprecated method.

  • Call-Async-Activity method

    Use the Call-Async-Activity method to load data pages asynchronously (into background threads) to allow other processing to continue.

  • Call-Automation method

    Call automations from an activity without using a Java step.

  • Call-Function

    Use the Call-Function method to call a Rule-Utility-Function that returns a value for a property or parameter. Unlike calling functions by using the Property-set method, functions that are called by using the Call-Function method can also return a value of void.

  • End-Validate method

    This method is used only for custom rule types, to end the processing that develops rule references. Use this method as the last step in an activity of Activity Type Validate when the class of the activity is a Rule- class and the Start-Validate method was used as the first step.

  • Exit-Activity method

    The Exit-Activity method ends the current activity and returns control to the calling activity.

  • Flow-End method

    Use this method to immediately end a flow execution, before execution reaches a Flow-End shape.

  • Flow-New method

    This instruction spins off a new flow for a case.

  • History-Add method

    History classes are created automatically in many cases:

  • History-List method

    Use the History-List method to obtain a list of History- instances for a class.

  • Index-Finish method

    Do not use this deprecated method. Use Declare Index rules to define indexing.

  • Link-Objects method

    Use this method to create an instance of a concrete class derived from the Link- base class. A link functions as a bidirectional cross reference to associate two objects together.

  • Using the Load-DataPage method

    Use the Load-DataPage method to load a data page in a background thread.

  • Log-Message method

    Use the Log-Message method to append a message to the Pega log when the step is reached. Depending on method parameters and the current logging level, a line is added to the Pega log on the current node.

  • Map-Structured method

    Use the Map-Structured method to invoke a map structured rule ( Rule-Map-Structured rule type) to assemble a text property value from property values on a clipboard page, or disassemble a single text property value into other property values.

  • Obj-Browse method

    Use the Obj-Browse method to search instances of one class and copy the entire instances, or specified properties, to the clipboard as an array of embedded pages.

  • Obj-Delete method

    Use the Obj-Delete method to delete a database instance corresponding to a clipboard page and optionally to delete the clipboard page too. You can cause the deletion to occur immediately, or (more commonly) defer deletion until a later execution of a Commit method.

  • Obj-Delete-By-Handle method

    Use the Obj-Delete-by-Handle method to delete an instance identified by its handle. This method executes the operations of the Obj-Open-By-Handle method followed (if successful) the Obj-Delete method.

  • Obj-Filter method

    Use the Obj-Filter method to filter the embedded pages of a results page (such as a Code-Pega-List page produced by the RDB-List, Obj-List-View or Obj-Browse methods) based on one or more when condition rules.

  • Obj-List-View method

    Use the Obj-List-View method to execute the retrieval and sorting operations, but not the formatting and display processing, of a list view rule.

  • Obj-Open method

    Use the Obj-Open method to open an instance stored in the PegaRULES database or in an external database linked to an external class, and save it as a clipboard page.

  • Obj-Open-By-Handle method

    The handle of an instance is a unique key, in an internal format, assembled by the system that identifies an instance in the PegaRULES database. It may differ from the visible key generally used to identify instances. (Every instance has a unique handle, but more than one instance may share the same visible key.) For rule instances, the handle includes system-generated identifying values (including the create date and time) that make it unique.

  • Obj-Refresh-and-Lock method

    Use this method to assure that the contents of the step page are current and a lock is held on the corresponding object.

  • Obj-Save method

    Use this method to request that the system save a clipboard page to the PegaRULES database or, if the page belongs to an external class, an external database.

  • Obj-Save-Cancel method

    Use this method to cancel the most recent uncommitted Obj-Save method, so that the instance is not written as part of a later Commit operation. You can also use this method to undo an Obj-Delete that has not yet been committed.

  • Obj-Sort method

    Use this method to sort the clipboard pages that are the values of a property of mode Page List. You can specify one or more properties to sort on, and whether the sort sequence is ascending or descending for each sort level.

  • Obj-Validate method

    Use this method to apply a validate rule ( Rule-Obj-Validate rule type) for the object identified on the primary page or step page.

  • Page-Change-Class method

    Use this method to change the class of the top-level page or embedded page identified in the Step Page column. (To change the class of an embedded page, see How to Change the Class of a Page.)

  • Page-Clear-Messages method

    Use the Page-Clear-Messages method to remove all property messages and certain page messages from the page identified in the Step Page column of the current step.

  • Page-Copy method

    Use this method to copy the contents of a source clipboard page to a new or previously created destination clipboard page. The Page-Copy method does not alter the source page.

  • Page-Merge-Into method

    Use the Page-Merge-Into method to merge the contents of two or more pages into one page. Specify the source pages in the MergeFromList parameter.

  • Page-New method

    Use the Page-New method to create a page on the clipboard. The new page may be a top-level page or an embedded page.

  • Page-Remove method

    Use this method to delete one or more pages from the clipboard. The contents of the database are not affected.

  • Page-Rename method

    Use this method to rename a top-level page, or to name a primary page.

  • Page-Set-Messages method

    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. If the page is an embedded page, the message is added to all its parent pages.

  • Page-Unlock method

    Use this method to unlock a page in the unusual situation that the page was locked during the Obj-Open operation but the ReleaseOnCommit parameter was not selected.

  • Page-Validate method

    Use the Page-Validate method to force validation (or revalidation) of the value of all properties on the step page. The system adds a message to each clipboard property that fails validation against the restrictions in its property.

  • Privilege-Check method

    Use this method to determine whether the current requestor has access to a specific privilege ( Rule-Access-Privilege rule type). The privileges that a requestor holds are determined by the contents of the Privilege tab of the set of Access of Rule to Object rules associated with the access roles of the user.

  • Property-Map-DecisionTable method

    Use the Property-Map-DecisionTable method to evaluate a decision table and save the result as the value of a property.

  • Property-Map-DecisionTree method

    Use the Property-Map-DecisionTree method in to evaluate a decision tree ( Rule-Declare-DecisionTree rule type) and store the result as the value of a property.

  • Property-Map-Value method

    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.

  • Property-Map-ValuePair method

    The Property-Map-ValuePair method evaluates a two-dimensional map value identified in the parameters. It sets the value that results into a specified property.

  • Property-Ref method

    Use this method to establish links that identify a partner non-reference property for one or more reference properties.

  • Property-Remove method

    Use this method to delete a property or properties and its associated value from the step page or another specified page. This does not affect the property, its definition.

  • Property-Seek-Value method

    Use this method to initiate backward chaining computations for the value of a property, based on Declare Expression rules.

  • Property-Set-Messages method

    Use this method to associate a text message with a property. The system reads the appropriate property and adds the message to the property. If a property is on an embedded page, the message is added to all its parent pages.

  • Property-Set-Stream method

    Use this method to save the contents of an HTML or XML stream, after stream processing completes, as the value of a Single Value property. The property value can then be mapped as output for transmission to an external system.

  • Property-Set method

    Use this method to set the value of one or more specified properties.

  • Property-Set-XML method

    Use this method to save the contents of an XML Stream rule after stream processing completes as the value of a Single Value property. The property value can then be mapped as output and conveyed to an external system.

  • Property-Validate method

    Use the Property-Validate method in an activity to ensure that a property value meets certain requirements including:

  • Property-Set-Corr method

    Use this method to save the contents of a correspondence stream (generally HTML text) as the value of a Single Value property. The property value can then be mapped as output for transmission to an external system.

  • Publish-Notifications

    Use the Publish-Notifications method to publish the top-level scalar and value list properties of a clipboard page to a notification channel.

  • Queue-For-Agent method

    Use this method when constructing the application logic that queues items such as work items or assignments to be processed in the background by an agent. This method stores a request for processing as a persistent object (entry) in the system queue. The method specifies:

  • RDB-Delete method

    Use this method to delete a row or rows from an external relational database using SQL. This method operates in conjunction with an SQL statement in the Delete tab of a Connect SQL rule (Rule-Connect-SQL rule type) that contains the DELETE, TRUNCATE or DROP SQL statement.

  • RDB-List method

    Use this method to retrieve rows from an external relational database and place the results as embedded pages in a specified step page of class Code-Pega-List.

  • RDB-Open method

    Use this method to retrieve a single row (record) of data from an external relational database and add the retrieved data into a specified clipboard page as property names and values.

  • RDB-Save method

    Use this method to save the contents of a clipboard page into a row of a relational database. The system saves the properties on the specified step page to the specified table in the database.

  • Requestor-Stop method

    Use this method to halt processing of the requestor and log off the requestor. This method operates on the pxRequestor page.

  • Rollback method

    Use this method to cancel or withdraw any previous uncommitted changes to the PegaRULES database (and to external databases accessed from an external class) from the current Thread. All pending Obj-Save and Obj-Delete methods are canceled.

  • Show-Applet method

    Do not use this deprecated method. It is replaced by the Show-Page method.

  • Show-Applet-Data method

    Do not use this deprecated method. It is replaced by the Show-Property method.

  • Show-HTML method

    Use the Show-HTML method to cause the activity to process an HTML rule and send the resulting HTML to a user for display by a browser. Known as stream processing. 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.

  • Show-Page method

    Use the Show-Page method to send an XML representation of the step page to a user's browser session, typically as an aid to debugging.

  • Show-Property method

    Use the Show-Property method to send the value of a single scalar property on the clipboard page identified in the Step Page column to a user's browser session, as an aid to debugging.

  • Show-Stream method

    Use the Show-Stream method to apply stream processing to an HTML rule, correspondence rule, or XML Stream rule, and send the results to a browser-based requestor session.

  • Start-Validate method

    Use this method only when building custom rule types, to start the internal processing that develops rule references. Use this method as the first step in an activity of Activity Type Validate when the class of the activity is a Rule- class and rule referencing is to be available.

  • StringBuffer-Append method

    Use this method to manipulate local variables of type String Buffer for the current activity that are contained in a Java StringBuffer object. This method appends a text string to the current contents of the buffer.

  • StringBuffer-Insert method

    Use this method to manipulate local variables of type String Buffer for the current activity that are stored in a Java StringBuffer object. This method inserts a string into the buffer at a specific byte offset position.

  • StringBuffer-Reset method

    Use this method to clear a local variable of type String Buffer of an activity, setting its value in the Java StringBuffer to the null string. Local variables are defined on the Parameters tab of the activity form.

  • TaskStatus-Set method

    Use this method in activities with an Activity Type of Utility that return a value that a flow rule can examine to make decisions. The system can test the output of this method to determine which connector to take.

  • Text-Normalize method

    Use this method to apply a parse normalize rule ( Rule-Parse-Normalize rule type) to convert a source text string to a normalized form.

  • Thread-Clear method

    Use this method to clear the Thread pages for your current session, except for any pages specified in the KeepPages parameter.

  • Thread-Stop method

    This method is deprecated for new development.

  • Wait method

    Use this method to pause a thread for a specified time interval. This method causes the current thread to wait a specified time interval (at least) before continuing with activity processing. (This method performs a Java sleep().)

  • Wait-For-Requestor method

    This method is deprecated. See the equivalent method Connect-Wait.

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