Question


Societe Generale
IN
Last activity: 15 Feb 2016 2:31 EST
How to get the Java exception thrown by Data transform
Could any body tell me how to get the Java exception thrown by a Data Transform.
This is required for me to set that exception in a property and save that in a table.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 15 Feb 2016 0:34 EST


Societe Generale
IN
Thanks for your suggestion Phani,
But we have got the work around which requires minimal changes to the existing code. Please see the details below.
Create a generic activity(ApplyDataTransform) at baseclass to execute the data transform and log the DT name (if it fails) in the same activity. Update all Apply-DataTransform methods with (Call ApplyDataTransform) and pass the DT name as a parameter in All the activities where logging is required for DT.
ApplyDataTransform Activity
Main Activity with multiple Data transform calls
Note: Logging the DT name which is triggered from another DT is not possible with this approach


Pegasystems Inc.
IN
would any of the following rules help?
- @getStackTrace(tools, "pyOutput")
- @getErrorMessages(tools, "pyOutput")
- @statusFailExceptionThrown()
- @Utilities.getWorstMessage(tools)
- @Default.hasMessages(myStepPage)


Societe Generale
IN
Thanks for the Response Phani,
I tried all the methods which you have mentioned and it did not work since the stacktrace log is not there on the step page.
My exact requirement here is to get the name of Data transform in which the exception occurred (I have many data transforms called in activity).
could you please help me in achieving this requirement. Thanks in advance.


virtusa
IN
see u want any user defined error to show to end user???


Societe Generale
IN
No Prasanth,
My exact requirement here is to get the name of Data transform in which the exception occurred (I have many data transforms called in activity).


virtusa
IN
just run the tracer it will help u to find the name of the data transform


Societe Generale
IN
Hi Prasanth,
The development has been completed with more than 100 Data transforms.
For ease of trace the problems in production we have decided to store the Data transform name in the error table.
We have a work around to get the name of the DT using out param but at present it is very painful to implement the changes in all the DTs to achieve this requirement.
We are looking for a smart solution for this issue.


Pegasystems Inc.
IN
straight through learning the data transform name may be tedious unless we updating the DT rule, but manipulating the exception message may help.
- @(Pega-RULES:Default).pxGetPageMessages()
- @(Pega-RULES:Default).pxLogMessage("<PageName>")
If we can call the DT rules in Collection rule - we may get the benefit of OOTB audit log mechanism...
please refer: https://community.pega.com/sites/default/files/help_v72/procomhelpmain.htm
Accepted Solution
Updated: 15 Feb 2016 0:34 EST


Societe Generale
IN
Thanks for your suggestion Phani,
But we have got the work around which requires minimal changes to the existing code. Please see the details below.
Create a generic activity(ApplyDataTransform) at baseclass to execute the data transform and log the DT name (if it fails) in the same activity. Update all Apply-DataTransform methods with (Call ApplyDataTransform) and pass the DT name as a parameter in All the activities where logging is required for DT.
ApplyDataTransform Activity
Main Activity with multiple Data transform calls
Note: Logging the DT name which is triggered from another DT is not possible with this approach


virtusa
IN
gud solution subramanyam...:)