Question
Coforge
IN
Last activity: 27 Oct 2021 2:35 EDT
Unable to handle PRRuntime Exception in obj-open/obj-open-by-handle
Whenever the Workobject is corrupted, obj-open-by-handle step is throwing PRRunTime Exception and the activity stops abruptly without entering in to the transition jump step.
Is there a way to handle this scenario?
There are few discussions already made on this topic, however no solution tagged yet.
Ref Discussion : https://collaborate.pega.com/question/issue-exception-handling-obj-open-open-handle-method
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 27 Oct 2021 2:35 EDT
Coforge
IN
@KotaC382 : Thanks for the detailed explanation. I have tried this approach and again when the data page is referred as step page to check the when condition, the activity did not proceed with the pre-condition and it stopped there.
However based on the approach you suggested, it gave me a thought on keeping a child activity to perform this Obj-Open step alone. So now the child activity stops with exception and the calling activity's transition step is working fine for the condition "On exception" - Jump to later step with provided label.
Thanks for your support :)
Coforge
IN
@Niladri I have added StepStatusFail & HasMessages in the transition step. The problem here is when the OBJ-OPEN-BY-HANDLE method is called with valid pzinskey, activity ends with PRRuntimeException. I dont even see the step end in tracer.
It goes like this, Step-Begin, Runtimeexception, Activity End. Thereby transition step is not getting executed.
Additionally the Obj-Open-By-Handle is called inside the loop, and for this scenario the expectation is to exit the current iteration only.
Maantic
IN
add a step in your activity to log the message if such error occurs and label it, say EXCP.
mention this step in the step transition with StepStatusFail when rule and in the exception block as well.
Coforge
IN
@Avik Mitra : I have tried StepStatusFail, HasMessages in transition when condition & On Exception, jump to next step label also.
https://collaborate.pega.com/question/issue-exception-handling-obj-open-open-handle-method
This thread explains exactly the issue that I'm facing now, I guess there is an alternate to do obj-open using java method which will catch the exception.
Maantic
IN
have you tried the java step mentioned?
are you also trying to open instances in loop ?
before you go with custom java, you can try with D page look up once and see if you are still facing same issue or not.
Cognitonic Systems Australia
AU
@Surendar Try using data Page by passing the value of InsKey to the data page. If Data Page contains data then data is retrieved successfully else there is an issue.
Approach:
Enable Reload Once Per Interaction and Limit to Single Data Page options on the data page so that whenever value changes DPage will be triggered.
Inside the loop in one of the Pre-Condition verify .pyErrorPage.pyStatusMessage!="" Exit Iteration else Continue When and specify the parameterized data page on the step page. This parameter value should be dynamic, set before execution of this step.
-
Ramsurendar Govindarajan
Accepted Solution
Updated: 27 Oct 2021 2:35 EDT
Coforge
IN
@KotaC382 : Thanks for the detailed explanation. I have tried this approach and again when the data page is referred as step page to check the when condition, the activity did not proceed with the pre-condition and it stopped there.
However based on the approach you suggested, it gave me a thought on keeping a child activity to perform this Obj-Open step alone. So now the child activity stops with exception and the calling activity's transition step is working fine for the condition "On exception" - Jump to later step with provided label.
Thanks for your support :)