Pega components
Use the Pega components on the Toolbox to add an Activity, RobotActivity, or
RobotManagerRestClient to an automation. 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 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. 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: The following tables describe the properties, methods, and events for
RobotActivities. 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: 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. 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. 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. 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. 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. 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. 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. 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. Activity component
Interaction.xml
configuration file. Properties
Property Description ActivityName Use this property to customize the name of the activity in the
automation. This A reference to this component. Methods
Method Description ResetState Resets all component properties to their initial state. Events
Event Description ActivityCanceled Use this event to indicate when an activity is canceled. ActivityCompleted Use this event to indicate when an activity is completed. ActivityStarted Use this event to indicate when an activity is started. RobotActivity component
Properties
Property Description ActivityName Use this property to customize the name of the
RobotActivity in the automation. ClassName The class associated with this
RobotActivity. Fields The class fields associated with this
RobotActivity. This A reference to this component. Methods
Method Description GetCompletionStatus Returns the completion status of the activity. RefreshDynamicMembers Updates the dynamic components of the activity. ResetState Resets all component properties to their initial values. SetCompletionStatus Assigns the completion status of the activity. Events
Event Description ActivityCanceled Use this event to indicate when an activity is canceled. ActivityCompleted Use this event to indicate when an activity is completed. ActivityStarted Use this event to indicate when an activity starts. RobotManagerRestClient component
Properties
Property Description Accept Defines the accepted content type for the accept header. The
default is application/json. ContentType Defines the request content type. The default is
application/json. CustomHeaders Defines 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. HttpMethod Defines the HTTP method for the request. You can choose from the
following options: Get, Put, Post, Delete, Head, Patch, Options,
Connect, and Trace. InputParameters Specifies 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. OutputParameters Automatically 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. Password The password to use when connecting to the Pega server. ServerUriBase Defines 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.
ServerUriFull Displays the full URI, which is ServerUriBase + ServerUriPath.
You cannot modify this value. ServerUriPath Defines the path and query part of the URI for the REST endpoint
that you are calling. This Use as a reference to this object. Timeout The timespan to wait in milliseconds before a request times out.
If timeout equals zero, then the default value is used. UriQueryParameters UriQueryString Defines 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. Username The username to use when connecting to the Pega server. UseRobotManagerConnection Methods
Method Description AddCustomHeader (2 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) ExecuteWithParameters (2 parameters) ExecuteWithParameters (x parameters) GetResponseHeader Use to retrieve a specific header value for a given header
name. RemoveCustomHeader (1 parameter) 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)
Previous topic XMLDocumentComponent Next topic Runtime properties, methods, and events