This article will help you understand how to leverage multiple environments in your App:
With the Multiple Environments available in Studio, you can continue to test your MicroApp even after it is live in production without affecting your Live Users. There are 3 MicroApp environments in Studio -
- Dev (Preview only)
You can publish your MicroApp in either Beta or Prod Environment as shown below:
If you publish your MicroApp in Prod Environment then your App’s updates are received by all live users of your MicroApp. All MicroApps published by default is published in this Environment.
Beta is a new option introduced when you publish your MicroApp. If you chose to Publish App in Beta environment, then only the Beta users will be able to receive this App update. For more information on the assignment of Beta users can refer to Assigning Beta Users section below
Dev environment is the Test environment in which you can access your App in Preview and also run your Workflows in Dev (Submit On) option.
In the Dev (Preview) environment you have the following:
- View As: You can choose the user from the channel to preview how the app works for the specific user.
- Current: Is the current form being previewed.
- Action flow Debug: Enables you to debug your action flow and their subsequent tasks. For more details refer to this article here.
- Submission: You can toggle ON or OFF to submit the form data. If the submission is ON all the server-side the actions would also be performed.
- Data Source: This specifies the source of your data. So if the environment shown here is Development, the data from the Sheet would be fetched from its Dev environment only. Also if you have switched ON data Submission then the data would be submitted to the source environment that is specified in this field. For example here the Submission is ON and the Data source is Development. The data would be inserted in the Dev environment of the linked sheet.
Assigning Beta Users
You can assign Beta User by opening Config option inside your particular MicroApp builder page and selecting Users option. Under Users, you can Search Users as well as Add or Remove users from Beta Environment as shown below:
For more details refer this article here
All tasks except the Input task can be run in the Dev environment, however, you may want to skip some Workflow tasks such as external Live Api’s to be run from Dev or Beta environment. This can be done using an additional section in workflow tasks called ENVIRONMENTS TO EXECUTE IN as shown below
You can choose to add or remove environments depending on your needs.
Depending on the Sheets Permission, users can view Prod, Beta, and Dev filter in sheets. Depending on which filter is selected, corresponding Sheets data can be viewed. Also, LOOKUP of data will happen based on MicroApps Environment. If Prod Environment is selected in Preview then only data from the Prod filter will be seen in the App, the same applies to Beta and Dev environment.
Data in the corresponding filter can be added Manually or when their respective Workflow is executed. For example - A Workflow task that inserts a new row in a Sheet is triggered from Prod Published MicroApp then data will be inserted into Prod filter which is the Live data. Similarly, if Beta Published MicroApp triggers this workflow then data will be inserted into Beta filter. And If this workflow task is triggered from Preview using Dev (Submit On) option then the data will be inserted in Dev filter.
Columns Added when Prod columns is selected, cannot be edited from Beta or Dev filter. This is because of Sheet permissions which is explained below. However, Columns created from the Beta filter can be edited from the Prod filter.
More on this is explained in the Sheet Permission section explained below .
Sheet owner can set Sheet Permission as to who can access this Sheet. This can be set by clicking on the icon (shown below ) next to the Sheet Name under Sheets Tab in Studio.
We already had Can Edit and View Only permission that can be assigned to User for accessing the sheet. Additionally, the Sheet Owner has an option to give Can Edit and View Only permission to Beta environment as well. By default the Can Edit or View Only permission will be assigned to Live / Prod Environment.
Individual share access overrides all general access types. Depending on the access given, different users will have different permission to access the sheets. Below is the list of Permission and its Access rights -
1. Live Environment - Can Edit
User can View and Edit - Prod, Beta and Dev Filter data in Sheet.
2. Live Environment - View Only
User can Only View Prod filter data in Sheet but cannot Edit any data or columns Also, User can View and Edit - Beta and Dev Filter data in Sheet.
3. Beta Environment - Can Edit
User cannot view Prod filter data but can View and Edit - Beta and Dev Filter data in Sheet.
4. Beta Environment - View Only
User cannot view Prod filter data but can Only View Beta filter data in Sheet but cannot Edit any data or columns. Also, Use can View and Edit - Dev Filter data in Sheet.
5. No Access
User cannot open this sheet
Basically, all users who have access to this sheet has full access to Dev filter whereas Prod and Beta filter access can be configured by the above settings.
If the User is assigned multiple environments of MicroApp then on clicking the MicroApp icon in DronaHQ Container App (Android, iOS, Web), you will see the selection of Environment which you want to open as shown below.
Workflow Analytics for different environments is the same as that it was Previously available with Addition that you will see App environment option along with App version. There is also a Preview (dev) filter option that you can apply to view the analytics of Workflow submitted from Preview. Analytics of the Preview (Dev) version will always show up current tasks that are present in your workflow. So in case, you delete a task then that information that will be lost for the Dev environment since purpose of Dev environment is to test the recent/current app version.