cancel
Showing results for 
Search instead for 
Did you mean: 

Conflicts in DOE when the object does not exist in CDS.

Former Member
0 Kudos

Hi all.

SCENARIO:

I have implemented a SWCV with only a DO ( backend triggered). It has a Node structure with only one child structure.

My DO has three function:

- GETLIST: return a table with objects from R3 identified by WCRN.

- GETDETAIL: For each register from getlist, return a list of child registers with state : IMP or SEÑ.

This state in R3 may be IMP, SEÑ o NORM (but in devices, only I want them in state IMP o SEÑ)

- MODIFY: modify the state for a child register.

EXAMPLE:

For example, I create a parent object in R3 with 3 children registers with state IMP. This parent register with his three children registers are upload to CDS. When I syncronize, I obtain them in my device.

PROBLEM:

The problem starts when I modify the state to NORM of any child register in R3. Then, in DOE, this child register is deleted in CDS becouse as I have said before, the function GETDETAIL only returns registers in state IMPS o SEÑ. Automatically the queue

of my device is update too. Before syncronize my device, I change the state to SEÑ of the tree children registers in PDA. Then when I syncronize, the process tries to update then in CDS but one of this child register does not exist in DOE so I obtain the error text below in DOE:

Mesage: "Cannot update/delete object that does not exist in the CDS; node 'ZMOB_DESC_ETIQUETA' "

Service Name: KEYMAP_SERVICE_BV And in my Device, the child which generated the conflict does not exist (this is oK) but I continue having the others two children registers with the same state that I modified before syncronizing (SEÑ) while in R3 those two states are IMP.

I have tested to modify the 3 posibilities of conflict detection scheme of the DO but the problem continues.

I would like to know if there is any posibility or configuration to obtain the next scenario: when this conflict will occurs, GETDETAIL will run and depending on which source will have preference:

1- DEVICE PREFERENCE - the state from children registers in R3 will be updated to SEÑ.

2 - R3 PREFERENCE - the state from my children registers in the device will be the same as in R3 (IMP).

but never never never never will happens like now ( differente state in R3 and PDA after syncronizing)

Best regards

Edited by: Maria Elena Fernandez on Feb 10, 2010 12:52 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

ok, thanks

Former Member
0 Kudos

Hi,

I think the issue here is a single message is flowing down from the client with updates for all 3 child registers

One of which does not exist in DOE as it is deleted from BE and after the sync, that particular register will be deleted from the client itself.

Due to this update for deleted register , this message fails in DOE , thus not sending the other 2 register record updates to BE.

WOrkaround at this time could be to send 3 seperate update messages for each register update from mobile client. (though its child records for the same header instance) .

This means that one msg will fail in DOE which is fine as the corresponding delete will already be in client and the rest 2 updates will reach BE and if BE validates and accepts this change, then confirmation will flow down to client thus making BE and client with same state for 2 existing registers.

Regards,

Liji

Former Member
0 Kudos

Hi,

sorry, I tested it as well and you are right, ROW level conflict handling does not help, cause it is the same ROW....

Hi Liji,

this I do not get - but it sounds a good idea, so please help to clarify.

In my understanding: if I have an instance of a DO which has one Top item and 3 line items, then I can not send the changes in the 3 line items as single changes. Or I need to sync 3 times - one time after each change. Or is there a flag available that I do not know at the moment?

Step by step:

- I have a DO A. This DO has a TOP structure (A) and an ITEM structure B.

- B has 3 instances.

- So A is my name for example, and B contains my 3 telephone numbers for private, business and mobile.

- If I now change my business and my mobile number, then I have 2 changes in the instance, but both instances belong to the same TOP instance.

- If I sync now, all 2 changes will be send across in the same sync and because they belong to the same line item, it will send them across in the same single instance.

- If I monitor this sync, it will tell me, that I have send a DO named A and when I check the content of that sync it shows the two lines in the item sctructure.

So, as I got your anwer correctly, it should be possible to see 2 instances of A in the monitor and each belongs to the same TOP structure/DO instance and each contains one single line of that change. How do I do that?

