This tutorial describes how to install the Formspider Reference Application SRDEMO. SRDEMO is a customer relationship management application that tracks customer service requests. SRDEMO implements common use cases developers face while building applications, according to Formspider best practices. You can click here to run the SRDEMO application.
We are writing a developer guide which documents the development of SRDEMO in detail. First 5 chapters of the guide are available online:
- Chapter 1: Getting Started with the Service Company
- Chapter 2: Setting Up Your Environment and Creating Your Application
- Chapter 3: Implementing Security Infrastructure
- Chapter 4: Implementing Internationalization Infrastructure
- Chapter 5: Implementing the Main Layout and Login Screen
Download the installation scripts and please follow the instructions below to install the SRDEMO application. Please note that SRDEMO requires Formspider version 1.3 to run properly.
1. Creating SRDEMO Schema
1.1. Setting Up the Database
Before creating the SRDEMO schema, make sure that DBMS_CRYPTO package is already installed in your database. To check it, connect to your database with the SYS user and run the following query:
select * from user_objects where object_name = 'DBMS_CRYPTO'
If the DBMS_CRYPTO package is not installed, please connect to your database as sysdba and install this package using the script named dbmsobtk.sql located under $ORACLE_HOME/rdbms/admin directory.
1.2. Creating Schema
Locate the dbSchemaScripts subdirectory. This folder contains files that used to create the SRDEMO user and schema, populate schema table data and drop the schema. Detailed information about these scripts is in the table below:
|01_createSchema.sql||Creates the database user named “SRDEMO” and grants necessary privileges to this user.|
|02_createSchemaObjects.sql||Creates schema tables and constraints.|
|03_createSequenceTriggers.sql||Creates before insert triggers on the SERVICE_REQUESTS, PRODUCTS and USERS tables.|
|04_populateSchemaTables.sql||Populates sample data in schema tables.|
|05_createPackagesViews.sql||Creates all packages, views and triggers used by the application.|
|clearSchemaTables.sql||Deletes data contained in tables created for the SRDEMO user.|
|dropSchemaObjects.sql||Drops all database objects created for the SRDEMO user.|
|dropSchema.sql||Drops SRDEMO schema from your database.|
The SRDEMO user owns the data displayed in the application. Access to an Oracle SYS user or equivalent is required to create the user account and assign the appropriate privileges. To create the schema owner and schema, take the following steps:
- Open your favorite PL/SQL editor tool and log on as SYS or another DBA level user. (You may need to ask your DBA to run this script for you.) Execute the script named 01_createSchema.sql to create the SRDEMO schema owner.
- Log on to SRDEMO schema.
- Execute first the script named 02_createSchemaObjects.sql and then the script named 03_createSequenceTriggers.sql to create all necessary tables, constraints and database sequences. Execute the script named 04_populateSchemaTables.sql to insert sample data into tables.
- Finally, execute the script 05_createPackagesViews.sql to create application’s packages, views and triggers.
2. Importing Images into the Middle-tier
Locate the SRDEMO subdirectory. This folder contains the images and icons used in the application. It also contains an HTML file displayed as the FAQ page of the application. To import these files into the middle-tier:
- Navigate to the “apps” folder in your middle-tier installation. By default, you can find this folder under “[Tomcat Home]\webapps\formspider”.
- Copy the SRDEMO folder under the “apps” folder.
3. Importing SRDEMO Application
To import the SRDEMO application, perform the following steps:
- Open Formspider IDE, select “File –> Import” from the menu bar, the “Import Application” dialog shows up.
- Press “Browse”, select SRDEMO.xml file and press “Next”.
- Make sure that “Import my file as a new Application” option is selected and the value “SRDEMO” is appeared in the textField labeled “Import as”.
- Press “Import” to complete the process. An information message appears on the screen when the import is successfully completed.