cancel
Showing results for 
Search instead for 
Did you mean: 

Update from deep structure data

abhiperiwal
Participant
0 Kudos

Hi Guys,

I'm working on a gateway project which is receiving data as a deep structure for PUT request from UI.

I was able to perform PUT for flat structures in the gateway but for a deep structure the logic doesn't get triggered.

I went through some blogs and threads saying the Gateway doesn't have anything like UPDATE_DEEP.

What could be the best way way to handle this type of request. The data is a project systems structure coming in hierarchy format which can be nested upto 4 levels.

Any help from you guys will be much appreciated.

Regards,

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

abhiperiwal
Participant
0 Kudos

I was able to find the solution using $batch as mentioned by Krishna.

Since there can be multiple PUT requests in the batch and I need to save them together I'm using the method CHANGESET_PROCESS to combine all the PUT requests and make a single database update.

To trigger CHANGESET_PROCESS I had to set the flag CV_DEFER_MODE in the method CHANGESET_BEGIN.

Answers (2)

Answers (2)

kammaje_cis
Active Contributor
0 Kudos

Using $batch and having parent and child update calls within a single changeset would be the right approach. There are several documents in SCN explaining how to do a $batch.

abhiperiwal
Participant
0 Kudos

Hi Krishna,

I've found number of documents on $batch but can you help me with the link of one which has a good example. I've redefined the method for Changeset_begin and Changeset_end and trying with $batch URI but the breakpoint is not hitting in those methods.

Thanks,

Abhishek

AshwinDutt
Active Contributor
0 Kudos

Hello Abhishek,

Using Create_Deep_Entity is the way by modelling GW with Association and Navigation.

Its like Firing Update inside a Create. I feel its not right way.

But Still this would be an work around which can be used if you are left with no other option.

Regards,

Ashwin