0% found this document useful (0 votes)
57 views4 pages

Exception Handling in Pega

Uploaded by

balaji babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views4 pages

Exception Handling in Pega

Uploaded by

balaji babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Logging - Exception Handling by

Using Data pages


Logging : Logging means writing the messages in to files on server. The log files end with an
extension .log;

Log files helps the developers / support resources to find the cause of issues that happens after
transaction processing is done. Generally while business users are accessing the live applications the
error that may occur can be written into the log files. This files are persisting on the application
server.

Access the Logging Level Settings tool by clicking Designer Studio >
System > Operations > Logs > Logging level settings.

Logging levels
Each level causes messages of that level and above to be written to the log
file. Following are the possible logging levels, listed from highest (most
severe) to lowest (least severe):

 OFF – Turns off logging.

 FATAL – Indicates severe errors that can cause the application to


terminate.

 ERROR – Indicates serious errors that might allow the application to


continue running.

 ALERT – Pega Platform-specific messages that indicate that a


performance threshold has been exceeded, or that an event has
occurred that has an adverse performance implication.

 WARN – Indicates situations that might have an adverse


performance implication.

 DEBUG – Indicates informational events useful for debugging.

 ALL – Indicates that all messages are logged

 INFO – Which we use in activity to write logging for information


purpose which will be appended to PRPC logging in addition.
 InfoForced — If the LoggingLevel parameter is set to InfoForced, a
message is added to the Pega log on the current node.

Severity levels range from DEBUG (lowest level, most messages)


to INFO, WARN, ERROR, and FATAL (highest level, fewest messages).

For example, if the logging level is set to ERROR, log messages with a
severity of ERROR and FATAL are written to the log file.

There are different types of logs in PEGA

1. Pega logs  The PRPC processing related to core rules of pega can be done here
2. Alert Logs  Logs where PEGA writes the logging related to DB interactions.
3. Bix logs -> ETL
4. Security  Related to access info/issues etc…

PEGA000 Browser Browser interaction time has exceeded a threshold setting. See How to
1 Interaction monitor interactive response times.
PEGA000 DB Commit Database commit operation has exceeded a threshold setting. See How to
2 Time detect lengthy PegaRULES database operations.
PEGA000 DB Rollback Database rollback operation has exceeded a threshold setting. See How
3 Time to detect lengthy PegaRULES database operations.
PEGA000 DB Bytes Number of bytes received from the database has exceeded threshold.
4 Read See How to monitor Storage Stream operations.
PEGA000 Database query operation has exceeded an elapsed time threshold setting.
DB Time
5 See How to detect lengthy PegaRULES database operations.
PEGA000
PRPC Started PegaRULES engine successfully started.
8
PEGA000 PRPC Failed
PegaRULES engine failed to initialize.
9 Start
PEGA001 Agent
Agent processing disabled because of execution errors
0 Disabled
Services — One of five time thresholds was exceeded during a service
PEGA001 Service Total
execution See Testing Services and Connectors on the Integration page of
1 Time
the Pega Developer Network.
The number of records in the rule assembly cache, a personal cache, or a
property conclusion cache has reached or exceeded about 75% of the limit
PEGA001 Cache
specified in the prconfig.xml file; This causes the system to invalidate older
6 Reduced
entries in the cache, making room for newer ones. See Understanding
caching.
The number of records in the rule assembly cache, a personal cache, or a
property conclusion cache has reached or exceeded a limit specified in the
PEGA001 Cache Force
prconfig.xml file. This causes the system to immediately invalidate older
7 Reduced
entries in the cache, making room for additions. See Understanding
caching.
PEGA001 PRThreads
Number of PRThreads has exceeded the threshold for a requestor.
8 Limit
PEGA001 Long The master agent has detected a long-running requestor session. See How
9 Requestor to detect long-running requestors.
PEGA002 Connect A connector call to an external system has exceeded an elapsed time
0 Total Time threshold. See How to detect lengthy connector executions and
Testing Services and Connectors, located on the Integration page of the
Pega Developer Network.
PEGA002 Declarative The total of shared memory to store Node-scope declarative pages has
1 Page Memory exceeded a threshold. See More about Declare Page rules.
PEGA002 Rule Cache The rules cache became disabled, typically by an administrator using the
2 Disabled System Management Application.
PEGA002 Rule Cache The rules cache became enabled, typically accomplished by an
3 Enabled administrator using the System Management application.
Loading
PEGA002 Loading declarative network has exceeded an elapsed time threshold.
Declarative
4 See How to detect large declarative networks.
Network
Reading Blob A list operation (for example, an Obj-Browse method) accessed properties
PEGA002
Need within the Storage Stream (blob) column, that is, properties not exposed
5
Columns as individual columns.
Database
PEGA002 The elapsed time taken to acquire a database connection exceeded a
Connection
6 threshold. See How to detect long database connection waits.
Time
PEGA002 DB Rows A list operation returned many rows. See How to detect database list
7 Returned operations that return many rows.
Collection usage threshold exceeded for long-lived object memory pool. A
PEGA002 JVM Garbage
garbage collection operation completed, but did not free sufficient virtual
8 Collection
memory.
PEGA002 HTML Stream An HTML stream sent to the browser exceeds 2,000 kilobytes (or another
9 Size threshold setting). See How to detect large HTML streams.
The number of requestors on a system node exceeds 200 (or another
PEGA003 Requestor
threshold setting). See How to detect when the number of requestors
0 Limit
exceeds the threshold.
A generated HTML stream was overwritten without being sent to the
PEGA003 Stream
browser client. See How to detect when a generated stream was
1 Overwritten
overwritten but never sent.
Rule change invalidated the specified threshold of entries in the Rule
PEGA003 Invalidated
Assembly cache. See How to detect when a rule change invalidates
2 Rules
many entries in the Rules Assembly cache.
Database query length has exceeded the specified threshold See How to
PEGA003 DB Query
detect when the database query length has exceeds a specified
3 Length
threshold.
The number of declare indexes in a single interaction exceeded threshold.
PEGA003 Declare
See How to detect when the number of declare indexes exceed a
4 Index
threshold.
A Page List property contains more than a specified threshold number of
PEGA003 Clipboard List
elements. See How to detect when a Page List property has many
5 Size
elements.

