cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MDK delete UpdateEntity action request after upload

dhanikawick41
Participant
0 Kudos

Hi Experts,

In the MDK app, after user changes an object, I am saving them using the UpdateEntity action. During the sync, if there are any errors, I am reading the ErrorArchive Entity and giving the user the option to reprocess the failed requests.

But what I noticed was, even if the user does not manually reprocess the failed request, it automatically gets resent in the next sync.

I saw that there are remove after upload options for Create Media and Create Entity actions.

How can I delete a specific UpdateEntity action after a upload, without it being reprocessed in the next sync?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert

The intention with a failure is that the user has an opportunity to correct the record (if necessary) or that the data might succeed on a second upload (if for example a record is locked in the backend when the update is received).

If you delete the update from the offline queue you are cancelling the update (rolling it back).

dhanikawick41
Participant
0 Kudos

Hi bill.froelich

Thank you for your reply.

I have a doubt on "If you delete the update from the offline queue you are cancelling the update (rolling it back)."

You mean if the update entity request is somehow deleted when the upload process it completed in a sync, in case of a failure, the ErrorArchive would not have the request details?

But what I do not understand is, even when the user does not select to reprocess, the failed request still goes to the backend in the next sync. How can I avoid that?

Thank you.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you perform an offline update on your local datastore two things happen. The local db is updated with the new values and a transaction to stored in the request queue to be sent to the backend during the next upload. If the upload of that transaction fails for whatever reason the transaction stays in the request queue and the Error Archive is updated with the failure info.

If you want to delete the transaction from the request queue, then the local db update needs to also be rolled back. Otherwise, your local db is in an inconsistent state with your backend. The error archive provides info related to the failure so that potentially the user could update the record again to correct the error which will then go to the backend on the next upload.

Answers (0)