Exception handling in Pega Activities
Exception handling in java methods can be done in many ways. We can log the reason for the exception, the respective stack trace and we can even manage to print the stack trace to your application specific logs(java does that by default though) explicitly using Reflection API or many other mechanisms. Pega also have such mechanism to exception handling in Activity rules. This can be done using standard when conditions named StepStatusGood and StepStatusFail(in @baseclass) in transitions of activities. These when conditions internally uses pxMethodStatus property to validate whether the execution of the particular step is successfull or failure. pxMethodStatus property will be updated regulary with the status after end of each step execution and before the start of the next step execution. We also have a boolean named hasMessages which informs you whether a page contains one or more page messages. Any page which has one or more messages are treated invalid page ...