ID Message text and description


Database update operation has exceeded a threshold setting. See How to detect
PEGA0006
lengthy PegaRULES database operations. Reported as PEGA0005.
Database operation has exceeded a threshold setting. See How to detect
PEGA0007
lengthy PegaRULES database operations. Reported as PEGA0005.

ID Category Message text and description


SECU000 Security alert; an HTTP request referenced an unexpected property.
Security
1 These can arise from an improperly coded URL JavaServer Page tag.
Security alert; an HTTP POST operation sent an XML document
SECU000
Security containing clipboard page details from a web node within a Pega
2
Composite Application.
Security alert. A requestor on a web node, within a Pega Composite
SEC0003 Security Application, attempted to execute an activity or list view rule that is
not marked for web node execution. The attempt was ignored.
SEC0004 Security Security alert. A URL received from a web node, within a Pega
Composite Application, contained the pyStream parameter. The URL
was ignored.

D:\PRPCPersonalEdition\tomcat\work\Catalina\localhost\prweb/PegaRULES.log

1. Data pages
2. Activities
3. Connection Problem Flow for retrying

Any technology the exception handling mechanism is a way of Hiding the Error situation and it’s
message from end users and displaying them a “Generic Error Message”.

Exception handling can be implemented by Writing our own activities.

1. Exceptions handling can be done manually by writing our own activities and data transforms.
2. Utilizing OOTB activities / data transforms provided by PEGA.

1. Data Pages : While using data pages we can do exception handling using two OOTB data
transforms.
a. pxDataPageHasErrors – When rule
b. pxErrorHandlingTemplate - Data trnasform

2. Activities : Using activities we can do exception handling by calling above Data Transforms
3. In the connectors we can do it by calling connection problem flow which is by default
available in connector rules.

@getWorstMessage(tools) : this will return the exception related full message.

We can also send http response codes

 200 – The request was processed without any errors.


 500 – An error occurred during processing.
 401 – An authentication problem occurred.

There is an OOTB decision table provided pega under @baseclass which will have error codes.

pxErrorClassificationToHttpStatusCode for which we pass pyHTTPResponseCode proeprty

Done

You might also like