- Instructions
- How-To: Add application and modules in Build.One
- How-To: Configure application in base-data-standard-definitions.json
- How-To: Configure application in repository-objects-definitions.json
Currently the applications and modules will not be exported by default. Following configurations must be done.
Instructions
How-To: Add application and modules in Build.One
Add application
- In the application go to
Build -> Application - Click
Create new Application - Enter the following information:
CodeSystemcode of the application, please use Caps-LockNameName of the applicationDescriptionGive a short description of this applicationInstalledPlease check this checkbox- Confirm
With SWAT Version 23.8.0 there’s a new object type SwatApp introduced. With this object type each created app can be configured individually.
As for now, it is necessary to create the object types additionally to the app itself (can be done in Design → Components → Others → Plus in FAB and choosing SwatApp as object type).
- Name it exactly like your already created app
- Following attributes can be configured:
baseLayout: The desired BaseLayout of the App, you can create your own or use theAkiomaMainLayoutbackgroundImage: Image, which will be shown as background of the login screen. If nothing is specified, the standard image will be shown. To add an image to the workspace, place it in foldersrc/webui/assets/example.jpg. Now you can configureexample.jpgasbackgroundImagedefaultTheme: Theme, that will be used for the app. Please keep in mind, that the user settings can overrule this defaultTheme, so when you’re testing something regarding theme, useDefault Settingin the profile settings of the userloginScreen: Currently not supportedmainMenuCode: Here you can define the menu structure code of your applicationstartupScreen: Here you can define the startupScreen for the app, you can create your own or usemasterDesktopWtranslationNamespaces: Here you can define which translationNamespace should be used for the app, e.g.swat.common. It is possible to define multiple namespaces comma-separated, which will be checked after each other, if they are defined for the chosen language. This attribute is available in SWAT version23.13
The different apps can be accessed either by launching an app from development environment or directly by adding /?app=YOURAPPNAME as URL parameter to your base URL
Add module
- In the application go to
Build -> Application - Switch to tab
Modules - Use the FAB and after that the plus
- Enter the following information:
Module NameName of your new moduleProduct CodeChoose the corresponding applicationData FolderUse the same as inModule NamePackage NameUse the same as inModule NameModule DescriptionGive a short description of this application- Confirm
How-To: Configure application in base-data-standard-definitions.json
With the release of 23.18.0, this is no longer needed. The product query will be automatically adjusted/added to include the newly created one in SWAT.
Both the product and module queries are updated.
You have to configure them so that they will be exported
- In the gitpod development environment got to
src -> data -> base-data-standard-definitions.json - Find the entry
- Add your ProductCode (=Application Code) in
QueryStringby addingOR ProductCode EQ '[YOUR_APPLICATION_NAME]' - Find the entry
- Add your ProductGuid in
QueryStringby addingOR ProductCode EQ '[YOUR_PRODUCT_GUID]' - The ProductGuid is not visible in Frontend, so you have to hack a little bit to get this. One example could be:
- Open the Chrome DevTools
- Got to the grid “Modules” and trigger a reload of this grid
- In DevTools see the response of the request, copy the JSON-File into an JSON Viewer and search for your ProductName. You will find an element, where also the
ProductGuidis included - Save the file
How-To: Configure application in repository-objects-definitions.json
With the release of 23.18.0, this is no longer needed. The application entry is automatically added.
- In the gitpod development environment got to
src -> data -> repository-objects-definitions.json - Copy the entry (don’t forget the semicolon in the beginning) and paste it below the last entry
,
{
"BaseFolder": "repository/xxx",
"ImportData": {
"SetModifiedStatus": false
},
"ExportData": {
"ProductCode": "XXX",
"ResetModifiedStatus": true,
"ThrowOnError": true,
"ExportModifiedStatus": false
}
}- Replace the
XXXwith the name of your application (lowercase in the entryBaseFolder, uppercase in theProductCode) - Now you have also to create the
BaseFolder. For that check in gitpod folder structuresrc -> data -> repositoryand create the folder with the name of your application (lowercase) - After that you have to create minimun one screen for this application. Otherwise the folder will not be merged into develop and leads to errors