VERSION 10 DOCUMENTATION IS IN PROGRESS. PLEASE VIEW V9 ARTICLES WHILE V10 ARTICLES ARE BEING PUBLISHED.

Multi-Tenancy: Creating Default Tenant Configurations Using Prototype Instance

Prev Next

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. The following article demonstrates 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. 

Multi-Tenant Article Series
This article is part of a Mult-Tenant article series and requires pre-requisite configurations. To properly configure a Multi-Tenant environment, please see About Multi-Tenancy article and proceed with the series.

Example

  1. Once a Customer is registered, navigate to the Decisions Login page and select the InstanceDefaultSetupPrototype option from the dropdown list, then select LOGIN.
    instanceprototype.jpg
  2. From the Decisions Studio, navigate to the My Apps Folder and click CREATE FLOW on the Global Action Bar. 
    1. Select Flow, provide a Name, and click CREATE. 
  3. From the Flow Designer, connect the Start step to the End step, then Save and close the Flow.
    This Flow is used to distinguish that the Prototype Instance loads the appropriate environment for a new Tenant. 

  4. Logout of InstanceDefaultSetupPrototype after making the Flow. 

  5. From the File System, navigate to C:\\Program Files\Microsoft SQL Server\[MSSQL Version where the backup resides]\MSSQL\Backup, then Delete original backup for the Instance Prototype

    Default Backup Recommended
    As is recommended with replacing any file, backup and copy the Instance Prototype.bak file in another location to have in case of error.

  6. Open Microsoft SQL Server Management Studio, navigate to the DefaultInstancePrototype, right-click it, and select Tasks > Backup. Proceed with the backup to ensure that it is saved to the location of the original file. 

  7. Close all sessions of Decisions or use a Private Browser to login to Decisions. Select Primary (point where Customers and Tenants are managed) from the INSTANCE dropdown menu, then click LOGIN.
    primary-instance.jpg

  8. From the Primary environment navigate to the Customers' Folder, right-click a Registered Customer, then select Add Instance

  9. From the Add Instance window, provide an Instance name, select the appropriate option under Assign To Server, Assign Accounts to access the new Tenant environment. Then, provide an Account(s) under Select Administrators, then provide a Database Name, then click ADD INSTANCE.

    The new Instance (TestCoTenant) will now be visible under the respective Registered Customer Folder.


Changes to the Primary Instance

After a Tenant is created, any additional changes to the Primary Instance will not be synchronized to the Child Tenant. For example, the resources for the Prototype Instance are only inherited when a Tenant is newly created. Thus, any additional changes to the Tenant must be made manually.
  1. Right-click the Registered Customer Folder that contains the new Tenant, then select Add User Account > Link Account.
  2. From the Add Account Reference window, PICK the same Account that was configured when the Instance was added, select the appropriate option under Assign To Instances, check Is Administrator, then click OK.
  3. Logout of the Primary environment, then in a new Session, login to Decisions with the credentials linked to the new Tenant. Select the new Tenant from the INSTANCE dropdown, then click LOGIN.
    Upon the first login, the Flow that was created in Default Tenant Configuration should appear in the environment. 
    tc.jpg

Automatically Restart

To avoid an Instance from going into an Idle state after a crash, from the Instance's Folder, click SETTINGS, then enable Automatically Restart.