Template for Success

Anyone who has the need to create multiple ProjectWise datasources (and this is a whole different discussion unto itself!) has pondered the idea of creating a template to facilitate this effort.  On the surface it is a great idea, saving you setup time and configuration.  However, if we look deeper, it does come with pitfalls.

First, at a very basic level, each ProjectWise datasource needs its own corresponding SQL or Oracle database.  The database itself can be created in a variety of ways and does not require much effort.  During the datasource creation process, ProjectWise links the datasource to the appropriate database through an ODBC connection.  When the process completes, your SQL or Oracle database will contain dozens of tables required for ProjectWise.

Each new datasource, along with any folders or documents, have GUIDs (Globally Unique Identifier) assigned.  Each GUID contain 6 fixed bits and 122 random bits creating a number so large that the probability of the same number being generated twice is essentially nil.  However, if you simply clone (copy) the database to create a new one, you have thus copied the GUIDs.  At a minimum, this could affect the Full Text Retrieval process that is maintained by the ProjectWise Orchestration Framework.  There are ways to manipulate GUIDs after a ProjectWise database is created, but these require modifying your SQL or Oracle database directly, which is unofficially a “no-no” as you can easily corrupt your entire database.

Instead, if you need to create multiple datasources, consider using a ProjectWise template.  The option “Create datasource from template” is available on the final screen of the New Datasource Wizard.  If selected, this option imports selected data into the new ProjectWise database, based on a previously created template.  In my experiences, I have used a template that automatically creates the following when a datasource is created:

– Environments
– States and Workflows
– Folders and Projects
– Documents
– Project Properties and Types
– Custom SQL Tables

Some of the options above are created when exporting them from an existing datasource using the ProjectWise Export tool.  Using the Export tool creates, at a minimum, a .aam file.  This is an ASCII file that is identified when you enable the “Create datasource from template” option listed above.  However, some options, such as creating States, are added to the .aam file manually.  The syntax for creating States looks like this:

StatesDepending on what you are defining in the template, there are several files required during the new datasource creation process. These files are typically stored in C:\Program Files (x86)\Bentley\ProjectWise\templates and can include the aforementioned .aam, plus a .ecschema and .ecinstance file.  Lastly, in the same folder, you can create a specific .ini file that can be used to create ProjectWise Attribute Exchange Rules (Title Block Integration).

As with many other ProjectWise commands, there are several configuration notes that you need to be mindful of, including but not limited to:

– Some components cannot be created through a template :  For example, Users, Groups and User Lists need to be created manually.

– Multiple Datasources:  It is recommended you discuss this strategy with Bentley Professional Services to ensure it is the right approach for your organization.

The .ecschema and .ecinstance files: These two files are automatically imported, if needed, by selecting the .aam file.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s