Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem

CAP supports the old BTP portal out-of-the-box in a multitenant environment. In theory, Work Zone also supports multitenancy and should be compatible with CAP multitenancy. Unfortunately, it’s not yet built into the CAP commands. While it’s still possible to use the BTP Portal service, it’s not the most ideal solution. You may already have entitlements for Work Zone assigned, or perhaps you prefer not to rely on a deprecated service for your multitenant application. Whatever your reason, I’ve discovered a way to enable Work Zone in this scenario.

Solution

First step is to enable multitenancy in your CAP application, follow the steps here: https://cap.cloud.sap/docs/guides/multitenancy/#multitenancy

In the deploy step, the documentation explains how to add the Portal Service:

https://cap.cloud.sap/docs/guides/multitenancy/#deploy-to-cloud

Run this command to add the portal service:

WouterLemaire_0-1741893030751.png

This will add configuration to the mta.yaml and a subproject in the app folder.

First, change the configuration for the portal service in the mta resources to the Work Zone service:

WouterLemaire_1-1741893030783.png

In the mta modules, change the config so it is connected to the resource of Work Zone:

WouterLemaire_2-1741893030821.png

In the app folder, you’ll find a folder for the portal. I renamed this to workzone. Besides that, all the other configuration files are the same as for the portal:

WouterLemaire_3-1741893030824.png

You can configure the tiles for your multitenant application in the “CommonDataModel.json” file.

WouterLemaire_4-1741893030829.png

Second step, adding Work Zone to the sidecar as a SaaS dependency like described here:  https://cap.cloud.sap/docs/guides/multitenancy/#saas-dependencies

WouterLemaire_5-1741893030832.png

This is a simple Boolean for the portal service but not for Work Zone.

Solutions to use Work Zone, is adding the following config:

WouterLemaire_6-1741893030840.png

With this, you should be able to use Work Zone in a multitenant CAP application.

2 Comments
Labels in this area