Use the Response tab to specify how the service rule constructs the response that
Pega Platform sends when the service processing is complete. You can set up
more than one response, based on conditions. After you choose a Condition, click the
Expand icon at the start of the row to make more fields visible. Enter
fields for a response message corresponding to that condition. (See below for instructions.)
Click the Collapse icon to hide these fields.
Field |
Description |
Condition
|
Select one of the following conditions. These conditions are evaluated in the
order they are entered. Only the first matched condition is evaluated.
-
Default – Send this response when there are no errors to
report. If you plan to set up more than one condition, configure the
Default condition as the last one in the list.
-
When – The system evaluates the when condition specified by the
When Key field. If the condition is true, the system returns the response
message data. If the condition is false, the system evaluates the next when
condition rule in the list. If all listed when condition rules are false, it
returns the default response data. Use this feature to extend the normal set of
fatal error conditions that result in exceptions returned to the client, such as
inappropriate inputs to the service activity or other tests that you define.
-
Mapping Error – If an error occurs while mapping incoming data
from a request message to the clipboard, the service returns the specified
response message data. If the list of response conditions does not include an
entry for mapping errors, Pega Platform returns a standard
error message.
-
Security Error – If an error occurs during authentication of
the user credentials, Pega Platform returns the specified
response message data. If the list of response conditions does not include an
entry for security errors, the Pega Platform returns a
standard error message.
-
Service Error – If a service error occurs, the system sends
the specified response message data. If the list of response conditions does
not include an entry for service errors, Pega Platform
returns a standard error message to the sender of the email.
|
Message Type
|
Select one of the following:
-
None to send no response when the condition defined in this row
applies.
-
Text message to send the response described by this row.
|
When Name
|
(Optional) Leave this field blank unless the Condition value for the row is
When . Enter the name of a when condition to evaluate. The system
uses the first key part (Primary Page Class) of this Service Email rule as the
Applies To key part of the when condition rule. |
Header fields
Use this section to specify the data to be used for the From and Subject headers for the
response message.
Field |
Description |
Name
|
Select From or Subject. |
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:
-
Clipboard – A property or a page on the clipboard.
-
Constant – A fixed value that does not change.
-
XML Stream – A stream of XML data provided by an XML Stream
rule.
-
HTML Stream – A stream of HTML data provided by an HTML rule.
-
HTML Frame – A stream of HTML data generated by the service
activity.
|
Map From Key
|
Specify the key to locating the property or rule in the source specified in
the Map From field:
- If the Map From value is
Clipboard , enter the reference to
the property. Standard properties are available for your use. See More about Service Email
Rules.
- If the Map From value is
Constant , enter a literal text
string. To include blank spaces in your text string, surround the string with
double quotes.
- If the Map From value is
XML Stream , enter either the Stream
Name (second key part) of the appropriate XML rule or a page name and stream
name using the syntax PageName.StreamName. The page must be on the clipboard
when the service rule runs for rule resolution to find the rule. If you specify
the stream name only, the system uses the Page Class of this service rule (found
on the Service tab) as the first key part of the HTML rule.
- If the Map From value is
HTML Stream , enter either the
Stream Name (second key part) of the appropriate HTML rule or a page name and
stream name using the syntax PageName.StreamName. (The page must be on the
clipboard when the service rule runs for rule resolution to find the rule.) If
you specify the stream name only, the system uses the Page Class of this service
rule (on the Service tab) as the first key part of the HTML rule. You can use
the standard HTML rule named EmailHeader for the Subject. See
More about Service
Email Rules.
- If the Map From value is
HTML Frame , enter the name of the
Frame specified in the Show-HTML step of the service activity. Use this option
to return data from activities that were originally written for interactive
browser clients and use the Show-HTML method.
|
Message data
Use the fields in this section to define the message body for the response message.
Field |
Description |
Description
|
Enter a short description of the message body. |
Map From
|
Specify the source or the type of source of the value in Pega Platform:
-
Clipboard – A property or a page on the clipboard.
-
Constant – A fixed value that does not change.
-
XML Stream – A stream of XML data provided by an XML Stream
rule.
-
HTML Stream – A stream of HTML data provided by an HTML rule.
-
HTML Frame – A stream of HTML data generated by the service
activity.
If additional choices appear, they identify a custom function rule in a
MapFrom library. Review the function rule to determine what it
does.
|
Map From Key
|
Specify the key to locating the property or rule in the source specified in
the Map From field:
- If the Map From value is
Clipboard , enter the reference to
the property.
- If the Map From value is
Constant , enter a literal text
string. To include blank spaces in your text string, surround the string with
double quotes.
- If the Map From value is
XML Stream , enter either the Stream
Name (second key part) of the appropriate XML rule or a page name and stream
name using the syntax PageName.StreamName. The page must be on the clipboard
when the service rule runs for rule resolution to find the rule. If you specify
the stream name only, the system uses the Page Class of this service rule (found
on the Service tab) as the first key part of the HTML rule.
- To maintain backward compatibility for service rules created in releases
before 5.2, you can specify a data mapping with only a Namespace value. In that
case, the system at runtime determines the Element Name key part from the root
element of the incoming XML document. However, this mapping works only if the
Parser Type of the Parse XML rule is set to
DOM and validation
is not enabled. Best practice is to specify both the Namespace Name and the
Element Name of the rule.
- If the Map From value is
HTML Stream , enter either the
Stream Name (second key part) of the appropriate HTML rule or a page name and
stream name using the syntax PageName.StreamName. (The page must be on the
clipboard when the service rule runs for rule resolution to find the rule.) If
you specify the stream name only, the system uses the Page Class of this service
rule (on the Service tab) as the first key part of the HTML rule. You can use or
adapt the standard HTML rule EmailResponse for the message
body. See More about
Service Email Rules.
- If the Map From value is
HTML Frame , enter the name of the
frame specified in the Show-HTML step of the service activity. Use this option
to return data from activities that were originally written for interactive
browser clients and use the Show-HTML method.
- If the Map From value is a Rule-Utility-Function from a
MapFrom library, either select the property that holds the
value to be processed by the function at runtime or leave this field blank, as
appropriate for the function.
|