BrightServer Projects

Contents Hide

  

A BrightServer project is saved as a .bep file and contain the necessary configuration design data to execute BrightServer. These projects define the tables expected and data paths of the device's captured data when synchronised to BrightServer - such as specifying them to be read/written to a back-end database or other data accessor. The project definition may also provide transformations, complex manipulations or data retrieval through external libraries via scripting definitions in the project.

A completed BrightServer project may be validated and executed within BrightBuilder, under a debug context. Outside of this, the BEP files are typically uploaded to a BrightServer instance using the 'Deploy Configuration to BrightServer ...' option in the context menu of the node. Once deployed, a name and release version will be assigned, which may be used to activated the logic for users to use with BrightBuilder designed mobile applications.

For more information on deployment configurations on BrightServer, refer to <placeholder>

BrightServer projects are represented with the orange butterfly logo.

There are four elements in a BrightServer project, namely:

These elements will be discussed in details in subsequent sections.

Creating a new project

To create a new project,

  1. Either:

    • Click on the New Project icon in the toolbar or projects panel, or

    • Select File>New Project... from the Main Menu, or

    • Right Click the "Server Configuration" node in the projects panel and select "New Project ..."

    Then,

  2.  

    • Select BEP – BrightServer Project from the Select Project Type dialog and click Next.

    • Choose whether to use an existing template or blank project, then click Finish.

    • Select the directory where the project will be saved from the New Project dialog.

    • Enter the name of the project or retain the default project name “NewProject.bep”.

    • Click Create button to start setting up the BrightServer project.

Opening an existing project

To open and make an existing project accessible in BrightBuilder,

  1. Either: 
    • Click on the Open Project icon , or

    • Select File> Open Project… from the Main Menu, or

    • Right Click the "Server Configuration" node in the projects panel and select "Open Project ..."

    • The Open Project dialog will display as shown below:

    Then:

  2.  

    • Select the directory where the project is located. Note that both BSP and BEP projects will be accessible from this point; take note of the file extensions.

    • Select the project and click the Open button. The opened project will be listed in the Projects Window as shown below:

Project properties

BEP projects have different properties from BSP projects.

To view properties, do any of the following:

  • If the Properties Window, as shown below, is already visible, view the properties by selecting the project name.

  • Otherwise, right-click the project name and select Properties from the pop-up menu, this will display the Properties dialog.

BrightServer Project properties (sorted by property name) include:

Property Name Description
All Files A read-only property that specifies where the project file is saved.
Author The person or organization who created the project
Description A text that describes the project.
File Size A read-only property that shows the project file size.
Language A read-only property which describes the language used in the project. Defaulted to English language.
Modification Time Displays the modification date and time of the project.
Name Name of the project.
Show Wizard Before Execute Show the Run Server Wizard every time the server is executed.
Version The version number of the project.

Saving a project

A project can be saved by selecting the project name and clicking on the Save or selecting File > Save from the Main Menu.

There is also a Save All option that will save all projects that has been modified. These options will not be enabled if all projects opened in the projects tree are unmodified.

Saving will also occur prior to a BEP's execution, via tapping the Execute button . Projects are always saved before execution.

Closing BrightBuilder with project modifications unsaved will open the Save dialog box before closing as shown below. This ensures that changes made to projects will be saved before BrightBuilder is closed.

BrightBuilder will create three files in the local directory, with the following file extensions:

  1. .bsp - XML application definition file.

  2. .bsp~ - backup file, created and updated when the project is saved.

  3. .bak~ - backup file, created and updated when the project is initially loaded in BrightBuilder. This file is a recovery file when project save was corrupted.

Closing a project

Closing a project will remove the project name from the list on the Projects Window and will also close all project elements that are open in the Editor Window. Furthermore, if the project is currently running as an embedded instance, BrightBuilder will terminate the BrightServer instance upon closing the project file.

To close a project, right-click on the project name and select Close Project from the context menu. This may alternatively be performed by selecting the project in the tree and selecting File > Close Project.

Projects are kept open when BrightBuilder closes will be reloaded when BrightBuilder starts up.

Creating project elements

By default, Server, License and User elements are already created when a BEP project is created. Only Sync Points, Mappings and Tables are generated on demand.

Sync Points, Mappings and Tables each have a pop-up menu that allows new elements to be created. Shown below is the pop-up menu for Sync Points.

Validation and Execution of BrightServer projects

As with other BrightBuilder projects, BEP projects also has a built-in validation function that checks the BrightServer configuration for any inconsistencies or errors such as the database connection string and client tables to be selected. The Output > Validation window will display.

Once confirmed to be working, the BrightServer configuration file may be deployed to a BrightServer instance. For more information, please refer to the Deploy Configuration to Server section of this topic.

Importing Database Tables

Once a database Sync Point has been created, the database connection string can be used to connect to that database and import the tables from that database.

