Skip to main content

Application methods

Methods form the backbone of the application interface, enabling an automation developer to use and integrate the application with their robotic projects seamlessly. When creating methods for applications, it is a best practice to document them so that they can be usable by all development teams, including those with less experience. Each method should follow the single responsibility principle, meaning that it should do one specific task, making it easier to read, understand, and maintain. 

Method overview

Use the application's Interface tab to add and document methods for your applications, and also build the method using the recording feature.  

In the following image, click the + icons to learn more about the method overview section and its elements: 

Visibility type

When developing applications, you have the option to create public or private methods. Private methods are used as helper methods within the applications and are accessible only within the application itself. They are utilized to assess the application state and internal conditions that are specific to your working scenario. For instance, in the Finance web application, private methods such as isDateMatch and isAmountMatch are defined to check conditions in the scenario, while helper methods like StripChars and ConvertToDbl handle string and number operations. It is important to note that private methods do not directly reflect the scenario that is connected with the application. For example, the ConvertToDbl method takes a String parameter representing an amount as input and converts it to a Double for calculations within the automation, as shown in the following figure: 

The Interface tab with private and public methods. the details setion of one example private method.

 

The palette in the application method

When creating methods for applications, the elements visible on the palette differ from those seen when you build the automation. You have access to all interrogated elements of the application within the palette. However, you will only have access to the Asset Globals, not the project Globals. To incorporate other elements from the application, such as properties, events, or methods into your method, drag the main application icon from the Application section of the Palette to the automation surface. Additionally, to utilize other methods from the application, including private methods and forms, you must use the Include button, as shown in the following figure: 

The include in palette dialog box displaying all methods available.
Note: Pega Robot Studio provides you with example automation projects that demonstrate the development and use of application assets. For more information about these projects, see Explore sample resources.

Check your knowledge with the following interaction: 


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

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 Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice