Conflict in Data Services

How can you handle data conflicts in UiPath dataservices when multiple users updates the same record simultaneously

Hi @M_Krishnaveni_20-542 ,

Handle data conflicts in UiPath Data Services by using optimistic concurrency control.

This ensures that only the last update made to a record is saved, and any conflicting updates are rejected.

You can handle rejected updates by displaying an error message or prompting the user to resolve the conflict.

Regards
Happy Automation

@M_Krishnaveni_20-542

One common approach is to use optimistic concurrency control. In this method, you track a version or timestamp associated with each record. When a user tries to update a record, the system checks whether the version or timestamp matches the current version. If it doesn’t match, it means another user has modified the data in the meantime, and a conflict is detected. You can then handle the conflict by notifying the user, merging changes, or taking other appropriate actions.

Thanks and Cheers…!

1 Like

Basically Versioning allows you to track the changes that have been made to a record over time. This information can be used to resolve data conflicts. For example, you could compare the versions of the record and merge the changes from both users.

But there are few more things to consider

  • Use optimistic concurrency. This is the default approach in UiPath Data services. With optimistic concurrency, each user’s changes are committed to the database independently. If two users try to update the same record at the same time, the database will return a conflict error to one of the users. The user can then decide whether to overwrite their changes with the other user’s changes, or to retry their update.

  • Use pessimistic concurrency. With pessimistic concurrency, users must lock a record before they can update it. If a user tries to lock a record that is already locked by another user, the database will return a conflict error. The user can then wait for the other user to finish updating the record, or they can try to lock the record again later.

  • Use a custom conflict resolution strategy. You can write a custom conflict resolution strategy to handle data conflicts in any way that you want. For example, you could implement a last-writer-wins strategy, or a merge strategy that combines the changes from both users.

For more details

Hope this helps

Cheers @M_Krishnaveni_20-542

@M_Krishnaveni_20-542

Handle data conflicts in UiPath Data Services by implementing a version control or timestamp mechanism, enabling conflict resolution policies, and maintaining an audit trail to track changes made by multiple users.

cheers…!

1 Like

Let us know for any clarification @M_Krishnaveni_20-542