To import database tables,

  1. Right-click on the project name

  2. Select Import Database Tables… from the pop-up menu. A Select Database dialog will display as shown below:

  3. Select the database to connect to and click OK.

  4. If there are no databases found in the project, click on New Database Connection to enter the details for a database.

  5. Once a database has been entered the dialog will show all the tables available to import in to the project.

  6. Select the tables to import and click Import. These tables will be listed under the Tables element.

To connect with custom JDBC drivers in BrightBuilder, the drivers must be placed in BrightBuilder's install directory. For more information, please refer to the Appendix > Using Custom Database Connections topic.

Creating Database Tables

BrightBuilder may be used to export defined tables to a database directly via connection, or via generating an SQL script to do so. To do this, select the Create Database Tables ... option under the right click context menu of the project. The tables contained in the project will be shown and selectable via check box controls on the left.

 

Once selecting tables to be exported, select or create a database selection. Then tap 'Create Tables'. This will create tables on the database specified, provided they do not exist. If they do exist, they may be dropped via the 'Drop tables that already exist' option in the dialog before the 'Create Tables' operation.

A script containing the table's CREATE TABLE statement may also be generated using the 'Show Script' button. This will open a new window, displaying a script that may be run to create the selected table(s).

To connect with custom JDBC drivers in BrightBuilder, the drivers must be placed in BrightBuilder's install directory. For more information, please refer to the Appendix > Using Custom Database Connections topic.

Exporting Configurations

To configure an existing BrightServer, a BEP project file must be exported or deployed.

When exporting, a XML file will be generated from the BEP project. This file is created automatically if the BEP project was executed through BrightBuilder. However if you need the XML configuration file for a different installation of BrightServer, you can export the configuration file as an XML document that can be used immediately by BrightServer. By default, the exported file will be exported as [PROJECT_NAME].xml. E.g. BepProject1.xml.

Exporting to Configuration File

  1. Right-click the project name

  2. Select Export Configuration… from the Main Menu. If there are any validation errors then the project cannot be exported, the following error message will be displayed.

  3. If the project has no validation errors, the “Choose a directory to export to” dialog will be displayed.  From this screen, select the directory to which the file will be exported to.

  4. Click Select button to generate the xml file.
     

Using Exported Configuration Files

  1. Copy the XML file into the "conf" directory of a BrightServer instance

  2. BrightServer contains a service configuration file which may be configured to use the newly exported XML file. This configuration file is located at "[BRIGHTSERVER_DIR]/service/wrapper.conf". The parameter: "wrapper.app.parameter.7" must be pointing to the exported XML file. E.g. "wrapper.app.parameter.7=..\conf\BepProject1.xml". Adding this line will run the specified file as the sole active default configuration, disabling any other configurations on the server.

  3. If the "[BRIGHTSERVER_DIR]/service/wrapper.conf" file was changed, restart the BrightServer service. If only the configuration file was updated, then a restart is not necessary. The new configuration settings will be updated while the server is running.

Deploy Configuration To Server

To apply the logic of server configurations defined in BrightBuilder, the BEP file must be deployed to a running BrightServer instance. In doing so, the BEP will be stored on the server instance, allowing it to be used when configuring users.

In order deploy a BEP configuration to a running BrightServer instance:

  1. Right-click the project name

  2. Select Deploy to Server… from the Main Menu. If there are any validation errors then the project cannot be exported.

  3. If the project has no validation errors, the “Deploy Configuration to Server” dialog will be displayed. The drop down box will display all the BrightServer instances which have been registered with BrightBuilder.

  4. From this screen, select the BrightServer instance to deploy to, or to deploy to a server not listed select "New Server...". This will show the Add Server wizard which will allow you to specify the location of the server to deploy to.

    An alternative configuration name may also be specified via the 'Deploy As' fields in the dialog. Using this will release the application in the trunk of the string specified, as opposed to BEP name.

  5. Proceeding may require user authentication, via the login dialog. This will automatically appear if there is no active connection to the server. Enter details for an admin user, or a user with privileges to deploy an application, to continue.

    If there are any issues connecting to the server, a dialog box will appear, and the project may not be deployed. Please refer to the BrightServer Troubleshooting section of this document to assist in diagnosing any of these issues.

  6. Once a server has been connected to, a description of the deployment, and any configuration variables will display to be defined via file attachment.

  7. After these are entered, tapping 'Deploy' will upload the definition to the server. A confirmation message will be displayed on success, along with options to navigate to the instance and activate/release the newly deployed BEP.

When successfully deployed, BrightServer will add the new definition in a repository of configurations, which may be activated and released to users while BrightServer is still running. This process is further explored detailed in the BrightServer Project Deployment and Deployed Configurations chapters of this document.

Backup Project

Use the Backup Now… menu option from the project’s pop-up menu to make a back up copy of the BEP file.

Set Password

The Set Password… menu option from the project’s pop-up menu allows you to secure the BEP file for modifications or even for viewing.