Platform
Learn
Community
Support
Partner Center
Sign up
or
Log in
logout
Account Settings
Profile
messages
Messages
logout
Logout
Platform
Home
Downloads
IPP
Licensing
Project Sizing
Learn
Training
Documentation
Evaluation Guide
What's New
Community
Home
Forums
Forge
Ideas
Members
Support
Partner Guide
Resources Library
Opportunities
Account Management
Sign up
or
Log in
Home
Forums
Forge
Ideas
Members
Dear ,
What would improve your OutSystems Community experience? Let us know by taking this 2-minute survey.
Pick up the survey
Community
›
Forums
›
Technology & Integration
Multi tenant and Bootstrap the data
Bootstrap
Timers
multitenant
UserLogin
Community
›
Forums
›
Technology & Integration
Multi tenant and Bootstrap the data
Bootstrap
Timers
multitenant
UserLogin
New Post
New Post
java domainq
Posted on 2015-07-12
java domainq
Rank: #676
Posted on 2015-07-12
Hi,
I have some set of predefined values which I want to be inserted or available to the application for each tenant which will be created in the application.
1.Shall I call the bootstrap action while creating the tenant
2.Can I use timer to run while creating the tenant.
3.I want to understand how to corelate the bootstrap action ,the timer functinality for a tetant which is going to be created to the system.
4.If I go with timer then how it is going to run for each new tenant which will be created on need basis.
Please suggest.
André Vieira
Posted on 2015-07-13
André Vieira
Rank: #1
Posted on 2015-07-13
Solution
Hi java,
1. If you are creating the tenant programmatically using
TenantCreate
you should use
TenantSwitch
to change tenant and call the bootstrap action afterwards. Probably you would then use the TenantSwitch action to go back to the tenant you were...
2. You can execute a multi-tenant timer. As you can see
here
the timer is executed once for each tenant meaning that your logic must be safe to be executed in a tenant that was created previously and for which the bootstrap action was already executed.
I would opt for option 1 in this case as it seems to be more controlled.
Solution
java domainq
Posted on 2015-07-13
java domainq
Rank: #676
Posted on 2015-07-13
Solution
Hi Andre,
Thanks for the reply .
Is this the correct understanding of behaviour related to timer and tenant :
1.Whenever a tenant is created irrespective of whether the tenant has created through service center or by any custom tenant creation UI (thorugh
TenantCreate action
) if there is timer set as
Is Multi-tenant: yes then the timer will also be run and the corresponding data will be bootstraped to the application.
2.Once I make a entity as multi tenant and then realizes that the entity need not to be multitenant and I make that as non-multitenant then is there a implication or I can do it without experiencing any strange behaviour.
3.I noticed that the tenant_id coloumn still shows in the entity even if its not multitenant . Is there going to be problem in while executing the application queries.
Regards
jdq
Solution
André Vieira
Posted on 2015-07-13
André Vieira
Rank: #1
Posted on 2015-07-13
Solution
1. When you have a timer that executes on 'When Published' schedule this timer will also be executed when a tenant is created, either throught Service Center or API (TenantCreate action).
2. If you set an entity as Multi-tenant: No after it already has data isolated by a tenant_id the consequence will be that you will have all the data visible, e.g., if you have a User entity as multi-tenant and you have user John in tenant 1 and 2, while this is multi-tenant a query over it would return only one John, for each tenant when you set it as not multi-tenant you would have two records returnd both named John. You will also have a warning indicating you have a Tenant_Id attribute in the database that is not present in the entity.
3. I think this is related with the information above, i.e., it's the warning you get in the TrueChange™ pane, right?
Solution
java domainq
Posted on 2015-07-13
java domainq
Rank: #676
Posted on 2015-07-13
Solution
Hi Andre,
I have identified some entities which are non-multitenant but I published them as multitenant initialy. I am seeing Tenant_Id attribute in the database for those entities after I changed them to non-multitenant. Is there a way to get rid of Tenant_ID for these non-multitenant entities.
Whether the Tenant_ID column for these non-multitenant entities will have any problem with existing application queries.
Please suggest.
Regards
jdq
Solution
André Vieira
Posted on 2015-07-13
André Vieira
Rank: #1
Posted on 2015-07-13
Solution
You can use the DBCleaner_API to remove unused columns from those entities or you can go directly to the database, if you have access, and drop those columns. They have no impact on your queries.
Once you delete those columns if you rollback to a version in which the entity was multi-tenant the column will be re-created.
Solution
java domainq
Posted on 2015-07-13
java domainq
Rank: #676
Posted on 2015-07-13
Solution
Hi Andre,
Really apprecited your answer.Thanks a lot.
Solution
Quick Reply
attachment
Choose File
No file chosen
Submit
Login to reply
New Post
Available Forums
Technology & Integration
News and Announcements
Forge Discussions
Meta
Community Quick Guides
Usability
Installation Troubleshooting
Personal Environment Troubleshooting
Forum Notifications
Email Digest Settings
Loading...