Beside that, after I did that test, I come backl to the conclusion I have made earlier:

- either avoid changes in the backend

- or send the changes form client to backend in a separate DO (upload only), with just a single TOP structure so we can avoid the conflict handling. (Perhaps this is what Liji meant as well?)

Hope that helps.

Regards,

Oliver

Former Member
0 Kudos

Hi Oliver,

For the three child instances, you can do the following:

=>For the instance which is deleted : On the client ,just update that instance and do a sync. This message will fail as the instance is not there and would send a delete for that instance.

=> After 1st sync, update the rest two which are there in DOE, and then again do a sync.This would update the corresponding instances correctly.

Hope this helps

Thanks & Regards

Shweta Soni

Former Member
0 Kudos

Hi,

In Mobile client 7.1 , messages are created on SAVE (when on commit() ) call is made).(if it is not a backward compatability application)

I know its really a work around though..to click on save after modifying a child register, updates will be sent to DOE as seperate msgs with in the same sync.

Regards,

Liji

Former Member
0 Kudos

Hi Again.

After thinking a lot about this, i Have decided that the function getdetail extract row items with all the states as posible, in my case: IMP, SEÑ and NORM. but then, I have to create a rule in the Distribution model for not to download rows item with NORM state.

¿ Which kind of rule do I need to create? a filter? a rule? a bulk rule? which is the better way to do this?

Thanks very much.

Former Member
0 Kudos

HI,

You should create a normal rule with criteria field state NE 'NORM'.

Regards,

Liji

Former Member
0 Kudos

I will try it again with your answer

I tried with node filter <> NORM and it works with a rare behaviour.

Thanks.

Former Member
0 Kudos

I'm testing.

Edited by: Maria Elena Fernandez on Feb 24, 2010 2:02 PM

Edited by: Maria Elena Fernandez on Feb 24, 2010 2:03 PM

Former Member
0 Kudos

Hi ,

I would like correct myself..since the 'state' is field in child node and there could be multiple child nodes with various states for an instance, node level filter rule (state NE 'NORM') itself has to be used.

Regards,

Liji

Former Member
0 Kudos

CREATE PARENT AND THREE ITEMS IN R3

I CHANGE THE STATE OF ONE ITEM IN R3 TO NORM

*AFTER SYNCRONIZING, I CHANGE TWO ITEMS IN DEVICE TO SEÑ, ONE OF THEM IS GOING TO BE DELETED BY QUEUE

Edited by: Maria Elena Fernandez on Feb 25, 2010 2:10 PM

Former Member
0 Kudos

AND THIS MESSAGE IS ALSO IN QUEUE , and this is generating error becouse it's trying to do a INSERT but it should be UPDATE

<?xml version="1.0" encoding="utf-8" ?>

- <Msg type="I">

Former Member
0 Kudos

Hi Liji. Sorry by message which are not sorted but I was having problems editing message.

This message should be the first one:

My initial situation: I create in R3, the parent with three items ( A, B and C) rows in R3 with state IMP. Delta replication is raised and before syncronizying my queue is CORRECT!! the parent and three items are going to be created in my device.

QUEUE: 1

When I syncronize, datas are created in my device-> CORRECT!

In R3, I change the status for one item ( for example A) in R3, then delta replication is raised and before syncronizying my queue is CORRECT: thar items is going to be deleted!!!

QUEUE: 2

Before syncronizying I modify item A and B in PDA to state SEÑ.

Then I syncronize, and my queue has two mesage, one of them is INCORRECT!!

First message: It's only information and it does not generate a error message in PDA

QUEQUE: 3.1

Second Message: INCORRECT!!! This message generate a error message in device as normal. Why is downloading a message type IINSERT when I have already that item in PDA?? I should be a UPDATE Message.

QUEUE: 3.2

A part of message shown in device during syncronization, all is correct, I mean that In my device I only have item B ( SEÑ) and item C ( IMP) and the same in R3.

