Hi,
I am developing a Smart Sync application and I am trying to read the ErrorConflict inbox. There is a special class for it called surprisingly ErrorConflictInbox. I have at the backend a call transaction logic, and I am simulating an error in this giving bad datum data to the call transaction. I am exporting a RETURN structure and after the call transaction I set the fields of it. In merep_mon transaction I can see that the return type of my BAPI is 'E' (error) though no error text can be seen in the transaction. What is worse, on the client side I can see no message regarding this error. In merep_mon I can see a line telling: Inbox data deleted (mobile ID = 0000000167, sequence number = 26). Could it be the cause that no error message appear on the client side? Or my approach is totally wrong?
I am using the following code:
try {
SyncBoDescriptor sbd = dbAccess.getSyncBoDescriptor(SYNCBO_NAME_CREA );
ErrorConflictInbox errorConflictInbox = SmartSyncRuntime.getInstance().getInboxNotifier().getErrorConflictInbox();
MeIterator it = errorConflictInbox.getSyncBoResponses(sbd);
while( it.hasNext() ) {
SyncBoResponse sbr = (SyncBoResponse) it.next();
String text = sbr.getText();
aLogger.log(Severities.DEBUG, "PALS: SyncBoResponse = {0}", text );
}
} catch( Exception e ) {
aLogger.log(Severities.DEBUG, "PALS: SyncBoResponse = {0}", "Error reading SyncBo responses" );
aLogger.log(Severities.DEBUG, "PALS: SyncBoResponse = ", e.getMessage() );
}
So does anybody know how to handle errors and conflicts and how to show it to the user when I restart the application after synchronization?
Any help is highly appreciated.
Regards,
Pal