Service REST form - Completing the Service tab

Complete the Service tab to identify the activity called by this Service REST rule.

Primary Page

Field Description
Page Class Required. Select the page class for the primary page for the data returned by this service.
Data Transform Optional. Select a data transform to use with this service to normalize the data received.
Page Name Required. Provide a name for the primary page. The name cannot include spaces or special characters.

Resource Properties

Field Description
Service endpoint URL
The complete URL for the REST endpoint.
URI template or Resource Path The URI template that was created or edited on the Create service REST page. This field is named Resource Path for rules that were created before 8.1.
URI path parameters URI path parameters are automatically populated from the URI template that was created or edited on the Create service REST page. These parameters can be literal or variable values. Variable parameters are populated with values at runtime.
Name The name of the variable resource parameter in the resource path.
Description A description for this parameter.
Map To The destination or the type of destination for the value in the Pega Platform :
  • Clipboard — Map to the page name or property on the clipboard specified by the Map To Key field.
  • If additional choices appear, they identify a custom function rule ( Rule-Utility-Function rule type) in a MapTo library. Review the function rule to determine its purpose.
Map To Key The key used to locate the property or the rule in the destination that is specified in the Map To field:
  • If the Map To value is Clipboard, enter the property name to which the data is mapped at run time.
  • If the Map To value is a Rule-Utility-Function from a MapTo library, select a property to hold the results of the function, or leave the field blank.

Processing options

End requestor when done When the Processing Mode field on the service package data instance is set to Stateful, select this option to have the system end the requestor after the activity ends and the response is sent If the services are stateless, the value in this field is ignored.
Method is read-only Leave this option cleared in most cases. Select this option to indicate that each use of this service is not to count as a service invocation under the terms of your license agreement. See Working with the License Compliance facility.
Enable service SLA with fallback activity Optional. This option is displayed for asynchronous execution modes. When selected, you can configure a fallback activity for a time-out. For example, when the service activity is not finished after a configured amount of time and the maximum number of violations has occurred, the fallback activity is called. No further requests are attempted until the retry interval has passed. If the next attempt is successful, normal processing is resumed.

Using a service SLA ensures that a logical response is made in a timely manner. Configure the fallback activity on the Methods tab. If a fallback activity is not configured, the default response is sent back.

Maximum duration for service activity (milliseconds) This option is displayed when you select Enable service SLA with fallback activity. Enter the amount of time, in milliseconds, after which the service activity is considered to have failed. The default is 500 milliseconds.
Maximum consecutive violations This option is displayed when you select Enable service SLA with fallback activity. Enter the number of SLA violations that must occur before the fallback activity is called. The default is 3.
Retry interval (seconds) This option is displayed when you select Enable service SLA with fallback activity. Enter the amount of time, in seconds, to wait before attempted to process the service activity. The default is 10 seconds.
Lightweight clipboard mode Select this option to run the service with lightweight clipboard pages. Using this mode improves performance; however, not all clipboard features are supported. The following clipboard features are supported:
  • Hierarchical structure – Arbitrarily deep and complex tree structure formed by pages, lists, groups, and so on.
  • JAVA objects – Pages can be wrapped around Java objects.
  • Complex references – APIs on the page support arbitrarily complex property reference strings, including list subscript symbolics such as <APPEND>, <FIRST>, and so on.
  • Messaging – Message metadata can be attached to properties and pages, for example, as a result of validation, Rule-Declare-Constraints, or various APIs and activity methods
  • Dictionary – Information specified on the Property rule form is available during clipboard processing.
  • Serialization/deserialization – Save page structure and contents for storage on disk or in a database, then later restore the page into memory.

The following clipboard features are not supported:

  • Properties referencing a data page
  • Linked properties
  • Referenced properties
  • Limited support for declaratives
  • Limited support for declare expressions/backward and forward chained
  • Change tracking for property value updates in the user interface
Execution Mode Select one of the following options:
  • Execute synchronously – select this option when you want the service to run the request immediately.
  • Execute synchronously (queue on error) – select this option when you want the service to queue the request for asynchronous execution only in the event of a processing failure while executing the service activity. If there is no processing error, the result is the same as a normal synchronous request. If there is a processing error, the error details are stored in a Service Request Processor data instance ( Data-Admin-RequestProcessor-Service class), along with the request data that was originally mapped to the clipboard. The service returns the Queue Item ID to the external application, and the request is either reprocessed automatically by an Agent configured for queue processing, or manually by a system administrator.
  • Execute asynchronously (queue for execution) – select this option when you want the service to queue the request for asynchronous execution, return the Queue Item ID to the external application, and end the service call while the processing starts. Choose this option only when a Service Request Processor data instance ( Data-Admin-RequestProcessor-Service class) exists with a key that matches the Service Package key part of the service rule. This means that when the queued service request executes, the execution is performed with the authorization profile of the service.

For more information, see the Pega Community articles How asynchronous service processing works and Configure a service to process requests asynchronously.

Request Processor If you select the Execute asynchronously check box in the Execution Mode field or you configure a Queue When condition on the Response tab, you must also select the name of the service request processor (the instance of Data-Admin-RequestProcessor-Service ). The list in this field displays only the request processors that are defined for the same service package as this service rule.
Service monitoring Click the Gear icon to specify whether to monitor this rule, and when monitoring, whether to include the clipboard state. Service package monitoring configuration settings are used only if the service/EnableGlobalMonitoring Dynamic System Setting is set to Deferred and the service package is set to As defined on service rule.
  • In the Select service monitoring field, select whether to enable monitoring for this rule.
  • If you enable monitoring, in the Capture clipboard state field, you must select whether to include the state of the primary data page in the monitoring results.