...
- Contact Canvas Support or Engineering team for the Canvas setup JARs.
Execute the following command from the Command Prompt:
Code Block language bash java -jar CTSetup.jar
The Ant software version will be detected.
The Canvas Development Environment Setup Wizard opens with the Verify Software Prerequisites section. The Java SDK location path that is detected appears in the Java Home field.
By default, MySQL and Tomcat are selected in the Database Type and Server fields respectively. You can change these values if your target database and app server environment is different.Note Oracle is the supported alternative database and JBoss is the supported alternative app server. The setup assumes that your system contains the selected software.
- Click Next.
- In the Verify Canvas Prerequisites section, perform the following:
- Specify the application work folder in the Canvas Workfolder path field. If the folder does not exist, create the folder by clicking Select > Create new folder. Application logs, generated contents, such as reports, get stored in this folder.
- Specify the application name in Application Name field. The application name will be used as the WAR name and the application context.
- Specify a description for the application in the Short Description field. The description entered here will be added to the application manifest file.
- Specify your team name in the Team Name field. The team name entered here will be added to the application manifest file.
- Click Next.
Anchor step5ofsetDevEnvironment19_1 step5ofsetDevEnvironment19_1
- In the Build and Deployment Parameters section, perform the following:
- Enter the folder for generating the application WAR in the Build Folder Path field. If the folder does not exist, create the folder by clicking Select > Create new folder icon. The application WAR file generated during build is stored in this folder.
- Enter the application source code folder in the Application Source Code Folder field. If the folder does not exist, create the folder by clicking Select > Create new folder icon. This folder is your main development folder in which the application source code and templates are to be created.
- Enter the application version number in the App Version No: field. The version number entered here is added to the application manifest file.
- Click Next.
- In the Generate Project Template section, click Generate.
The project template creation begins and and its status is shown in Summary. Once complete, click Finish.
A new application template with the name provided in step 4b is created inside the application source code folder. For example, a new application template named SmartBank is created inside D:\SmartbankSVN as shown in the following screen shot:Info The application project template folder contains the following sub-folders and files. These folders are the placeholders for your application source code and its dependencies.
- Dependencies - Place all the dependencies of your application here, e.g. third-party application JARs.
- DBScripts - Place all the database scripts of your application here.
- Lib - Place all the server-side code here, e.g. data support class, action classes, instruction classes etc.
- Resources - Place all the resources used by your application, e.g. properties files, SQL Maps etc.
- WebApp - Place all the web content (client-side) files here, e.g. listeners, HTML, CSS, images etc.
- ToBeCopiedOutside - Contains the additional files needed for generating reports. The contents of this folder need to be copied to the application work folder in step 4a. For example, D:\SmartBank.
- build.xml - File for building the application WAR file. This can be used as-is unless you are using some other folders to maintain your application code instead of the folders created by the wizard.
build.properties - Properties file for build process. All the required inputs for building the application (e.g. Java directory) captured in the wizard are populated in the respective properties in this file. If suppose any of those inputs changes, you can update this file accordingly.
Note title Note In the build.properties file, you can specify the key of ARX_VERSION. To use the ARX Authentication system, set the apt version number of ARX as the key, e.g. ARX_VERSION=16. On using the ARX Authentication system, the implclassconfig and ctstudiosecurityconfig properties files get impacted. In the implclassconfig properties file, ARX is defined as role-based entitlement. The following code snippet serves as a reference:
Code Block VIEW_ENTITLEMENT_CLASS = com.intellectdesign.canvas.provider.auth.entitlement.ArxRoleBasedViewEntitlement
In the ctstudiosecurityconfig properties file, ARX is defined as the Authentication Provider. The following code snippet serves as a reference:Code Block AUTH_SERV_PROV_CLASS = com.intellectdesign.canvas.provider.auth.arx.ARXCookieBasedAuthenticationProvider
- MobileBuilder.properties - Properties file for mobile build process.
...
- Access the path of the zipped database folders, e.g. D:\CT\dist\database.
- Extract the files of the target database from the zip folder, e.g. canvasSetup_MYSQL.
- Open the extracted folder of canvasSetup_MYSQL.
- Open the extracted folder of canvasSetup_MYSQL.
- Open the bin folder in canvasSetup_MYSQL.
- Open the config.txt file in bin folder.
Multi App Schema enables you to use a single config configuration schema for different applications, in this case, SmartBank and another applicationother applications. This is similar to a functional application (e.g. Modelhouse) and Sigma, using the same config (metadata) schema instead of using two different schemas.
Note title Note If you want to use multi app schema, then perform step 5 or else proceed to step 6.
- Only when you use a multi-app schema, it is required for you to replace the existing name of the MULTI_APP_SCHEMA, with a new one, e.g. MULTI_14260 and then you must proceed to save the config.txt file.
- Double-click the run windows batch file to generate the DB scripts.
The DB scripts get generated. After the DB scripts get generated successfully, open server.xml file in the app server’s configuration folder to change the schema name, e.g. D:\Canvas\apache tomcat 8.5.9\conf\server.xml.
Note title Note The same schema name, which was names for application, Studio, and Sigma application that were provided in the config.txt file, should must be used specified in the server.xml file.
The following sample code snippet serves as a reference of server.xml file for the schema details of sample application (Modelhouse), Sigma and Canvas Studio. :Code Block Sample Application: <!-- <Resource auth=<!-- Schema for application, e.g. Modelhouse --> <Resource auth = "Container" driverClassName = "com.mysql.cj.jdbc.Driver" factory = "org.objectweb.jotm.datasource.DataSourceFactory" maxactive = "10" maxidle = "10" maxwait = "-1" name = "jdbc/ModelHouseCT" username = "<SCHEMA USERNAME>" password = "<SCHEMA PASSWORD>" type = "javax.sql.DataSource" url = "<APPLICATION URL>" username="<SCHEMA USERNAME>"/> <Resource <Resource auth auth= "Container" driverClassName = "com.mysql.cj.jdbc.Driver" factory = "org.objectweb.jotm.datasource.DataSourceFactory" maxactive = "10" maxidle = "10" maxwait = "-1" name = "jdbc/ModelHouse" username = "<SCHEMA USERNAME>" password = "<SCHEMA PASSWORD>" type = "javax.sql.DataSource" url = "<APPLICATION URL>" username="<SCHEMA USERNAME>"/> <!--> Schema for Sigma: application <!--> <Resource auth = "Container" driverClassName = "com.mysql.cj.jdbc.Driver" factory = "org.objectweb.jotm.datasource.DataSourceFactory" maxactive = "10" maxidle = "10" maxwait = "-1" name = "jdbc/SigmaCanvasDataSource" username = "<SCHEMA USERNAME>" password = "<SCHEMA PASSWORD>" type = "javax.sql.DataSource" url = "<APPLICATION URL>" username="<SCHEMA USERNAME>"/> <Resource auth = "Container" driverClassName = "com.mysql.cj.jdbc.Driver" factory = "org.objectweb.jotm.datasource.DataSourceFactory" maxactive = "10" maxidle = "10" maxwait = "-1" name = "jdbc/SigmaAppDataSource" username = "<SCHEMA USERNAME>" password = "<SCHEMA PASSWORD>" type = "javax.sql.DataSource" url = "<APPLICATION URL>" username="<SCHEMA USERNAME>"/> <!--> Schema for Canvas Studio: <!--> <Resource auth = "Container" driverClassName = "com.mysql.cj.jdbc.Driver" factory = "org.objectweb.jotm.datasource.DataSourceFactory" maxactive = "10" maxidle = "10" maxwait = "-1" name = "jdbc/ExpertStudio" username = "<SCHEMA USERNAME>" password = "<SCHEMA PASSWORD>" type = "javax.sql.DataSource" url = "<APPLICATION URL>" username="<SCHEMA USERNAME>"/> <Resource auth = "Container" driverClassName = "com.mysql.cj.jdbc.Driver" factory = "org.objectweb.jotm.datasource.DataSourceFactory" maxactive = "10" maxidle = "10" maxwait = "-1" name = "jdbc/ExpertStudioTarget" username = "<SCHEMA USERNAME>" password = "<SCHEMA PASSWORD>" type = "javax.sql.DataSource" url = "<APPLICATION URL>" username="<SCHEMA USERNAME>"/> -->
Develop the Application and Build the Application WAR
...