It's all about the answers!

Ask a question

Confusion on executing a update request using json payload?


Y Deepak (713) | asked Aug 18 '23, 3:12 a.m.


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!

One answer



permanent link
Ralph Schoon (63.3k33646) | answered Aug 18 '23, 4:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 18 '23, 4:07 a.m.
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

Comments
Ralph Schoon commented Aug 18 '23, 4:06 a.m. | edited Aug 18 '23, 4:07 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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 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.