Conflict
  • 22 Feb 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Conflict

  • Dark
    Light
  • PDF

Article Summary

The Conflict component comprises of the Update with Check block that is used only in services built for offline apps. This block helps to capture conflicts that may arise when offline updates are synchronized with the EdgeReady server.updatewithcheckbloc

How does the block work?

The database table consists of a digest column where a hash value is generated when updates are made to specific columns of a record. An hash value is first generated and stored when the record is inserted for the first time in the table. 

In offline mode, if any update is made to the record by different users,  the initial hash value gets updated for each update. The "Update with Check" block carefully compares these hash values with the initial one before each update. If the hash values match, the update proceeds without issues. However, if it detects a change in hash, indicating that another user has already modified the record, a conflict is raised.

The details of the conflict are displayed in Console > Conflicts tab. The admin, upon reviewing the Conflicts log, resolves it appropriately.

updatewithcheck-new

  • 1 -  ER database table
  • 2 - Hash column
  • 3 - result - stores the status of the update denoted by: 0= Success (no conflict), 1=Failure (conflict has occurred).

A detailed sample usecase to understand how the block works can be read at Sample Implementation.



Was this article helpful?

What's Next
ESC

Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses