ConcourseSuite Support

Support
Corporate
PUBLIC PROFILE

Create Install and Upgrade Scripts

When installing ConcourseSuite CRM for the first time, a series of SQL statements, Java Applications, and BeanShell Scripts are executed.

  • The SQL statements create database tables and referential integrity
  • A Java application installs default data into the tables, based on Locale, from permissions_en_US.xml
  • A Java application installs default lookup data into the tables, based on Locale, from lookuplists_en_US.xml
  • A Java application installs default help data into the tables, based on Locale, from help.xml

Updating the Install Scripts

SQL Statements

In the ConcourseSuite CRM code structure, there are installation directories for each database type. In each database specific subdirectory, there are files in the form of "new_*.sql" -- these files are read in a specific order by build.xml during database installation.

If possible, edit the existing new_*.sql file with your changes or additions if applicable. If your additions are unrelated to the existing files, then create a new_*.sql file and register it in build.xml.

For your additions and changes to work under different database platforms, database specific files are provided and should also be updated. At some point these are synchronized by the core team.

Permissions XML

The permissions.xml file is read in during database installation and includes:

  • Module Names
  • Module Permissions
  • Module Editors
  • Module Reports
  • User Roles and default permissions

If making a change to an existing module, be sure to update the capabilities, permissions, and related capability details for that module. If adding a new module, model the new module after an existing module.

A snippet from the Help Desk module appears as:

<category id="8" name="Help Desk" folders="true" lookups="true" reports="true" 
    scheduledEvents="true" objectEvents="true" 
    categories="true" actionPlans="true" customListViews="true">
  <folder constantId="11072003" description="Tickets"/>
  <lookup constantId="922051718" class="lookupList" table="lookup_ticket_cause" 
    description="Ticket Cause"/>
  <lookup constantId="922051719" class="lookupList" table="lookup_ticket_resolution" 
    description="Ticket Resolution"/>
  <permission name="tickets" attributes="v---" description="Access to Help Desk module"/>
  <permission name="tickets-tickets" attributes="vaed" description="Ticket Records"/>
  <permission name="tickets-tickets-tasks" attributes="vaed" description="Tasks"/>
  <permission name="tickets-knowledge-base" attributes="vaed" description="Knowledge Base"/>
  <permission name="tickets-defects" attributes="vaed" description="Ticket Defects"/>
  <report file="tickets_department.xml" type="user" permission="tickets-tickets" 
    title="Tickets by Department" 
    description="What tickets are there in each department?"/>
  <report file="ticket_summary_date.xml" type="user" permission="tickets-tickets" 
    title="Ticket counts by Department" 
    description="How many tickets are there in the system on a particular date?"/>
  <report file="assets_under_contract_report.xml" type="user" permission="tickets-tickets" 
    title="Assets Under Contract" 
    description="Which assets are covered by contracts?"/>
  <multipleCategory constantId="202041401" table="ticket_category" maxLevels="4" 
    description="Ticket Categories"/>
  <actionPlanEditor constantId="912051329" description="Action Plans related to Tickets"/>
  <customListViewCategory constantId="113051436" description="Ticket Custom List Views"/>
</category>

The Help Desk module is declared with a unique constant id, a name, and the following editor capabilities:

  1. Folders -- enables the Administrator module editor for modifying Help Desk folders
  2. Lookups -- enables the Administrator module editor for modifying Help Desk lookup lists
  3. Reports -- enables Help Desk reports in the Reports module
  4. ScheduledEvents -- enables displaying Help Desk scheduled events in the Administrator module
  5. ObjectEvents -- enables displaying Help Desk object events in the Administrator module
  6. Categories -- enables the Administrator module for modifying Help Desk categories
  7. ActionPlans -- enables the Administrator module for configuring Help Desk action plans
  8. CustomListViews -- enables the Administrator module for configuring Help Desk list views

For each capability, a corresponding entry must be created.

Folder Entry

Folders have a unique constantId and a description.

<folder constantId="11072003" description="Tickets"/>
Lookup List Entry

Lookup lists have a unique constantId, specify a class which defines how the lookup list is edited, the table to be modified, and a description. The following entry will register a lookup list against a specific module. The default data for a lookup list is stored in the Lookup List XML.

<lookup constantId="922051719" class="lookupList" table="lookup_ticket_resolution" 
  description="Ticket Resolution"/>
Permission Entry

Permissions have a unique name, description, and all of the attributes that have been implemented by the developer

Attributes map to the web-based role editor as:

  • v Access to the specified module or module area; or Access to view records of the specified type
  • a Access to add records of the specified type
  • e Access to edit records of the specified type
  • d Access to delete records of the specified type

<permission name="tickets" attributes="v---" description="Access to Help Desk module"/>
<permission name="tickets-tickets" attributes="vaed" description="Ticket Records"/>
Report Entry

Reports are associated with a file, have an access type, can be mapped to a user permission, have a short title, and have a lengthier description.

<report file="assets_under_contract_report.xml" type="user" permission="tickets-tickets" 
  title="Assets Under Contract" description="Which assets are covered by contracts?"/>
Multiple Category Entry
<multipleCategory constantId="202041401" table="ticket_category" maxLevels="4"
  description="Ticket Categories"/>
Action Plan Editor Entry
<actionPlanEditor constantId="912051329" description="Action Plans related to Tickets"/>
Custom List View Category Entry
<customListViewCategory constantId="113051436" description="Ticket Custom List Views"/>
Role Entry

Further down in the file there are default User Roles that also get installed. For each role, a name is identified, a lengthier description, and the permissions and access attributes that this role has.

<role name="Sales Manager" description="Manages all accounts and opportunities">
   <permission name="myhomepage" attributes="v---"/>
   <permission name="myhomepage-dashboard" attributes="v---"/>
   <permission name="myhomepage-inbox" attributes="v---"/>
   <permission name="myhomepage-tasks" attributes="vaed"/>
   <permission name="myhomepage-reassign" attributes="v-e-"/>
   <permission name="myhomepage-profile" attributes="v---"/>
   <permission name="myhomepage-profile-personal" attributes="v-e-"/>
   <permission name="myhomepage-profile-settings" attributes="v-e-"/>
   <permission name="myhomepage-profile-password" attributes="--e-"/>
   <permission name="myhomepage-action-lists" attributes="vaed"/>
   <permission name="myhomepage-action-plans" attributes="vaed"/>
   <permission name="sales" attributes="v---"/>
   <permission name="sales-leads" attributes="vaed"/>
   <permission name="sales-import" attributes="v---"/>
</role>

Lookup Lists XML

Updating the Upgrade Scripts

Upgrade scripts are also stored in the src/sql directory structure and can be either database specific .sql files, or database and language independent .bsh files.

SQL scripts are used for making changes to the schema, BeanShell scripts are used for data related additions and changes.

Since ConcourseSuite CRM is localized and supports multiple database servers, using a .sql script is usually not acceptable for inserting String values into the database. In these cases, a BeanShell script must be created to insert the values.

SQL Upgrade Scripts

BeanShell Upgrade Scripts

Sign in to add your comment.