Skip to Content
0
Jun 07 at 09:49 AM

ProvisioningService / cds.mtx.in

128 Views

Dear colleagues,

I try to setup a very basic multitenancy mta skeleton using the cds-mtx. After reading a while through various sources I came up with two pillars that have to be done:

cds.on('bootstrap', async (app) => { 
    await cds.mtx.in(app);
    const provisioning = await cds.connect.to('Provisioning');
    provisioning.impl(require('./provisioning')); 
});

None of those two steps works for me, though. For the cds.mtx.in I get the error message

TypeError: cds.mtx.in is not a function

and for the Provisioning I get

Didn't find a configuration for 'cds.requires.Provisioning'<br>

I followed the instructions I found around the CAP documentation and in various places in github.com / github.wdf.sap.corp. I did not find a documentation though that helped me over that cliff.

The repo containing the code is CAP PoC, branch main. As it is you can run cds watch and use the test.http file to do the test calls. Then you can uncomment one by one the offending lines in server.js (line 27 for mtx and lines 28/29 for the Provisioning thing) to see the error.

I'm not used to Javascript, so this might be indeed just a plain beginners error.

Does anybody have a hint for me?

Thanks

Mathias