- 21 Oct 2021
- 3 Minutes to read
- Print
- DarkLight
Creating Default Tenant Configurations Using Prototype Instance
- Updated on 21 Oct 2021
- 3 Minutes to read
- Print
- DarkLight
Overview
A Default Tenant Configuration is a configured Decisions environment that can be loaded as a default setup for a new tenant. The InstanceDefaultSetupPrototype is the default template for the aforementioned configured Decisions environment. This article will show how to create a new Default Tenant Configuration using the Prototype Instance so that it can be applied when a new tenant is added to a Registered Customer.
To configure a Multi-Tenant environment, please start from About Multi-Tenancy article and proceed with the rest of the series, starting at Multi-Tenancy: Setup.
Example
Once a Customer is registered, navigate to the Decisions login page and select the InstanceDefaultSetupPrototype option from the dropdown list, then select LOGIN.
In order to confirm that this Prototype Instance will load the appropriate environment for a new tenant, there needs to be something in the environment that can be distinguished.
Navigate to the My Apps folder in the Studio and change the view to List view. Use the Create Flow button on the bottom Action Bar to create a new Flow. Select the Default Flow Template and enter Multi-Tenant Flow for the name, then click Create. In the Flow Designer, simply connect the Start step to the End step, then save and close the Flow.
This Flow will now serve as a staple that should reflect in the new tenant environment. Logout of the InstanceDefaultSetupPrototype environment once the Flow has been created.
The default backup file for the Prototype Instance needs to be removed and replaced with a new database backup file with the changes that have been made (the addition of the Flow).
In the PC File Explorer, navigate to Local Disk (C) > Program Files > Microsoft SQL Server > MSSQL VERSION.EXPRESS > MSSQL > Backup, then right-click and delete the DecionsInstancePrototype.bak file.
Open Microsoft SQL Server Management Studio to get a new backup file of the database for the Default environment with the added Flow. Navigate to SQL SERVER > Databases and right-click on DecisionsInstancePrototype, then select Tasks > Backup from the menu. Select OK in the window that appears, make sure that the popup appears confirming that the backup was successful. The backup file has been saved to where the original was removed.
Close all browser sessions of Decisions or use a Private Browser window to login to Decisions. Select Primary (where Customers and Tenants are managed) from the Instance dropdown list, then click Login.
Once in the Primary environment, navigate to the Customers folder and right-click a Registered Customer, then select Add Instance from the menu.
Enter an Instance Name and an optional Description when the Add Instance window appears. Make sure to select the appropriate Assign To Server and Assign Accounts for access to the new tenant Decisions environment. Once these fields are complete, scroll down to the rest of the form.
Select Add New under the Select Administrators box to add the appropriate administrator accounts, then enter a Database Name for this new tenant Instance and click OK.
The new Instance (TestCoTenant) will now be visible under the Registered Customer that it is applied to in the Customers folder.
Right-click the Registered Customer folder that contains the new tenant and from the Action Menu, select Add User Account > Link Account. In the window that appears, choose the same account that was configured when the instance was added, select the appropriate Instance Assignment, and check Is Administrator, then click OK. Logout of the Primary environment once complete.
In a new session, login to Decisions with the credentials linked to the new tenant, then choose the new tenant name from the Instance list and click Login.
On the first login, the Flow that was created as the template for this new Default Tenant Configuration should appear in this new environment.
To avoid an Instance from going into an Idle state after a crash, select Automatically Restart in the Instance Settings.