cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Integration Suite - Graph / Create,Update action on Association

schneira
Explorer
189

Hi all,

I tried a  API create action on an custom graph object where an association (0 or 1) to another custom object exists. This one have to be also created in the same request.

Is it true that in principal this is not supported by Graph? It is not clear to me by the documentation.

From a logical point of view it should be possible. The key/foreign key association determines the sequence of the underlying API create requests. But it seems not supported.

The response of the API request is 'No cross-service expanding allowed in entity creation/update'.

Thx for a clarification,

Ralf

RalfHandl
Product and Topic Expert
Product and Topic Expert

Hi Ralf,

From the error message I assume that the two associated custom entities "live" in different backend APIs.

Graph cannot guarantee transactional consistency across different backend APIs and refuses such requests.

You correctly state that the "foreign key association determines the sequence of the underlying API create requests", meaning that the relationship from the "first" entity to the "second" can only be established if the second entity exists.

This means a possible call sequence would be

  1. Create second
  2. Create first with foreign-key of second

Drawback if request #2 fails: second entity exists, and deleting it could be (a) undesirable or (b) fail

Another possible call sequence would be

  1. Create first
  2. Create second
  3. Update first with foreign-key of second

Drawbacks: depending on which request fails, we could end up with (a) just first entity or (b) first and second entity unconnected

Graph cannot decide in general which outcome would be "better" or "less undesirable", so we leave the decision to the client.

Does that clarify the current implementation state?

Thanks in advance
Ralf

View Entire Topic
schneira
Explorer

Hi Ralf,

Thanks a lot for the clarification.

I also thought that the problem of transactions over distributed systems is the core problem. It can be solved but the problem is complex and not involved in the philosophy of mostly stateless APIs. So I can understand this restriction on SAP Graph. Perhaps the SAP documentation could state this clearly ;-).

Thank you,

Ralf