Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Confusion on executing a update request using json payload?


We are having two separate systems i.e. CLM and PLM. Data flow happens from both side in form of json payload in case of creation/updation of object at either side. This creation and updation of data happens through a adapter which is written in java language.

 

During creation of object, most of the attributes come from either side. We are using HTTP post to create new objects at CLM side. Now, the issue is in the case of updation.

 

For Eg-Let us take a object is created at CLM side and is synced at PLM side also. A update takes place at PLM side and they send a payload which is not having all the attributes which are at CLM side. Now in this case how the update will take place?. Will the attributes which are not there in the payload will be replaced with NULL value? How can we handle this case?

 

{
"A":"abc",
"B":"def",
"C":"ghi",   (Sample payload for data created at CLM side and sent to PLM)
"D":"jkl",
"E":"mno"
}

 

{
"A":"abc",
"C":"ghi",   (AT PLM , they don't have placeholder for key "B")
"D":"jkl",
"E":"mno"
}

 

{
"A":"xyz",
"C":"ghi",   (AT PLM , update takes place to key "A" and data is sent back to CLM)
"D":"jkl",
"E":"mno"
}
Now, in this case how can we process update request at CLM side?

Looking forward for your valuable advice on this.

Thanks in Advance!

0 votes



One answer

Permanent link
It is your responsibility to solve this, it is likely not just the API doing it for you.
Dependent on versions of tools, APIs used, there might be capabilities such as partial updates, where you only send the differences. 
If that is not available, you will have to request the object to update and then calculate the delta yourself.

Please note that I have had mixed experiences with ELM and JSON. The OSLC APIs I used usually required application/rdf+xml

1 vote

Comments

I should add, that all these issues with synchronizing data are a common issue and experience since the dawn of IT. For this reason OSLC prefers linking of elements instead of synchronizing data across repositories. 

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937
× 7,495
× 1,325

Question asked: Aug 18 '23, 3:12 a.m.

Question was seen: 971 times

Last updated: Aug 18 '23, 4:07 a.m.

Confirmation Cancel Confirm