Skip to main content

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

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Defining resource and processing details for a Service REST rule created prior to Pega Platform 8.4

Updated on April 5, 2022

Use the Service tab of the Service REST rule to configure the mapping of the URL path parameters, data transforms, and other configuration options for your service.

If you created a Service REST rule prior to Pega Platform 8.4 that has a data transform or a page name value, configure the page and data transform details in the Primary page section.

  1. On the Service tab of your Service REST rule, in the Primary page section, complete the following fields:

    1. In the Page class field, enter the class of the primary page for this service.

    2. In the Data transform field, specify a data transform to run on the service page before processing the request. Use this option to set defaults on the page.

    3. In the Page name field, enter a name for the page so that you can reference it from other rules. If you leave this field blank, a page name is automatically generated.

      Note: You can refer to the page as Primary from the Service REST rule and the activity or automation that it calls.
  2. In the Resource properties section, specify the following information:

    1. In the Name field, enter the name of the variable resource parameter in the resource path.

    2. In the Description field, enter a description for the variable resource parameter.

    3. In the Map to field, select the destination or the type of destination for the value in Pega Platform:

      • Clipboard – Map to the page name or a property on the clipboard specified by the Map to key field.
      • Automation input – Use an automation to implement the method. If you select this option for any resource path parameters, you must use an automation as your implementation for each method that you implement in your rule, and set the Map to key value for each method on the Methods tab.
    4. In the Map to key field, specify the key used to locate the property or the rule in the destination that you specify in the Map to field:

      • If the Map to value is Clipboard, enter the property name to which to map the data at run time.
      • If the Map to value is Automation input, this field is not editable. You specify the Map to key values on the Request tab of the method that you want to implement.
    Note: The following fields are read-only:
    • Service endpoint URL – Displays the complete URL for the REST endpoint.
    • URI template – Displays the name of the URI template that you create or edit on the Create Service REST page.
    • URI path parameters – URI path parameters populate automatically from the URI template that you create or edit on the Create Service REST page. These parameters can be literal or variable values. Variable parameters populate with values at run time.
  3. In the Processing options section, specify one of the following configurations:

    • End Requestor When Done – When the Processing mode field on the service package is set to Stateful, select this option to have the system end the requestor after the activity ends and the system sends a response. Stateless services ignore the value in this field. For more information, see Service Package form – Completing the Context tab.
    • Method is read-only – Select this option to indicate that each use of this service does not count as a service invocation under the terms of your license agreement. For more information, see License compliance.
    • Enable service SLA with fallback activity – This option displays for asynchronous execution modes. Select this option to configure a fallback activity for a time-out. For example, when the service activity does not finish 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 passes. If the next attempt is successful, normal processing resumes.
    • Maximum duration for service activity (milliseconds) – Enter the amount of time, in milliseconds, after which the service activity is considered to have failed. The default is 500 milliseconds. This option only displays if you select Enable service SLA with fallback activity.
    • Maximum consecutive violations – Enter the number of SLA violations that must occur before the fallback activity is called. The default is 3. This option only displays if you select Enable service SLA with fallback activity.
    • Retry interval (seconds) – Enter the amount of time, in seconds, to wait before attempting to process the service activity. The default is 10 seconds. This option only displays if you select Enable service SLA with fallback activity.
  4. If you select Enable service SLA with fallback activity, you can choose the method for setting the values in the Maximum duration for service activity (milliseconds), Maximum consecutive violations, and Retry internal (seconds) fields.

    • Provide values – Select this option to manually enter values in the Maximum duration for service activity (milliseconds), Maximum consecutive violations, and Retry internal (seconds) fields, or keep the default values.
      Note: For services created prior to Pega Platform 8.3, this is the default option.
    • Use application settings – Select this option to use the application settings to define the values in the Maximum duration for service activity (milliseconds), Maximum consecutive violations, and Retry internal (seconds) fields. In each field, use the Down arrow key to select an existing application setting from the list.

      Note: At run time, the application uses the values in the application setting that correspond with the current environment. For example, if you specify 30 seconds for the retry interval for the Development value, the application uses a 30-second retry interval in your Development environment at run time. If you do not specify any values, the application uses default values.
  5. To run the service with lightweight clipboard pages, in the Lightweight clipboard mode section, select the clipboard page that you want to use.

    1. Select Use application settings.

    2. In the Setting name field, press the Down arrow key and select a clipboard page.

    Note: Pega Platform 8.4 supports the following clipboard features:
    • Hierarchical structure – Arbitrarily deep and complex tree structure formed by pages, lists, groups, and so on.
    • JAVA objects – Pages can wrap around Java objects.
    • Complex references – APIs on the page support arbitrarily complex property reference strings, including list subscript symbolics, such as <APPEND>, <FIRST>.
    • Messaging – Properties and pages can include message metadata, 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 limited or 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
  6. In the Execution mode field, choose from the following execution methods:

    • Execute synchronously – Select this option if 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 if processing fails while executing the service activity.
      Note: If no processing errors occur, the result is the same as a normal synchronous request. If a processing error occurs, a Service Request Processor data instance (Data-Admin-RequestProcessor-Serviceclass) stores the error details, 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.
      Note: Choose this option only when a Service Request Processor data instance (Data-Admin-RequestProcessor-Serviceclass) exists with a key that matches the Service Package key part of the service rule. When the queued service request executes, the execution is then performed with the authorization profile of the service.
  7. In the Request processor field, select a request processor.

    Note: The list in this field displays only the request processors that are defined for the same service package as this service rule. If you select Execute asynchronously (queue for execution) in the Execution mode field, or you configure a Queue When condition on the Response tab of the service rule, you must also select the name of the service request processor (the instance of (Data-Admin-RequestProcessor-Serviceclass)).
  8. To specify whether to monitor this rule, and whether to include the clipboard state when monitoring, in the Service monitoring field, click Properties.

    Note: 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.
    1. To enable monitoring for this rule, in the Select service monitoring field, select Yes.

    2. If you enable monitoring and you want to include the state of the primary data page in the monitoring results, in the Capture clipboard state field, select Yes.

    3. Click Submit.

  9. The Service package (includes additional processing options) section displays a link to the service package that contains your Service REST rule. To navigate to the service package if you need to make changes, click the link.

  10. Click Save.

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. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us