on 07-07-2021 10:24 AM
I'm trying to create a reuse service using the CAP for Java framework.
However, the documentation and available tutorials are missing a critical step: how to provide custom logic.
This documentation explains how to do so with the Node.js flavor. However, it says nothing about Java.
This tutorial does explain how to make a reuse service for CAP Java -- however, it says nothing about how to link your custom event handler to the service so you can actually use it.
Does anyone know how to achieve this?
Hi Brian,
as far as I understood your question it goes more into a direction of how to share reusable CDS service definitions and corresponding event handler code across projects, by directly importing these CDS artifacts and Java event handlers into the projects themselves.
As you correctly identified there is not much documentation and examples on that. This is due to the fact that we haven't intensly investigated this topic so far in CAP Java.
In Node.js sharing service definitions, event handler code, etc. happens through NPM modules. For Java this usually doesn't feel like the right fit, as here dependency tools such as Maven or Gradle are usually used. However as of now there is no mechanism that is supported by the CDS tools that would feel more native to Java.
What I think is possible today (although I haven't explicitly tried it yet):
With those approaches you basically split the CDS-based reuse and the code-based reuse across two artifacts that you both need to include into your reuse project.
In the future CAP might provide mechanisms to also share CDS models via a more native Java dependency management, for example via Maven dependencies, but these are only visions at the moment.
Hope this helps.
Best regards,
Marc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.