Edited by: Maria Elena Fernandez on Feb 25, 2010 2:21 PM

sivasatyaprasad_yerra
Active Contributor
0 Kudos

COuld you please check whether the following SNOTE's are applied in the system:

1337808

1345565

1356213

These are related to Node Level filter rule functionality.

Former Member
0 Kudos

Thanks.

I'm going to text it and after I write you with the answer.

I belive that it will fix my problem becouse I dont understand how I' having a INSERT message in my queue for a child which is already in my device.

Thanks.

Former Member
0 Kudos

Thanks Silva.

I have applied only note1337808 and the insert message which generated the duplicated key error does not appear but now

any change I do in R3 is upload to DOE ( runnig delta replication) but it does not download to my device.

¿ Do I need to apply any note else?.

Best regards.

sivasatyaprasad_yerra
Active Contributor
0 Kudos

Did you apply other two mentioned in my previous reply. If not, apply those notes and test the scenario.

Former Member
0 Kudos

Thanks for your quick response.

I will apply the notes and I tell you.

According to this, Do you know if is there any note to solve next problem: conflict when I try to modify a child which is not in CDS?

Former Member
0 Kudos

Hi Siva.

I have the three notes in my system but it continues without working. Before only one child was downloading to my device but now, all the children ( in my case 3) are dowloading to my device as a INSERT MESSAGE when I make a change in one of the children in R3.

I explain you my actual error.

Firsty, I explain to you my configuration.I have the DO checked with "Last One win", in DOE the parameter DO_SYNC_EXTRACT is check.

I create a main structure with three children in R3 with state IMP, I run delta replication and my device and then, my queue device is

THIS IS AN ERROR!!

QUEUE IS SHOWN IN MESSAGE BELOW

Help, please.

Best regards

Former Member
0 Kudos

this is message which generates the error in my device when I syncronize for downloading a change made in R3.

<ZMOB_DESC_ETIQUETA C8="2109-2-15-60-50" CK="2116" C6="WI00000000000002519315" CB="VALV.ANT.VC-2020A DRENAJE CAL.3 AL 2 GR2" C1="4B8AC852611B0239E1008000AC1E1065" CG="1900-01-01" CM="1900-01-01" CJ="4" C7="000010" CD="I0406" C9="BOMBAS-2" C0="4B8AC853611B0239E1008000AC1E1065" C5="000200122468" C4="CERRADO" CF="SEÑ" C3="000001" C2="000070006227" ty="I" tv="4B8AEFB4611B023AE1008000AC1E1065" />

<ZMOB_DESC_ETIQUETA C8="2109-2-15-60-51" CK="2116" C6="WI00000000000002519316" CB="VALV.POS.VC-2020A DRENAJE CAL.3 AL 2 GR2" C1="4B8AC852611B0239E1008000AC1E1065" CG="1900-01-01" CM="1900-01-01" CJ="4" C7="000020" CD="I0405" C9="BOMBAS-2" C0="4B8AC854611B0239E1008000AC1E1065" C5="000200122469" C4="CERRADO" CF="IMPS" C3="000002" C2="000070006227" ty="I" tv="4B8AC856611B0239E1008000AC1E1065" />

<ZMOB_DESC_ETIQUETA C8="2109-2-15-74-69" CK="2116" C6="WI00000000000002519317" CB="V.PURG.EN VC2028A DESC.BP3 A BP2 COND.G2" C1="4B8AC852611B0239E1008000AC1E1065" CG="1900-01-01" CM="1900-01-01" CJ="4" C7="000030" CD="I0405" C9="CONDENS." C0="4B8AC855611B0239E1008000AC1E1065" C5="000200122470" C4="ABIERTO" CF="IMPS" C3="000003" C2="000070006227" ty="I" tv="4B8AC856611B0239E1008000AC1E1065" />

</Msg>

I forgot to explain to you that I have in the DO , a filter node by state ( in this case :field CD can not be "I0408" )

Edited by: Maria Elena Fernandez on Mar 3, 2010 7:47 PM

