New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to reference between requests in oData ChangeSets #2708
Comments
Hey @carlonnheim, you could configure your request to use a custom header ( On a different note, I fail to recognize how your comment about unbound actions relates to this issue. Do you need to send unbound actions with batch? |
Hi @marikaner , thanks for the quick response. The main aspect is to reference back to the created entity. You can refer to the sample batch request in the oData v2 documentation, section 2.2.1.
In this sample, there is first a POST request to create an entity. This has This is also why the bound/unbound makes a difference. The Content-ID reference identifies the URI if the created resource, i.e. referencing a bound action underneath that resource makes sense, whereas referencing one of its properties to call an unbound action, with that property as parameter does not. Thanks! |
Hey Carl, ok got it, thank you. Then my understanding is that these are actually 3 feature requests:
Do I get this right? |
Hi @marikaner, Yes, that is perfectly right! Thanks! //Carl |
Hi @carlonnheim as a first step, support for OData v4 Bound Functions and Actions is implemented in version 2.11.0 of the sdk. See the updated docs section for info on how to use them. I know this does not satisfy what you asked for yet, but maybe you'd like to see if this already helps you in any way or if you want to share feedback on how it works for you. Best, |
Hi @fwilhe, that sounds great, looking forward to try it out! |
Is your feature request related to a problem? Please describe.
We need to cross-reference between requests within a changeset of a oData batch request. This is important in any scenario where we need to create an entity and then call an action on it within the same batch request to achieve an atomic operation.
Example: Posting Time Entries to SAP Business ByDesign. The process requires two steps - first create the time entry and then call the release action on the new entry.
Describe the solution you'd like
We need the ability to set and get the Content-ID header of the individual requests. An auto-generated Content-ID was recently introduced in #2255, but to my understanding there is no mechanism to retrieve it and reference it in subsequent requests.
Describe alternatives you've considered
We are currently processing the steps in separate requests. This has two drawbacks. Turnaround time is slower, which has notable impact on scenarios where a user is interactively processing the transaction in the external application. The other drawback is consistency - since we cannot make the operation atomic we get additional issues to handle in the external application (identify and recover from the inbetween state - time entry is posted but not released).
Impact / Priority
Affected development phase: Development
Impact: Impaired
Timeline: Go-Live in 3 months.
Additional context
For SAP Business ByDesign in particular, actions are in general not "bound", but follow a pattern of
service/SomeAction?ObjectID='nnn'
rather thanservice/SomeEntityCollection('nnn')/SomeAction
. This might further complicate the realization of this scenario with ByD in particular (even with the Content-ID present we cannot do$thecontentid/SomeAction
). Maybe @knutheusermann has some input on the ByD specific aspect?The feature itself is generic to any oData v2 or v4 scenario however, not only the ByD sample scenario.
The text was updated successfully, but these errors were encountered: