cancel
Showing results for 
Search instead for 
Did you mean: 

Conflict detection scheme : How it works

Former Member
0 Kudos

Hi all,

In DOE if i select my data object and click Data Object Overview tab then i see a section called Conflict detection scheme what its mean and how it work can anyone please explain me.

Below is my scenario where conflict is occuring and i am unable to handle it.

A Mobile device will be given to 2 users say U1 and U2 so both the users can see same data.Now say there are 2 different orders say O1 and O2 to be completed and both U1 and U2 will see these orders.

Now U1 will complete the order O1 , and U2 will complete the order O2 . Now first U1 will sync so it will update order O1 , O2 in backend and O2 will be blank as he did not touch it.

After U1 , U2 syncs after completing order O2 now problem occurs here U2 has not filled anything in order O1 so O1 is blank and O2 is filled.

So when U2 syncs it updates O2 and O1 both so O2 is updated in Backend and O1 is again made blank as it will sync again with backend.How to avoid this situation.

Regards,

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Conflict Detection is used to avoid more than one devices or backend updating same instances or same item of instances.

1) If you want to prevent different entities updating a same instance you need to go for 'First One wins Object Level' conflict detection scheme.

2) If you want to prevent different entities updating a same item of an instance you need to go for 'First One wins Row Level' conflict detection scheme.

3) Last one wins will always update with who ever updates last. i.e. No conflict check.

In your case, you need to go for 'First One wins Object Level' scheme.

1) U1 updates(completes) O1 and sync. The changes are accepted since U1 has changed first. Now assume user U2 has not synched. So he will not have latest O1.

2) U2 updates(completes) O2 and O1 sync. Changes to O2 will be accepted because U2 has changed first. Changes to O1 will be rejected because U2 is updating second and dont have latest O1 image. U2 will also get latest image of O1 along with rejection.

Hope this clears your doubt.

Regards,

Dhana

Answers (2)

Answers (2)

Former Member
0 Kudos

Seeing your specific case, unable to understand why O2 is updated blank in BE when U1 sync?

This should not happen at all.Why is O2 send from U1's device when he has updated only O1?

Conflicts occur on the same instance between BE and receiver or multiple receivers.

It need to be checked why 2 messages are sent from client when one user sync after updating one order..Is this the issue?

Regards,

Liji

Former Member
0 Kudos

Hi Abhishek,

The conflict detection schemes are explained below

Last one wins : This is a no conflict scenario. Suppose the instance A1 is updated from backend and pushed to DOE. Meanwhile before this change could reach mobile device , the same instance A1 is modified by user and synchronized. Since last one wins configuration is set , client will not get a rejection , rather DOE will update the CDS with the image of A1 that client has send and the same gets updated in backend also. In short , if same fields are modified by backend and client ,backend get updated with values from client. If its different fields , then backend will have its changes along with fields that client modified.

First one wins Object level : If backend modifications are pushed to DOE first , then mobile user sends changes to any record for the same instance , mobile user gets a rejection message .

First one wins row level : If backend modifications are pushed to DOE first , then mobile user sends modifications to the same record for the same instance , mobile user gets a rejection message.

CONFLICT_DETECTION_FOR_BACKEND : This backend configuration in the admin and monitoring portal is meant to check with backend if there are any changes to the current instance being changed by client . This means if this configuration is set, even if backend modifications are not pushed to DOE , once the client modifications reach DOE , backend will be queried for the same instance and if any change in backend exist, rejection will be send to the mobile user.

Latest backend changes also will be send to the mobile user in the rejection cases.

Regards,

Liji