Friday, August 31, 2012

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 in pega and cannot be persisted.

But, one very important missing point here is, the actual error message will not be found any where at design time. That is, there is no such property pega provides to hold the error message of the exact reason for the exception or the step failure. One has to dig into the logs or tracer to find out the error reason. This is really uncomfortable while developing applications. There is no any out of the box property that holds the the error message of the exception. It sounds so ridiculous why such a basic thing is not provided in pega?

A bit of R&D showed me this. An activity ActivityStatusExceptionHander in @baseclass handles the error message displaying in the window like this,


Digging into this activity showed me that, a property pyMessageLabel is the property which gets to hold the error message in case of exception. But after the harness display, the page which holds the pyMessageLabel is being deleted. So, if you want to customize the functionality you have to save this ActivityStatusExceptionHander activity to your local rule set and try on to hold the error message and you can play around.

Feel free to contact me if i'm missing anything.

Wednesday, August 29, 2012

Useful Activities of Work- class

Some very useful activities from Work- class we use very often in our day-to-day development process are listed below. 

Work-.Add activity creates a new work object and performs a Commit method (without a cover object)

Work-.AddWork activity creates a new work object but doesn’t perform a Commit method

Work-.AddCovered activity creates a new covered work object and performs a Commit method

Work-.AddCoveredWork activity creates a new covered work object and doesn’t performs a Commit method

Work-.AddToFolder activity adds the work item to the folder

Work-.ActionNotifyQuick activity creates simple correspondence

Work-.CorrUpdate activity updates the correspondence

Work-.CorrNew activity creates a new correspondence

Work-.StartNewFlow activity starts an additional flow execution on the current work object.

Work-.ResumeFlow activity is typically called when a service level deadline or goal is not met, this activity forces completion of an assignment and advances the flow execution along a specified (connector) flow action.


Feel free to suggest if i missed any.

Tuesday, August 28, 2012

Pega Screen Flow


Pega screen flow is a flow category option provided by PRPC to gather/collect information from the user in a particular sequence. Screen flow enables the user to go back and forth and edit the information at any point of time till the form is submitted finally.

Screen flow can be created from New instance of FLOW rule dialog. The Template field has to be selected as screen flow.


Screen flows cannot create new work object and hence cannot be used to start an application. Because, "Creates a new work object?" option in the process tab of Flow rule will be disabled for screen flows. This also means, a screen flow is useless unless used in a starter(i mean standard) flow.

Screen flows can have embedded subflows. But normal standard flow cannot be added as subflow and only another screen flow can be added as subflow.

The available flow shapes for a screen flow are,


In screen flow, Flowactions are referenced by assignment shape rather than connectors(as we generally do in standard flows).

Screen flows can change the status of the work object to Resolved. This change of status can be set in an activity and this activity can be referred in the post activity of the flow action that is used in the screen flow.

Thursday, August 02, 2012

http://www.bigcinemas.com -- BIG FRAUD


I tried booking tickets at Big Cinemas, Ameerpet, Hyderabad through online booking on https://www.bigcinemas.com on 12 of July'12.

The booking process & show/seat selection went on smooth and i provided my credit card details on the website to confirm the booking. After some minutes of processing, its mentioned as "Some technical difficulties occurred during your booking process, Please check your email for confirmation.If you have not received any booking confirmation and your payment is deducted, Kindly contact us at
support@bigcinemas.com for your refund." -- Mind you, i didn't click on Back or Refresh on the browser for this to happen.

I immediately mailed to above email id to receive this response on 14th July.

Dear Guest,

Warm Greetings from BIG Cinemas !

We appreciate you taking the time to contact us and share your query.

We are not able to trace the failed transaction with the details received from you.

We request you to please forward us your credit card/account statement or a screen shot of the same.

We strive to provide the best quality service and look forward to your continued patronage.

Sincerely,
BIG Cinemas Support Team


Good that i captured the transaction failure screen and so i reverted them with the required snapshot of the failed transaction on 17 July as,

Hi Team,

As requested, attached is the snapshot of the Rs.480 charged to Reliance Media Works Mumbai IN on 12/7/2012. The transaction happened exactly on 2012-07-12:16:32:47

Kindly refund the amount at the earliest.

Regards.




Then after i received this mail from them on the same day.


Dear Thrinath Jalamadugu,

Warm Greetings From BIG Cinemas.

We understand the value of your time and deeply regret the inconvenience caused. Our team is working assiduously and diligently to process your refund, and we shall update you on refund Confirmation, as soon as possible. In the interim period, we request you for your understanding and patience.


In case, you need further help or assistance please do write to us at
support@bigcinemas.com.

Thank you for contacting Big Cinemas and we look forward to your continued patronage.

Sincerely,
BIG Cinemas Support Team.

After that, i didn't hear from them again. I dropped in a reminder on 27July for the related status and no response. Fed up with this mail communication, i called up the customer care numbers of Ameerpet, Hyderabad big cinemas to enquire about the same. But the guy on the other ends provided me a number 022 30978888 to find the quries related to the net booking stuff. I called this number some 10 times and yet no response. Wondering what to do!!!

Absolutely, idiotic behaviour from big cinemas. Being a reputed org. i didn't expect such a fraud from them. Bit of googling, i found this http://www.consumercomplaints.in/complaints/big-cinemas-c136234.html 
i'm not the only one to be cheated by these f***ing company.

Stay away from these frauds.