Edited by: Maria Elena Fernandez on Mar 3, 2010 7:50 PM

sivasatyaprasad_yerra
Active Contributor
0 Kudos

Better to raise an OSS message to resolve the problem. Before this may be apply all the notes released for SPS07 / SPS08 whichever SP you are using.

After applying all the notes, you can test it once. if the problem is not resolved then raise an OSS message.

1400694 NetWeaver Mobile 7.10 Composite Note for SP09

1330911 NetWeaver Mobile 7.10 Composite Note for SP08

1263664 NetWeaver Mobile 7.10 Composite Note for SP07

Former Member
0 Kudos

Thanks again, I will try it.

Only one thing else that yesterday I forgot to say to you. This problem only happens when parameter DO_SYNC_EXTRACT is check. If the parameter is not check, everything works correctly. Any idea else?

Former Member
0 Kudos

Finally, we solve it modifying flows in the inbound dataobjects, checking if the child isn´t in DOE, we remove it from register to run.

Thanks.

Former Member
0 Kudos

Hi,

well, it makes sence to have this - cause your mobile device can not solve this issue. On the other hand ROW-LEVEL Conflict handling should only throw error for the single problematic row, but should send the other 3 lines across.

On the other hand - what about changing the data model if you need to avoid that.

You have 2 options in my understanding:

1.) You need to make sure that any item in backend that was send to mobile device, can not edited any longer in backend.

2.) You need to upload data in own UPLOAD syncbo. In that case you will not have this issue any longer, cause each and every step is send in separate SyncBO.

Option 2 has just one problem: last one wins! And this could be an issue if you have the following procedure:

- changed data on device at 11h,butno sync

- then change data in backend at 15h.

- and you sync your device at 19h

In that case the data is back to the state of 11h and in some cases this is simply wrong.

Hope this makes sence.

Regards,

Oliver

Former Member
0 Kudos

Hi again Oliver.

Are you sure that ROW-LEVEL Conflict handling should detect the row with conflict and download the others two child register trought GETDAIL?

I've just checked it again but it continues without working. After the conflict, none child is downloaded to my device.

According to your two opcions:

1- Imposible to avoid that. It's a customer's requirement that they can modify states by R3 and Devices.

2- Imposible too becouse we've already implemented the swcv in a production scenario. The application is already running and to change the model suppose a long time.

I explain you the scenario again with an graphical example:

INIITIAL STATE: ( Device)

parent structure : ID1(key), date,

child structure: ID1, 1, IMP (status)

ID1, 2, IMP (status)

ID1, 3, IMP (status)

INITIAL STATE ( R3).

ID1(key), date, ....

- ID1, 1, IMP(status)

- ID1, 2, IMP(status)

- ID1, 3, IMP (status)

After this, I modified in R3-> ID1, 1, IMP to ID1, 1, NOR

Then, GETDETAIL starts and deletes that register in DOE.

Now I change the 3 children register in Device

ID1, 1, IMP --> ID1, 1, SEÑ

ID1, 2, IMP --> ID1, 2, SEÑ

ID1, 3, IMP --> ID1, 3, SEÑ

After I syncronice, FINAL STATE ( Device)

parent structure : ID1(key), date, ....

child strucuture:

- ID1, 2, SEÑ (status)

- ID1, 3, SEÑ (status)

FINAL STATE ( R3)

ID1(key), date, ....

- ID1, 1, NORM(status)

- ID1, 2, IMP(status)

- ID1, 3, IMP (status)

And that is the problem, different states between R3 and device. I should need that the state in device for the others two children will be also IMP if R3 has preference or the two children will be SEÑ in R3 if the device has preference. But Now neither children in R3 nor children in Device are updated . Only the first which generate the conflict is deleted from device ( normal because it was still in the queue from the device before syncronice.

Best regards.

Edited by: Maria Elena Fernandez on Feb 11, 2010 8:32 AM

Edited by: Maria Elena Fernandez on Feb 11, 2010 8:43 AM