Skip to main content


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

Pega components

Updated on October 19, 2022

Use the Pega components on the Toolbox to add an Activity, RobotActivity, or RobotManagerRestClient to an automation.

Activity component

Use an Activity component in attended RPA to control the order of processing in solutions that use the Interaction Framework. These work items are defined in the Activities section of the Interaction.xml configuration file.

Every activity you define is represented by its own Activity component in an automation. Activities are started from the InteractionManager component. When a method starts an activity in one deployed package, it can fire an event within the same deployed package or in a different deployed package. Activities are queued and run in sequence within the Interaction Framework.

The following tables list the properties, methods, and events for the Activity component.

Properties

PropertyDescription
ActivityNameUse this property to customize the name of the activity in the automation.
ThisA reference to this component.

Methods

MethodDescription
ResetStateResets all component properties to their initial state.

Events

EventDescription
ActivityCanceledUse this event to indicate when an activity is canceled.
ActivityCompletedUse this event to indicate when an activity is completed.
ActivityStartedUse this event to indicate when an activity is started.

RobotActivity component

Use the RobotActivity component for unattended RPA to receive work cases from the Pega Platform.

A Robot Activity requires information from the platform (ActivityName and ClassName). The Fields collection of a RobotActivity is populated in Studio by connecting to the platform and getting the relevant records from the Pega case, identified by the ClassName, as shown in the following figure:

RobotActivity properties
RobotActivity properties highlighting the ClassName and Fields boxes.

The following tables describe the properties, methods, and events for RobotActivities.

Properties

PropertyDescription
ActivityNameUse this property to customize the name of the RobotActivity in the automation.
ClassNameThe class associated with this RobotActivity.
FieldsThe class fields associated with this RobotActivity.
ThisA reference to this component.

Methods

MethodDescription
GetCompletionStatusReturns the completion status of the activity.
RefreshDynamicMembersUpdates the dynamic components of the activity.
ResetStateResets all component properties to their initial values.
SetCompletionStatusAssigns the completion status of the activity.

Events

EventDescription
ActivityCanceledUse this event to indicate when an activity is canceled.
ActivityCompletedUse this event to indicate when an activity is completed.
ActivityStartedUse this event to indicate when an activity starts.

RobotManagerRestClient component

Use the RobotManagerRestClient component in Pega Robotic Automation to make a call to a REST API endpoint that Pega provides in a Pega Robot Manager environment. If the system returns data as a result of the REST API call, then you can retrieve this data and use it in automation.

A RESTful application such as Pega Robot Manager uses standard verbs like Get, Post, Put, Delete, and so on to retrieve and send data to and from a remote server. This component uses the JSON (JavaScript Object Notation) format to make the request and for output from the request.

When you add this component to an automation, the system places it on the Globals folder. This component must be global so other automations in the project can reference it.

The following tables describe the properties and methods available for the RobotManagerRestClient component:

Properties

PropertyDescription
AcceptDefines the accepted content type for the accept header. The default is application/json.
ContentTypeDefines the request content type. The default is application/json.
CustomHeadersDefines custom headers for the request as key value pairs. Click this property to open the Custom Header Editor window where you can define the custom headers.
HttpMethodDefines the HTTP method for the request. You can choose from the following options: Get, Put, Post, Delete, Head, Patch, Options, Connect, and Trace.
InputParametersSpecifies input parameters using key value pairs. The system then uses these key value pairs to generate the JSON body for the request. Click this property to open the Input Parameter Editor where you specify the name and values for these inputs.
OutputParametersAutomatically generates the output parameters returned by the REST call by making a REST call with a valid URI, HTTP method, and input parameters. You can also manually add output parameters if you are unable to perform a REST call at this time.
PasswordThe password to use when connecting to the Pega server.
ServerUriBaseDefines the base part of the URI for the REST endpoint that you are calling. This value comes from the CommonConfig.xml setting under the Robot Manager connection URL and allows the system to call the endpoint for the Pega server instance used for Robot Manager.
ServerUriFullDisplays the full URI, which is ServerUriBase + ServerUriPath. You cannot modify this value.
ServerUriPathDefines the path and query part of the URI for the REST endpoint that you are calling.
ThisUse as a reference to this object.
TimeoutThe timespan to wait in milliseconds before a request times out. If timeout equals zero, then the default value is used.
UriQueryParameters

Specifies input parameters using key value pairs. The system uses these parameters to generate the URI query string. Click this property to open a window where you can specify the name and values for these inputs.

After you define these input parameters, be sure to call the SetUriQueryWithParameters method. This method automatically sets the UriQueryString property.

Call this method before you use any of the execute methods to invoke the REST call.

UriQueryStringDefines the part of the URI that contains parameters. Set this property to override the value of the UriQueryParameters property. Setting this property also overrides the URI query string that is set by the SetUriQueryWithParameters method.
UsernameThe username to use when connecting to the Pega server.
UseRobotManagerConnection

This setting only applies when you do not start Pega Robot Runtime throughPega Robot Studio. There are Username and Password properties associated with this setting.

When running Pega Robot Runtime through Pega Robot Studio, the system uses basic authentication for communication with Robot Manager, using the username and password property values that you entered for the component.

If you are runningPega Robot Runtime stand-alone, and the UseRobotManagerConnection parameter is False, then basic authentication applies.

If you are running Pega Robot Runtime stand-alone and the UseRobotManagerConnection value is True, the system uses the authentication method defined in the CommonConfig.xml setting for the Robot Manager connection.

Methods

MethodDescription
AddCustomHeader (2 parameters)

Adds a custom header key value pair in an automation instead of having to define them ahead of time using the component’s properties.

This method has two input parameters, headerName and headerValue, which are both string parameters.

ClearCustomHeaders Clears all of the custom headers in the automation that you defined in the component properties or were added using the AddCustomHeader method.
Execute (3 parameters)

Executes the REST call. Use the string input parameter, requestBody, to enter a raw JSON request body.

This method has two output parameters, statusCode and responseBody. statusCode, returns the HTTP response code from the request. responseBody returns the raw JSON.

This method uses parameters defined in the response body instead of the input parameters defined for the component.

ExecuteWithParameters (2 parameters)

Executes the REST call using the settings that you defined in the RESTClient component.

This method has two output parameters, statusCode and responseBody. statusCode, returns the HTTP response code from the request. responseBody returns the raw JSON.

ExecuteWithParameters (x parameters)

Sets values for your input parameters during automation. It also gives you a value for each defined output parameter to use in automation.

This method displays in the method list for the component after you define output parameters.

This method has two other output parameters, statusCode and responseBody. statusCode, returns the HTTP response code from the request. responseBody returns the raw JSON.

GetResponseHeaderUse to retrieve a specific header value for a given header name.
RemoveCustomHeader (1 parameter)

Removes a specific custom header that you added using the AddCustomHeader method or by using the customHeaders property for the component.

This method has a string input parameter of headerName.

SetUriQueryWithParameters (no parameters)Call this method to set the URI query string using the parameters and values entered for the UriQueryParameters property.
SetUriQueryWithParameters (x parameters)

Sets the URI query string using the parameters entered in the UriQueryParameters property and allow you to set the values for these in automation.

This method has multiple inputs depending on how many parameters you add. The input type is string.

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