1. Initializing User Interface Development
OMNIA Platform UI development workspace hold the User Interface Behaviours of a Tenant. To open it while locally running a Development Environment, open http://host.docker.internal:5000
on your Browser and access the Modeler page of the Tenant you want to debug in.
Click in the dropdown arrow right next to the “Build & deploy” option, check the options in the “Development Workspaces (VS Code)” section and select the “Open UI Development Workspace”.
A new Visual Studio Code window will now open.
2. Switching Tenant Model
With Server Development opened, you can switch to another model by following the steps in “Initializing User Interface Development” relatively the other desired Tenant.
This will replace the content in your Visual Studio Code window with the model that you now opened.
3. Change code and apply changes to Model
You can check every User Interface Behaviour in the User Interface Workspace and change any code. Note that local changes only applies after saving the files.
Now to verify and test your changes, you need to start a HTTP server by pressing F5
or the "Run"
button on the left panel. This has the same result as the HTTP server you start when using Remote UI, so don’t forget to save the HTTP Port it returns.
To access your local application, navigate to http://host.docker.internal:5000
and follow the steps in “Once you have the HTTP server running” section.
When you’re satisfied with the result, you can apply the code to the Tenant’s model using OMNIA CLI. For that, run the following code line in Powershell:
omnia-cli model apply --subscription [Subscription] --tenant [Tenant] --environment [Environment] --path [Path] --build
Change the Parameters inside “[ ]” with:
Parameter | Description |
---|---|
Subscription | (Optional) The name of the configured subscription. Optional if there’s only one subscription configured. |
Tenant | The code of the tenant to be downloaded |
Environment | (Optional) The tenant environment. If not inserted, PRD is assumed |
Path | (Optional) The path where the model will be downloaded to. If not inserted, the current path is assumed |
Note the flag "--build"
, it ensures a new Tenant’s Build is created. If you don’t want a new build, you can execute the code without this flag, but be aware the code you send to the OMNIA Platform will remain in the Tenant’s Modeler as “changed”.
Example:
```
omnia-cli model apply --subscription local --tenant mytenant --environment PRD
```
4. Debug
You can always locally debug any User Interface Behaviour, and since you’re using Visual Studio Code it’s also possible to use breakpoints and IntelliSense that supports entity and platform properties and variables.