Service REST form - Completing the Methods tab
Complete the Methods tab to identify the activity called by each method in this Service REST rule.
GET
In the Service Activity field, use the SmartPrompt to select the Service activity that provides the processing for this GET method. For example, when the request is using the GET method, the activity can get the current state of a work item.
In addition, when the Enable service SLA with fallback activity is selected on the Service tab, you can select a fallback activity for the response when the SLA fails. For example, the fallback activity can display a default offer to an ATM customer instead of an offer based on the particular customer's data. If you do not select a fallback activity, the default response is sent back.
The system uses the value you enter in the Page Class field as the Applies To key part of the activity. The system creates a page with the name provided in the Page Name field and passes it to the activity as the primary page. If the Page Name field is blank, the system passes an unnamed page to the activity.
If a parameter value is the same for every service request, you can set that parameter's value rather than requiring a client application to supply it in each request. For example, if a service activity starts a flow for a work item and the organization is always the same, specify the name of the organization on this tab.
Parameter values from the incoming request override values set on this tab.
GET Request tab
Use the Request tab to map data for the GET request.
Field | Description |
---|---|
HEADERS | |
Name | Enter the external name of the header field. |
Description | Describe the purpose of the header. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
QUERY STRING | |
Name | Enter the name of the input query string. |
Description | Describe the purpose of the query string. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
GET Response tab
Use the Response tab to specify how the service rule constructs the response that Pega Platform sends in reply to the request. You can set up more than one response, based on conditions. You can also specify additional HTTP response codes to send with the response.
When no response is configured on this tab, at runtime Pega Platform returns one of the following HTTP response codes by default:
- 200 — The request was processed without any errors.
- 500 — An error occurred during processing.
- 400 — An authentication problem occurred.
Field | Description |
---|---|
RESPONSE CONDITION | To override any of those codes, specify a response on this tab. Define each condition with the following four fields: |
Condition | Select one of the following conditions:
|
When Name | Optional, but required if the Condition value is set to When
or Queue When . Specify the name — second key part — of a when
condition rule to evaluate for this condition. The system uses the first key part —
the Applies To class — of the service activity as the first key part of the when
condition rule. |
Content Type | Select text/plain , text/html , or
text/xml for the header in the outgoing message. Select
Select |
Status Code | Optional. Enter an HTTP status code to return to the external application with the response. |
HEADER FIELDS | By default, Pega Platform sets values for the REST headers
Server , Cache-Control ,
Content-Type , Content-Length , and
Date in the response. Additionally, if the Processing Mode in the
service package is set to Stateful , the system sends the Requestor
ID value automatically to the client application as a token, in a cookie with the
prefix PegaRULES . If the response is include a header other
than the ones that are set by default, complete the fields in this section. The
data type of a header field is |
Name | Enter the external name of the header field. |
Description | Enter a short description of the header field. |
Map From | Specify the source or the type of source of the value in Pega Platform.
|
Map From Key | Specify the key to locating the property or rule in the source specified in
the Map From field.
|
MESSAGE DATA | Use the fields in this section to define the data for the response. The data
type of the message data is String . |
Description | Enter a short description of the incoming string. |
Map from | Specify the source or the type of source of the value in Pega Platform:
If additional choices appear, they identify a custom function rule in a
|
Use fast processing | This field is displayed when JSON is selected in the
Map from field. For complex JSON structures, if the
clipboard structure exactly matches the JSON structure, selecting this field
improves processing speed. For this option to work properly, use the following
guidelines when configuring your data model:
Page groups, value groups, and Java objects are not supported. |
Map from key | Specify the key to locating the property or rule in the source specified in
the Map to field:
|
POST
In the Service Activity field, use the SmartPrompt to select the Service activity that provides the processing for this POST method. For example, when the request is using the POST method, the activity can update the state of the work item to be Resolved-Completed.
In addition, when the Enable service SLA with fallback activity is selected on the Service tab, you can select a fallback activity for the response when the SLA fails. If you do not select a fallback activity, the default response is sent back.
The system uses the value you enter in the Page Class field as the Applies To key part of the activity. The system creates a page with the name provided in the Page Name field and passes it to the activity as the primary page. If the Page Name field is blank, the system passes an unnamed page to the activity.
If a parameter value is the same for every service request, you can set that parameter's value rather than requiring a client application to supply it in each request. For example, if a service activity starts a flow for a work item and the organization is always the same, specify the name of the organization on this tab.
Parameter values from the incoming request override values set on this tab.
POST Request tab
Use the Request tab to map data for the POST request.
Field | Description |
---|---|
HEADERS | |
Name | Enter the external name of the header field. |
Description | Describe the purpose of the header. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
QUERY STRING | |
Name | Enter the external name of the header field. |
Description | Describe the purpose of the header. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
MESSAGE DATA | Use the fields in this section to define the data for the response. The data
type of the message data is String . |
Description | Enter a short description of the incoming string. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
If additional choices appear, they identify a custom function rule (
Rule-Utility-Function rule type) in a |
Use fast processing | This field is displayed when JSON is selected in the
Map from field. For complex JSON structures, if the
clipboard structure exactly matches the JSON structure, selecting this field
improves processing speed. For this option to work properly, use the following
guidelines when configuring your data model:
Page groups, value groups, and Java objects are not supported. |
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
POST Response tab
Use the Response tab to specify how the service rule constructs the response that Pega Platform sends in reply to the request. You can set up more than one response, based on conditions. You can also specify additional HTTP response codes to send with the response.
When no response is configured on this tab, at runtime Pega Platform returns one of the following HTTP response codes by default:
- 200 — The request was processed without any errors.
- 500 — An error occurred during processing.
- 400 — An authentication problem occurred.
Field | Description |
---|---|
RESPONSE CONDITION | To override any of those codes, specify a response on this tab. Define each condition with the following four fields: |
Condition | Select one of the following conditions:
|
When Name | Optional, but required if the Condition value is set to When
or Queue When . Specify the name — second key part — of a when
condition rule to evaluate for this condition. The system uses the first key part —
the Applies To class — of the service activity as the first key part of the when
condition rule. |
Content Type | Select text/plain , text/html , or
text/xml for the header in the outgoing message. Select
Select |
Status Code | Optional. Enter an HTTP status code to return to the external application with the response. |
HEADER FIELDS | By default, Pega Platform sets values for the HTTP headers
Server , Cache-Control ,
Content-Type , Content-Length , and
Date in the response. Additionally, if the Processing Mode in the
service package is set to Stateful , the system sends the Requestor
ID value automatically to the client application as a token, in a cookie with the
prefix PegaRULES . If the response is include a header other
than the ones that are set by default, complete the fields in this section. The
data type of a header field is |
Name | Enter the external name of the header field. |
Description | Enter a short description of the header field. |
Map From | Specify the source or the type of source of the value in Pega Platform.
|
Map From Key | Specify the key to locating the property or rule in the source specified in
the Map From field.
|
MESSAGE DATA | Use the fields in this section to define the data for the response. The data
type of the message data is String . |
Description | Enter a short description of the incoming string. |
Map From | Specify the source or the type of source of the value in Pega Platform:
If additional choices appear, they identify a custom function rule in a
|
Use fast processing | This field is displayed when JSON is selected in the
Map from field. For complex JSON structures, if the
clipboard structure exactly matches the JSON structure, selecting this field
improves processing speed. For this option to work properly, use the following
guidelines when configuring your data model:
Page groups, value groups, and Java objects are not supported. |
Map From Key | Specify the key to locating the property or rule in the source specified in
the Map From field:
|
PUT
In the Service Activity field, use the SmartPrompt to select the Service activity that provides the processing for this PUT method. For example, when the request is using the PUT method, the activity can create a new work item.
In addition, when the Enable service SLA with fallback activity is selected on the Service tab, you can select a fallback activity for the response when the SLA fails. If you do not select a fallback activity, the default response is sent back.
The system uses the value you enter in the Page Class field as the Applies To key part of the activity. The system creates a page with the name provided in the Page Name field and passes it to the activity as the primary page. If the Page Name field is blank, the system passes an unnamed page to the activity.
If a parameter value is the same for every service request, you can set that parameter's value rather than requiring a client application to supply it in each request. For example, if a service activity starts a flow for a work item and the organization is always the same, specify the name of the organization on this tab.
Parameter values from the incoming request override values set on this tab.
PUT Request tab
Use the Request tab to map data for the PUT request.
Field | Description |
---|---|
HEADERS | |
Name | Enter the external name of the header field. |
Description | Describe the purpose of the header. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
QUERY STRING | |
Name | Enter the name of the input query string. |
Description | Describe the purpose of the query string. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
MESSAGE DATA | Use the fields in this section to define the data for the response. The data
type of the message data is String . |
Description | Enter a short description of the incoming string. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Use fast processing | This field is displayed when JSON is selected in the
Map from field. For complex JSON structures, if the
clipboard structure exactly matches the JSON structure, selecting this field
improves processing speed. For this option to work properly, use the following
guidelines when configuring your data model:
Page groups, value groups, and Java objects are not supported. |
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
PUT Response tab
Use the Response tab to specify how the service rule constructs the response that Pega Platform sends in reply to the request. You can set up more than one response, based on conditions. You can also specify additional HTTP response codes to send with the response.
When no response is configured on this tab, at runtime Pega Platform returns one of the following HTTP response codes by default:
- 200 — The request was processed without any errors.
- 500 — An error occurred during processing.
- 400 — An authentication problem occurred.
Field | Description |
---|---|
RESPONSE CONDITION | To override any of those codes, specify a response on this tab. Define each condition with the following four fields: |
Condition | Select one of the following conditions:
|
When Name | Optional, but required if the Condition value is set to When
or Queue When . Specify the name — second key part — of a when
condition rule to evaluate for this condition. The system uses the first key part —
the Applies To class — of the service activity as the first key part of the when
condition rule. |
Content Type | Select text/plain , text/html , or
text/xml for the header in the outgoing message. Select
Select |
Status Code | Optional. Enter an HTTP status code to return to the external application with the response. |
HEADER FIELDS | By default, Pega Platform sets values for the REST headers
Server , Cache-Control ,
Content-Type , Content-Length , and
Date in the response. Additionally, if the Processing Mode in the
service package is set to Stateful , the system sends the Requestor
ID value automatically to the client application as a token, in a cookie with the
prefix PegaRULES . If the response is include a header other
than the ones that are set by default, complete the fields in this section. The
data type of a header field is |
Name | Enter the external name of the header field. |
Description | Enter a short description of the header field. |
Map From | Specify the source or the type of source of the value in Pega Platform.
|
Map From Key | Specify the key to locating the property or rule in the source specified in
the Map From field.
|
MESSAGE DATA | Use the fields in this section to define the data for the response. The data
type of the message data is String . |
Description | Enter a short description of the incoming string. |
Map From | Specify the source or the type of source of the value in Pega Platform:
If additional choices appear, they identify a custom function rule in a
|
Use fast processing | This field is displayed when JSON is selected in the
Map from field. For complex JSON structures, if the
clipboard structure exactly matches the JSON structure, selecting this field
improves processing speed. For this option to work properly, use the following
guidelines when configuring your data model:
Page groups, value groups, and Java objects are not supported. |
Map From Key | Specify the key to locating the property or rule in the source specified in
the Map From field:
|
PATCH
In the Service Activity field, use the SmartPrompt to select the Service activity that provides the processing for this PATCH method.
In addition, when the Enable service SLA with fallback activity is selected on the Service tab, you can select a fallback activity for the response when the SLA fails. If you do not select a fallback activity, the default response is sent back.
The system uses the value you enter in the Page Class field as the Applies To key part of the activity. The system creates a page with the name provided in the Page Name field and passes it to the activity as the primary page. If the Page Name field is blank, the system passes an unnamed page to the activity.
If a parameter value is the same for every service request, you can set that parameter's value rather than requiring a client application to supply it in each request. For example, if a service activity starts a flow for a work item and the organization is always the same, specify the name of the organization on this tab.
Parameter values from the incoming request override values set on this tab.
PATCH Request tab
Use the Request tab to map data for the PATCH request.
Field | Description |
---|---|
HEADERS | |
Name | Enter the external name of the header field. |
Description | Describe the purpose of the header. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
QUERY STRING | |
Name | Enter the name of the input query string. |
Description | Describe the purpose of the query string. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
MESSAGE DATA | Use the fields in this section to define the data for the response. The data
type of the message data is String . |
Description | Enter a short description of the incoming string. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Use fast processing | This field is displayed when JSON is selected in the
Map from field. For complex JSON structures, if the
clipboard structure exactly matches the JSON structure, selecting this field
improves processing speed. For this option to work properly, use the following
guidelines when configuring your data model:
Page groups, value groups, and Java objects are not supported. |
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
PATCH Response tab
Use the Response tab to specify how the service rule constructs the response that Pega Platform sends in reply to the request. You can set up more than one response, based on conditions. You can also specify additional HTTP response codes to send with the response.
When no response is configured on this tab, at runtime Pega Platform returns one of the following HTTP response codes by default:
- 200 — The request was processed without any errors.
- 500 — An error occurred during processing.
- 400 — An authentication problem occurred.
Field | Description |
---|---|
RESPONSE CONDITION | To override any of those codes, specify a response on this tab. Define each condition with the following four fields: |
Condition | Select one of the following conditions:
|
When Name | Optional, but required if the Condition value is set to When
or Queue When . Specify the name — second key part — of a when
condition rule to evaluate for this condition. The system uses the first key part —
the Applies To class — of the service activity as the first key part of the when
condition rule. |
Content Type | Select text/plain , text/html , or
text/xml for the header in the outgoing message. Select
Select |
Status Code | Optional. Enter an HTTP status code to return to the external application with the response. |
HEADER FIELDS | By default, Pega Platform sets values for the REST headers
Server , Cache-Control ,
Content-Type , Content-Length , and
Date in the response. Additionally, if the Processing Mode in the
service package is set to Stateful , the system sends the Requestor
ID value automatically to the client application as a token, in a cookie with the
prefix PegaRULES . If the response is include a header other
than the ones that are set by default, complete the fields in this section. The
data type of a header field is |
Name | Enter the external name of the header field. |
Description | Enter a short description of the header field. |
Map From | Specify the source or the type of source of the value in Pega Platform.
|
Map From Key | Specify the key to locating the property or rule in the source specified in
the Map From field.
|
MESSAGE DATA | Use the fields in this section to define the data for the response. The data
type of the message data is String . |
Description | Enter a short description of the incoming string. |
Map From | Specify the source or the type of source of the value in Pega Platform:
If additional choices appear, they identify a custom function rule in a
|
Use fast processing | This field is displayed when JSON is selected in the
Map from field. For complex JSON structures, if the
clipboard structure exactly matches the JSON structure, selecting this field
improves processing speed. For this option to work properly, use the following
guidelines when configuring your data model:
Page groups, value groups, and Java objects are not supported. |
Map From Key | Specify the key to locating the property or rule in the source specified in
the Map From field:
|
DELETE
In the Service Activity field, use the SmartPrompt to select the Service activity that provides the processing for this DELETE method. For example, when the request is using the DELETE method, the activity can update the state of the work item to be Resolved-Rejected.
In addition, when the Enable service SLA with fallback activity is selected on the Service tab, you can select a fallback activity for the response when the SLA fails. If you do not select a fallback activity, the default response is sent back.
The system uses the value you enter in the Page Class field as the Applies To key part of the activity. The system creates a page with the name provided in the Page Name field and passes it to the activity as the primary page. If the Page Name field is blank, the system passes an unnamed page to the activity.
If a parameter value is the same for every service request, you can set that parameter's value rather than requiring a client application to supply it in each request. For example, if a service activity starts a flow for a work item and the organization is always the same, specify the name of the organization on this tab.
Parameter values from the incoming request override values set on this tab.
DELETE Request tab
Use the Request tab to map data for the DELETE request.
Field | Description |
---|---|
HEADERS | |
Name | Enter the external name of the header field. |
Description | Describe the purpose of the header. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
QUERY STRING | |
Name | Enter the name of the query string. |
Description | Describe the purpose of the query string. |
Map To | Specify the destination or the type of destination for the value in Pega Platform:
|
Map To Key | Specify the key to locating the property or the rule in the destination
specified in the Map To field:
|
DELETE Response tab
Use the Response tab to specify how the service rule constructs the response that Pega Platform sends in reply to the request. You can set up more than one response, based on conditions. You can also specify additional HTTP response codes to send with the response.
When no response is configured on this tab, at runtime Pega Platform returns one of the following HTTP response codes by default:
- 200 — The request was processed without any errors.
- 500 — An error occurred during processing.
- 400 — An authentication problem occurred.
Field | Description |
---|---|
RESPONSE CONDITION | To override any of those codes, specify a response on this tab. Define each condition with the following four fields: |
Condition | Select one of the following conditions:
|
When Name | Optional, but required if the Condition value is set to When
or Queue When . Specify the name — second key part — of a when
condition rule to evaluate for this condition. The system uses the first key part —
the Applies To class — of the service activity as the first key part of the when
condition rule. |
Content Type | Select text/plain , text/html , or
text/xml for the header in the outgoing message. Select
Select |
Status Code | Optional. Enter an HTTP status code to return to the external application with the response. |
HEADER FIELDS | By default, Pega Platform sets values for the HTTP headers
Server , Cache-Control ,
Content-Type , Content-Length , and
Date in the response. Additionally, if the Processing Mode in the
service package is set to Stateful , the system sends the Requestor
ID value automatically to the client application as a token, in a cookie with the
prefix PegaRULES . If the response is include a header other
than the ones that are set by default, complete the fields in this section. The
data type of a header field is |
Name | Enter the external name of the header field. |
Description | Enter a short description of the header field. |
Map From | Specify the source or the type of source of the value in Pega Platform.
|
Map From Key | Specify the key to locating the property or rule in the source specified in
the Map From field.
|
MESSAGE DATA | Use the fields in this section to define the data for the response. The data
type of the message data is String . |
Description | Enter a short description of the incoming string. |
Map From | Specify the source or the type of source of the value in Pega Platform:
If additional choices appear, they identify a custom function rule in a
|
Use fast processing | This field is displayed when JSON is selected in the
Map from field. For complex JSON structures, if the
clipboard structure exactly matches the JSON structure, selecting this field
improves processing speed. For this option to work properly, use the following
guidelines when configuring your data model:
Page groups, value groups, and Java objects are not supported. |
Map From Key | Specify the key to locating the property or rule in the source specified in
the Map From field:
|