Support Article
Tabbed section is not loading with data
Summary
User has configured IAC gadget, in one of the screen user has configured a button with refresh this section with activity. In that activity user is performing below actions:
- Page-Rename action to rename the pyWorkPage.
- Call createWorkPage to create new pyWorkPage.
- Call AddWork to create new work work object.
After clicking the button, user is getting loading... message, however actual data is not loading as expected.
Error Messages
In logs, it is throwing Transaction id mismatch exception.
Steps to Reproduce
- Configure a tabbed section with some data.
- Configure a button with refresh this section with activity.
- Create IAC gadget for this work flow.
Root Cause
User / Operator error:
In the last assignment of screenflow, there is button to create another workobject and then it triggers the refresh section which is containing the tab group layout.
Creation of work object updates the transaction id at server side. Transaction id gets updated when the commit happened at server end.
The next request, refresh section initiates with old transaction id, so it fails due to transaction id mismatch.
Resolution
Perform the following local-change:
After applying below changes, now it is working as expected.
1. Add a java step as first step with below code:
((PegaDatabase)tools.getThread().getDatabase()).setCurrentTransaction("Test");
2. Next steps will be steps to create new work object.
3. Add a java step as Final steps with below code to end the transaction:
try{
((PegaDatabase)tools.getThread().getDatabase()). assertTransactionComplete();
}catch(DatabaseException de){
oLog.error("Deferred operations list is not empty; you should commit or rollback the operations before running this method");
}catch(Exception e){
oLog.error("Unkown exception occurred while completing the transaction");
}
Published November 22, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.