cancel
Showing results for 
Search instead for 
Did you mean: 

Multitenant CAP app with Portal dependency

former_member748
Participant
0 Kudos

I've started developing a multitenant CAP app with a UI5 module and the following services: Portal, HTML5 repo, SAP Theming and UI5 Flexibility.


I have the following handler for GET dependencies:

const xsenv = require("@sap/xsenv");
const services = xsenv.getServices({
    portal: {tag: "portal"},
    flexibility: {tag: "flex-keyuser"},
    theming: {tag: "sap-theming"}
});

module.exports = (service) => {
    service.on("dependencies", (req) => {
        const dependencies = [
            {
                appId: services.portal.uaa.xsappname,
                appName: "portal"
            },
            {
                appId: services.theming.uaa.xsappname,
                appName: "theming"
            },
            {
                appId: services.flexibility.uaa.xsappname,
                appName: "ui5-flexibility-keyuser"
            }
        ];
        return dependencies;
    });
};


And these are my current versions:
@sap/cds: 5.1.4
@sap/cds-compiler: 2.2.8
@sap/cds-dk: 4.1.4
@sap/cds-foss: 2.3.1
@sap/cds-mtx: 1.2.1
@sap/cds-odata-v2-adapter-proxy: 1.6.2
@sap/cds-runtime: 3.1.0
@sap/hana-client: 2.7.23
@sap/hdi-deploy: 4.0.5
@sap/instance-manager: 3.0.0
@sap/xsenv: 3.1.0
@sap/xssec: 3.1.2
Node.js: v14.17.0

It seems that if I only keep portal and theming in the dependencies object the subscription is fine, but when I also add flexibility and I try to subscribe from the cockpit, I see in the logs that GET depenencies is called, but it does not continue to to UPDATE tenant. And I see subscription failed in the cockpit.

I understood from this blog they are reuse services and saw this question about the topic, but have not found any source which documents how to do this.

Any help, suggestion, information, documentation on this would be highly appreciated!

Thank you!

Accepted Solutions (0)

Answers (0)