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

Exceptional Handling

Exception
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)
19 views4 pages

Exceptional Handling

Exception
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

Exceptional handling:

If any error comes during process, we need to handle to do some logging and display generic UI ,…etc.

Exception handle can be done using a

Activity, at jump, in step end. When we are doing obj-open, if the step status fail we have to do something.

 How can you handle the exception in the activity?


We can use this method after any step in the activity. When the error comes in one step we can call when
“stepstatusfail”, then we will directly jump to later step. In that step we can call methods like log message method
and property-set-message method.

a. What is the use of log-message method?


Here we can give one message to display. We have to select the log level among (debug, info, warn, alert, error fatal)
Parameters: message and logging level.
This method mainly used to see exception in the production because in production, tracer is not available. This
method is not useful to display the message to user.
If you want to display exception to user, here we can take property set message method.
b. Property-set-message?
It is used to display the message with property.
Method parameters: field and message

 How can you handle the exception with connectors?


For connectors: like connect soap, connect rest, and connect SQL)

After the execution of connect rules in activity:

In the activity, if want to call connect rules like SOAP, REST and SQL etc, here also we can do exception handling using
jump to later step label, then we will do log message and property-set-messages methods. This exception handling is
after the completion of execution of connect-SOAP or any other rules. Then data will receive the error message on the
page. Then jump to later step and there we will use methods to display the methods. This is in activity for connectors.

The error comes while making the connectors.

That cannot be handling in the activity. In the connect rules, we can see error handling category, here you can see one
flow error handling in one OOTB flow “connection problem”.

In connect-SOAP, we can see error handling category. In connect-SQL, we can call this flow in error tab.

Connection problem flow:


Whenever an exception occurs, connection flow will get auto executed. The design of any connect problem flow can be
modified by yourself. You can see one utility shape here and you can call one log-messages method. But prpc internally
has all that rules. If you want go with your own connection problem flow by calling utility, activity, log message.

How connection problem flow will works?

If the connector fails, connection problem flow will automatically get executed. [Connection fails means if you are trying
to make a connection, there is timeout or resource is not available, 300, 400 connection flow will automatically get
executed.

This flow is going to see the resource is available. If the resource is not available or any exception, your case will transfer
to work basket (incomplete connections) by using assignment shape “wait for retry”. You can give access of this
incomplete connections workbasket to some operators. They will take care of executing this task manually if required.

That assignment wait for retry contains one SLA which is Retry Connection. This will have the time interval, 30 sec for
GOAL time, 2 mins for deadline and 10 mins (3 times) for passed deadline. For every interval it will escalate and in
passed deadline it will escalate the passed deadline.

So when this case is moved to this work basket. If no one is touching this work object from work basket, it will escalate
action accordingly. In the escalation, it is calling an activity which retry connection. It will retry the connection again.
Like that it will try for five times. We can modify this changes also.

Nothing happens after the five times escalation, as an operator you will log in and go to work basket if you have an
access to work basket. You can perform either of two actions, one is resume problem (55% of likelyhood) and other
cancel the assignment (45% likelyhood). Which means by default this flow action(resume problem) will be executed
and display the submit button. When we click, it will restart the problem flow. The process is again. If you cancel
assignment, it will cancel the current assignment. The work object will be preceded to further process in action work
flow.
Like prpc provides the connection problem or autos retry process.

Like this, the connection problem flow will helpful to do exception handling in case of connectors.

If you want to write our own text files, you have to use a method called connect file. This connect file is going to create a
new file on the server path which you passed. Writing into your own documents (not log) you have to use the method
called connect file. Create text document and write your own text.

FAULTS TAB:

Here you can some of properties in fault message field .

1. Fault code property: it is for single value text property which stores the value of the fault code returned in the
response.
2. Reason property: It can store the reason of the fault. This string holds the explanation about the faults code.
3. Details property: It contains the little info about the fault code.

We have two ways, connection problem flow and activity at the jump

 How can you handle the exception in the Datapages?


In the post processing activity, we can do exception handling

When the Datapage completed its processing: After Datapage is loaded completely, you execute post load processing
and there we can do the execution. After Datapage is completely available in clipboard, this activity will run. We have a
facility to call an activity in post load processing. Here we can call an activity. In activity we can use jump.

During the loading the Datapage: When we are operating activity using Datapage as source rule, then we can do
exception in the activity and not in the post load processing.

Services: in faults tab

In the methods, we have commit, rolleback and obj-save and cancel. These are used to handle the exceptions.

The log methods is write some details whatever that you provide here.

Pega logs in pega logs

Data base queries can see in the alert logs.

You might also like