Business Modeler IDE Best Practices Guide V2.16
Business Modeler IDE Best Practices Guide V2.16
Version 2.16
July 2013
Change Summary
2.9 11/01/2010 Added ‗Best practices for general Form creation‘ in new section 10.5
Added a prerequisite task ‗Correction of form storage class on custom form types‘ in
11.1.1.
Added ‗Correction of form storage class on custom form types‘ in new section 12.1
Added ‗Codeful Extensions‘ in Appendix section
2.10 03/30/2011 Updated the section 14.1 to mention the wizard location
Updated section 13.2 (Dataset type name collisions) to discuss about usage of prefix
while adding custom dataset references to a COTS dataset
Corrected the typo in section 11.5(Baseline file cleanup)
Removed chapter called ―Installation‖ since this is now covered in the standard
Teamcenter documentation set. Information can be found in both the Teamcenter
Installation manual and the BMIDE User Guide.
Cleaned up section ―How to Create a BMIDE Template Project‖ to refer to the BMIDE
User Guide for details
Cleaned up section ―How to Use TEM to Add Your Custom Template‖ to refer to the
BMIDE User Guide for details
Cleaned up section ―How to Use TEM to Update Your Custom Template‖ to refer to the
BMIDE User Guide for details
Cleaned up section ―Upgrading from Teamcenter Engineering to Teamcenter‖ to refer to
the Upgrade Guide for details
Cleaned up section ―Upgrading from Teamcenter to a new release of Teamcenter‖ to
refer to the Upgrade Guide for details
2.11 05/02/2011 Added new section 6.7 ―How to recover from a failed template deployment‖
Added a new section 18 ―How to rename a template‖
2.12 05/17/2011 Fixed missing links in the document.
2.13 7/12/2012 Removed the following sections
o Enhancements to Managing and Deploying Extensions
o How to make frequent updates to a production environment using the BMIDE
Hot Deploy
2.14 3/8/2012 Added a new section ―How to Use Custom Operation in a Condition Expression‖
2.15 08/22/2012 Added a new section ―How to remove a template‖
Added a new section ―How to remove a dependency from your template‖
Added a new section ―How to delete business object instances from the Database‖
Moved ―Codeful Extensions‖ sub-section to a new section 23 ―Codeful Extensions‖
Added a new section 23.2 ―Relation Navigation from Secondary Object to Primary
Object‖ under Codeful Extensions
2.16 06/18/2013 Updated the references to hot deploy, live update in section ―Restrictions on Deploying
Templates‖
Added a new section 17.5 ―How to add Smart Folder capability to Teamcenter without
having to install the CPG Template‖
Updated the section ―Update files in TC_DATA/model‖ with a new step needed to
rename a template
Properties
Properties are the attributes that describe the business object.
Persistent Properties are stored in the database
Compound Properties are properties from one object shown on another object
Runtime Properties are properties that are computed at runtime
Relation Properties are properties that show related objects
Schema
Schema is comprised of Classes and Attributes: the logical database representation of the business objects and
properties. Attributes represent your meta-data and store the following data types.
String
Integer
Date
Float
Character
Logical
Typed Reference
Untyped Reference
Business Rules
Business rules are the business behavior extension points of Teamcenter. The following is a list of the behavioral
extensions points in Teamcenter.
Display Rules
Naming Rules
Extension Rules
Deep Copy Rules
GRM Rules
ID Context Rules
Property Rules
Compound Properties
Verification Rules
List of Values
Options
Other extension points are available for configuring tools, change, unit of measure, and so on.
Change
Tool
Status
View Type
PS Occurrence
ID Context
Unit of Measure
Storage Media
Constants
A new constants framework is available by which you can configure extension points of the system and provide some
of your own.
Global Constants
Business Object Constants
Property Constants
Rules Engine
A rules engine framework is available for providing robust decision table logic to your customers for configuring
system behavior.
Application Extension Points
Application Extension Rules
Business Context
Figure 2 shows some of the templates that are available inTeamcenter. These templates are all available with the
Teamcenter unified architecture kit. Many of these templates were available as add-on solutions in Teamcenter
Engineering and have been converted to the BMIDE template format. The base template is called the ―foundation‖
template, and by default this template must always be installed into any Teamcenter database to give it the basic
Teamcenter functionality. The Foundation template is installed anytime a Corporate Server is installed. The other
Teamcenter templates are optional and can be installed as layers on top of the Foundation template. When a user
creates a template in the BMIDE, they can choose any of these available Teamcenter templates to extend.
Figure 3 shows some of the additional templates that are available with Teamcenter. The templates are release
asynchronous to the Teamcenter release and are not supplied with the kit. However, they can typically be
downloaded from GTAC or from the vendor who supplies the template.
Click the Workbench icon on the Welcome screen; you see the Business Modeler IDE perspective (Figure 5). A
perspective is a grouping of views. Initially all the views are empty and will remain empty until a template project is
created. For more information about each of the views, see the Business Modeler IDE Guide or go to Help->Contents.
Figure 7: Overview
5.2.3 Tutorials
The BMIDE tutorials are lists of cheat sheets that guide you step by step on how to accomplish the most common
tasks performed within the BMIDE. The tutorials can be used as a supplemental learning guide to the Business
Modeler IDE Guide. To access the tutorials, select Help->Welcome and click Tutorials. Alternatively, you can access
to the tutorials directly by selecting Window->Show View->Other->Cheat Sheets->Cheat Sheets. The following is a list
of the available cheat sheets:
Getting started
Create a class
Create a business object
Use the UML Editor
Create a list of values
Create a naming rule
Create a relationship rule
Create a deep copy rule
Create a display rule
The BMIDE creates each new project in the workspace on your machine. The workspace is created automatically for
you during the installation of the BMIDE client. If you have BMIDE running on Windows, the workspace is located at
―C:\Documents and Settings\<username>\Teamcenter\BMIDE.‖ If the BMIDE is running on UNIX, the workspace is
located at ―<username>/Teamcenter/BMIDE.‖ Your template project folder is located in this workspace.
The BMIDE exposes the template project folder and its subdirectories and files in the Navigator view. However, the
view does not directly show you the full path to the workspace. To see the absolute path of the files and folders on the
machine, select any file or folder in the Navigator view, right-click, and choose Properties from the shortcut menu. The
properties window displays the full path to the file using the Location field (Figure 12). Knowing the location of the
workspace is important when you need to back up your template project, or when you need to delete or import a
project into the BMIDE.
5.5.3.2 Dependency.xml
The dependency.xml file is an XML file contains the following information:
5.5.3.3 Master.xml
The master.xml file maintains the list of source files for the template. This file is automatically managed by the BMIDE.
Additional source files and folders can be added through wizards. Whenever a file is added or deleted through the
BMIDE, the master.xml file is updated to reflect this change. Note that this file controls the order in which source files
are loaded. The order does not matter because the BMIDE can load in any order.
Additional source files can be added by selecting the extensions folder in the project, right mouse button, and
choosing Organize->Add new extension file. Additional folders can also be created by selecting the extensions folder,
right mouse button, and choosing New->Other->General->Folder.
Figure 14 shows an alternative organization of source files where definitions are organized into functional folders first,
then by files whose names indicate specific definition types. Figure 14 splits the functionality into two folders. The
names ―functionality1‖ and ―functionality2‖ are used. However, as another example, these directories could have also
been labeled as ―bomline application‖ or ―Program A‖. The document.xml file may be used to store all schemas,
business objects, and business rule definitions related to the document business object. The tools.xml file may be
used to store all tools that were created to support the functionality.
By default, an active source file is set for your project. The active source file can be changed to designate a new
source file to receive the custom extensions. Figure 16 shows how to set the active source file. Go to the Navigator
The next two sections address these two methods of deployment in further detail.
1. There is a ―Deploy Template‖ icon on the main toolbar. The main toolbar is located under the top main
menu bar in the BMIDE. Use this button for the quickest method for deploying your extensions.
2. Right mouse button on any object and select Deploy Template.
3. From the Wizards panel, select New -> Other -> Business Modeler IDE -> Deployment.
The Deploy wizard prompts you to select the Project and the Server connection profile from your established list of
profiles. See section 5.12. Selecting a profile from the profiles pull-down menu automatically fills out your profile
information. If no connection profiles exist, then the wizard prompts you to fill out information and the wizard will
automatically create a profile for you. Enter your password and click Finish. The Deploy wizard automatically requests
that you save your template project before deploying. Click OK to save.
The Deploy wizard sends your template to the database server and synchronizes the data model in the database. A
progress wizard will be displayed in the BMIDE client while you wait for the synchronization to complete.
For each hot deploy, the Deploy wizard does the following (see Figure 22):
In the Navigator view, a new directory is created in your template project under the deploy directory using the
name of your connection profile.
A subdirectory is created under the profile directory using the current date and time of the deployment.
The sources files listed in the extensions/master.xml file are consolidated into a single file and copied to
<project>/output/deploy/<connection profile name>/<date>/<template_name>_template.xml file.
The <project>/extensions/dependency.xml file is copied to the <project>/output/deploy/<connection profile
name>/<date>/<template_name>_dependency.xml.
Create a connection to the specified server using the login credentials in the connection profile and upload the
<template_name>_template.xml and <template_name>_dependency.xml to the server using FMS. The two
files are placed into the <TC_DATA>/model directory.
The name of the deployed template is added to the <TC_DATA>/model/master.xml file if it is not already
included.
The system deletes the existing <TC_DATA>/model/model_backup.xml file.
The <TC_DATA>/model/model.xml file is renamed to <TC_DATA>/model/model_backup.xml.
A script is run that consolidates all template names listed in the <TC_DATA>/model/master.xml file and
concatenates them into a single file called <TC_DATA>/model/model.xml. As a result the model.xml file
contains the definitions from the COTS templates and the custom template.
The <TC_DATA>/model/model.xml file is compared to the <TC_DATA>/model/model_backup.xml and the
differences between the two models are written to a new file at <TC_DATA>/model/delta.xml. Because the
model.xml file contains the COTS templates and custom template definitions and the model_backup.xml file
contains the COTS template definitions, the delta.xml file contains all the definitions of the custom template.
A server utility is executed, which processes the <TC_DATA>/model/delta.xml file and synchronizes the
definitions into the database.
The file is divided into four sections and each section may contain add, change, or delete tags.
Processed Schema Changes:
The log file is provided for your benefit. You should always scan this file and look for any ―Unprocessed Schema
Changes‖ or ―Unprocessed Non-Schema Changes‖. Unprocessed elements can occur when you try to perform an
action in the BMIDE that cannot be successfully reconciled in the database.
For example, assume you defined a deployed a custom class. You also used the RAC client to create instances of the
custom class in the database. You decide that you do not need the class anymore, so you delete the class definition
in the BMIDE and deploy to the test database. In this case, the log file will show the class name in the ―Unprocessed
Schema Changes‖ area with an error message. The error message gives you an idea why the element could not be
processed. In this case it may say that the class or type is referenced or that the class/type has instances. See Figure
24.
On the Package Template Extensions page, select the project from the combo box field and then click Finish.
When the packaging wizard is complete, the following four files are located in the <Project>/Output/packaging
directory (see Figure 25):
feature_<template_name>.xml
<template_name>Bundle_<language_code>_<country_code>.xml
<template_name>_template.zip
<template_name>_install.zip
4) Generate delta.xml
2) Copy libraries to various folders in 4) Copy the latest template files from
TC_ROOT TC_ROOT/install/<template> to
TC_DATA/model
5) Generate delta.xml
Caution: There are few scenarios where you would be required to run some utilities manually to ensure that the
TC_DATA/model files in datasets is in sync with the contents of the database. Following are the scenarios…
1) When deploy failures occur and you update any of the files listed above, either manually by fixing some
elements in the XML file or by copying template files from other locations, then run the below command to
update the datasets.
manage_model_files –u=<user name> -p=<password> -g=dba –option=upload
2) When deploy failures occur, if you manually update your database to fix deployment failure issues, you must
ensure that you are also updating the files in these datasets. For example, if you run the
business_model_updater to fix an issue in your database, then you must run the below commands to keep
the dataset files and database in sync.
a. Extract the latest data model elements from your database
business_model_extractor –u=<user name> -p=<password> -g=dba –
outfile=TC_DATA/model/model.xml
b. Upload files to dataset
manage_model_files –u=<user name> -p=<password> -g=dba –option=upload
deploy.log deploy_lang.log
The deploy log files provide details of all steps executed and the steps that failed during template
deployment.
In addition to the deploy files, this <timestamp> folder contains a copy of the template package
that was deployed to your database.
Prior to Teamcenter 8.3
i. Sometimes the BMIDE Client does not pop-up a dialog indicating the deployment failure.
ii. So you will have to take a look at the TAO window and the deploy.log file
iii. The deploy.log file is a copy of the log file generated by the utility
business_model_updater. The deploy.log file is created only if the
business_model_updater utility ran during the deploy process. If deployment failure
before the execution of business_model_updater, say during generation of delta.xml,
then deploy.log files is not created.
iv. A link to the deploy.log file is added in the Console View if deploy.log is generated.
Teamcenter 8.3 onwards
i. BMIDE Client always displays a pop-up a dialog indicating deployment failed.
ii. The deploy.log file is always generated and has detailed steps of execution.
iii. The deploy_lang.log is also generated and this contains the results of adding
localizations to your database
iv. Links to deploy.log and deloy_lang.log files are added in the Console View.
TEM Deploy:
If the deploy failure occurs during TEM deploy, then you must start by reviewing the install log file.
The install log file is located at TC_ROOT/install.
The name of the log file is ―install_<configuration ID>_yyMMddHHmm.log‖.
i. <configuration ID>: Indicates the name of the configuration from which you deploy the
template.
ii. yyMMddHHmm: Indicates the data and time of deploy.
iii. For example, install_MYDB_1104281043.log.
----------------------------------------------------------
Deploy Summary
----------------------------------------------------------
Deploy Step 1: Success
deploy.log
-----------------------------------------------------------
Deploy Step 5:
-----------------------------------------------------------
Description: Loads the new model (deployed from BMIDE) and the old
model (previous) to compute the elements that were added, deleted,
or changed in the BMIDE. Verifies that each of these elements are
permitted to be updated by verifying against the Operational Data
List from the database. Writes the differences to the delta.xml
file differences and writes the added, deleted, changed elements
to a delta.xml file.
Loading the Backup File...
Loading the Consolidated File...
Error in Loading backup Model
Result: Failure
----------------------------------------------------------
*** Process Template Files - Date : Mon Feb 21 23:07:00 GMT 2011
***
----------------------------------------------------------
Adding Template to Master File...
Backing up the Consolidated Model File...
Backing up the Consolidated Model Localization File...
Finding Applicable Locales...
Creating the Consolidated Model File...
Creating the Localization Consolidated Model File...
Loading the Backup File...
Loading the Consolidated File...
***ERROR : Data Model Errors in file
C:\apps\tc\tc830\TD\model\model.xml.
Error! Model Error: C:\apps\tc\tc830\TD\model\model.xml Line:94689
Column:56 Failed to add TcStatus:LinkComplete. A Status object
exists with the name "LinkComplete". Please choose another name.
Aborting...
TEM Deploy
Review the install log file at TC_ROOT/logs
install_MYDB_1104281043.log
....
....
Output from command: "C:\Teamcenter\TR\bin\bmide_processtemplates.bat" -
u=infodba -p=***** -g=dba -mode=server -dir=C:\TEAMCE~1\TD\model -
templates=custom -deployvalidation=yes -update=all
Adding Template to Master File...
Backing up the Consolidated Model File...
Backing up the Consolidated Model Localization File...
Finding Applicable Locales...
Creating the Consolidated Model File...
Creating the Localization Consolidated Model File...
Loading the Backup File...
Error sample:
Error! Parsing Error: C:\Teamcenter\TD\model\model.xml Line:14574 Column:103 A
status with the name “LinkComplete” already exists. Please choose another name.
“Error! Parsing Error”: This is a static string and indicates this is a model loading validation error.
<filename>: Indicates the name of the file in which the error occurred.
o In the above example the name of the file is ―model.xml‖ and it is located at
―C:\Teamcenter\TD\model‖.
<line number>: Indicates the line number in the file where the error occurred.
o In the above example, the line number is indicated as ―Line: 14574‖.
<column number>: Indicates the column number in the file where the error occurred.
o In the above example, the column number is indicated as ―Column: 103‖.
<message>: A short description of the error.
o In the above example, the error message is ―A status with the name ―LinkComplete‖
already exists. Please choose another name.‖
The error states there are duplicate ―LinkComplete‖ statuses in model.xml. If you look
in the model.xml, you would find two TcStatus definition with the same name.
<TcStatus
statusName="LinkComplete"
description="Status during
document link completion"
However model.xml file is a generated file (consolidation of individual templates)
To find the templates that define ―LinkComplete‖, you have to search in all the
packageName="package2"/>
―*_template.xml‖ or ―*_template_<locale>.xml‖ files located in TC_DATA/model
folder
A search in TC_DATA/model revealed that the TcStatus ―LinkComplete‖ was found in
two templates
1. commom_template.xml
2. customer_template.xml
This means the status ―LinkComplete‖ was already defined in the ―common‖ template
and deployed to the database. Hence you have to remove the ―LinkComplete‖ definition
from your ―customer‖ template.
Resolution
1. Go back to BMIDE
2. Open ―customer‖ template project
3. Remove the duplicate status ―LinkComplete‖ since it is already defined in
―common‖ template
4. Re-deploy ―customer‖ template
Cause This error indicates that the model element Status named
―LinkComplete‖ already exists. This means that another template in
TC_DATA/model already has this Status defined.
The reason BMIDE UI did not detect this when you created
―LinkComplete‖ in your own template project could be because your
template was not dependent on the template that already defined this
Status. Since the BMIDE only loads your dependent templates, it could
not detect the collision before template deploymnet.
Resolution The fix is to remove the Status called ―LinkComplete‖ from your own
template and redeploy the template.
===============================================================
Processed Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
===============================================================
===============================================================
Processed Non-Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
Add | TcLOV | Colors | 0 | Success
===============================================================
Unprocessed Non-Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
Delete | TcDataset | Rx7JPEG | -1 | Cannot delete
| | | | Rx7JPEG (TcDataset)
| | | | because it is
| | | | referenced.
----------------------------------------------------------
Deploy Summary
----------------------------------------------------------
Deploy Step 1: Success
Deploy Step 2: Success
Deploy Step 3: Success
Deploy Step 4: Success
Deploy Step 5: Success
Deploy Step 6: Success
Deploy Step 7: Failure
deploy.log
-----------------------------------------------------------
Deploy Step 7:
-----------------------------------------------------------
Description: Process the delta.xml file committing each data model
element to the database.
Executing: business_model_updater.
Result: Failure
===============================================================
Processed Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
===============================================================
Unprocessed Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
===============================================================
Processed Non-Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
Add | TcLOV | Colors | 0 | Success
===============================================================
Unprocessed Non-Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
Delete | TcDataset | Rx7JPEG | -1 | Cannot delete
| | | | Rx7JPEG (TcDataset)
| | | | because it is
| | | | referenced.
TEM Deploy
Start by reviewing the install log file located at TC_ROOT/install
The install log file will tell you the specific updater log file to investigate
In the example install log file below, it referring to the updater log file named
―business_model_updater_26-May-2009_16-17-34.log‖. This is the file you must review to
understand why the updater failed.
install_MYDB_0905261043.log
....
....
Executing 'install -regen_schema_file infodba ***** dba
>>"D:\SPLM\Teamcenter\TC_AMER_DEVL\Tc8.3\logs\tc_install.log"'...
Output from command: install -regen_schema_file infodba ***** dba
>>"D:\SPLM\Teamcenter\TC_AMER_DEVL\Tc8.3\logs\tc_install.log"
command_exit=0
Exit Status 0, elapsed time 0:00:03
business_model_updater_26-May-2009_17_17_34.log
--------------------------------------------------
Log File Name : ..\process\business_model_updater.log
Model File Name : C:\apps\tc\tc830\TD\model\delta.xml
Update Option : all
Run Mode : upgrade
Process Option : all
--------------------------------------------------
===============================================================
Processed Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
===============================================================
Unprocessed Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
===============================================================
Processed Non-Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
Add | TcLOV | Colors | 0 | Success
===============================================================
Unprocessed Non-Schema Changes:
===============================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|------------------|---------|-----------------
Delete | TcDataset | Rx7JPEG | -1 | Cannot delete
| | | | Rx7JPEG(TcDataset)
| | | | because it is
| | | | referenced.
Header
o The updater log file header indicates the XML file and the options used during database
update
4 sections
o This updater log file has 4 sections as shown in the table below.
===============================================================================
Processed Non-Schema Changes:
===============================================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|---------------------|---------|----------------------
Delete | OperationInput | Rx7JPEGCreI | 0 | Success
| Type | | |
===============================================================================
Unprocessed Non-Schema Changes:
===============================================================================
Action | Element Type | Element Name | Error # | Error
-------|----------------|---------------------|---------|----------------------
Delete | TcTypeConstant | CreateInput:Rx7JPEG | -1 | The Create Input object
| Attach | | | for type already exists
| | | | in the database
Delete | TcDataset | Rx7JPEG | -1 | Cannot delete Rx7JPEG
| | | | (TcDataset) because
| | | | it is referenced.
There are two errors reported in the ―Unprocessed Non-Schema Changes‖ section.
Everything is related to deletion of ―Rx7JPEG‖ dataset.
The root cause is that the dataset we want to delete is referenced. It means that the
database contains instances of this Dataset type.
If we are deleting any Business Object then we must ensure that there are no instances
of this Business Object in the database. In our sample use case, users had created
instances of the Dataset type ―Rx7JPEG‖.
To resolve this error, we have to delete all dataset instances and then redeploy. The
steps to resolve this issue is discussed in detail in the section ―Known updater errors
and resolution‖.
5) Known updater errors and resolutions
Cause The log indicates that there are 2 errors in the ―Unprocessed Schema
Changes‖ section – The addition of an attribute ―rx7Attr1‖ to the Class
―Folder‖. The deletion of a Class called ―Rx7DS‖ has failed. We need to
determine why they were unprocessed.
The root cause is that we are adding a new attribute ―rx7Attr1‖ to Folder
class. The ―Folder‖ class is a bootstrap class that cannot be updated during
Hot deploy. For more details see section titled ―Restrictions on Hot Deploy‖.
Due to this restriction, the attribute could not be added during a Hot Deploy.
Instead it has to be deployed using TEM because schema changes to
bootstrap classes require exclusive access to the database.
Resolution The resolution is to package the template and deploy it using TEM.
Cause The log indicates that there are errors in the ―Unprocessed Non-Schema
Changes‖ section – The tool named ―AcroRd32‖ could not be deleted from
the database. We need to determine why they were unprocessed.
The root cause of this issue is that tool ―AcroRd32‖ is referenced in other
elements. The elements where tool is references are in the Dataset and
Application Interface data model definitions. Due to this the tool cannot be
deleted. You must ensure that all references to this tool are removed in your
Dataset and Application Interface elements before deploying.
Error Message
======================================================================
Unprocessed Non-Schema Changes:
======================================================================
Action |Element Type |Element Name |Error# | Error
-------|---------------|-------------|---------|----------------------
Delete |TcTool | AcroRd32 | 226049 | AcroRd32 (TcTool)
| | | | is referenced
Delete | TcTypeConstant| CreateInput | -1 | The Create Input
| Attach | :Rx7JPEG | | for type already
| | | | exists in the
| | | | database
Delete | TcDataset | Rx7JPEG | -1 | Cannot delete Rx7JPEG
| | | | (TcDataset) because
| | | | it is referenced.
Cause The log indicates that there are errors in the ―Unprocessed Non-Schema
Changes‖ section – 1) The tool named ―AcroRd32‖ could not be deleted
from the database. We need to determine why they were unprocessed. 2)
The Type Constant Attach for Constant ―CreateInput‖ and Business Object
―Rx7JPEG‖ could not be deleted 3) The dataset named ―Rx7JPEG‖ could
not be deleted.
The root cause of this issue is that there are instances in the database for
the dataset ―Rx7JPEG‖. Hence the dataset definition cannot be removed
from the database. To resolve this issue you must deleted all instances of
this dataset from the database before deploying again.
The tool ―AcroRd32‖ could not be deleted because it is still referenced by
dataset ―Rx7JPEG‖. The tool ―AcroRd32‖ can be deleted only if the dataset
―Rx7JPEG‖ is deleted from the database.
The Type Constant Attach could not be deleted because an updater issue.
This is being fixed.
....
Exrtacting ...
*** Errors occurred during extraction of TcTool ***
business_model_extractor failed, see the extractor log and syslog for
details.
Please refer to
[C:\Teamcenter\TR\logs\business_model_extractor_2010_04_01_19-31-47/log]
for log information.
TEM Deploy
Start by reviewing the install log file located at TC_ROOT/install
The install log file will tell you the specific extractor log file to investigate
In the example install log file below, it is referring to the extractor log file named
―business_model_extractor_2010_04_01_19-31-47.log‖. This is the file you must review
to understand why the extractor failed.
...
Executing 'install -regen_schema_file infodba ***** dba
>>"D:\SPLM\Teamcenter\TC_AMER_DEVL\Tc8.3\logs\tc_install.log"'...
Output from command: install -regen_schema_file infodba ***** dba
>>"D:\SPLM\Teamcenter\TC_AMER_DEVL\Tc8.3\logs\tc_install.log"
command_exit=0
Exit Status 0, elapsed time 0:00:03
*****************************************************************
...
...
Error Format
**********************************************************
Start Extracting <Element Type> .....
<Error messages>
End Extracting <Element Type> .....
**********************************************************
o <Element Type>: Indicates the category of the element being extracted. In the sample
above, we are extracting all tools. Hence the element type ―Tool‖ is seen.
o <Error messages>: This section displays the errors encountered while extracting a
specific type of data model element. In the sample above, we see ―Failed to get Tool
object from the tag‖.
4) Analyze and resolve the updater error
Open the install and deploy log file to check if the extractor has failed.
If they indicate that the extractor has failed, then review the extractor log
business_model_updater_<timestamp>.log.
Check the log file to find the element whose extractor failed.
Review the <Element Type> section where the failure occurred.
If you are unable to decipher the issue, open the business_model_extractor*.syslog and analyze
the reasons for the failure of the <Element Type> extraction.
Normally extractor errors never occur. But if they do occur, it is a serious error. There could be
several reasons for the extractor failure. For instance, incorrect processing code in the customer
libraries or OOTB libraries, corrupted data in the database (due to a previous update), bug in the
extractor itself.
Extractor error most often require fixes to your database. If you are unable to decipher the
extractor error and fix your database then please contact GTAC for assistance.
5) Known extractor errors and resolutions
Cause The root cause for this issue was that the database was had corrupted Tool
definition and the extractor could not extractor the incorrect Tool.
Resolution SQL commands were executed to fix the Tool corruption in database.
These SQL commands were very specific to this database that had the
corruption. In most cases where you see such data model corruption issues
please contact GTAC.
NOTE: During the recovery process, if you are planning to use TEM to deploy your template package, here is
a caution.
a. When you launch TEM from the maintenance mode, it can display that the previous deploy had failed and
hence it will attempt to recover from the failed step. TEM can end up in this scenario if your previous
attempt to deploy the template had failed.
b. If you find TEM going into recovery mode and does not provide you an option to select your updated
template package, then perform the below steps…
a. Shutdown TEM.
a. Unzip your updated template package to a temporary location.
b. Copy the following files to TC_ROOT/install/<template-name> folder on the server machine:
i. <template-name>_template.xml
ii. <template-name>_dependency.xml
iii. <template-name>_tcbaseline.xml (if the file exists)
c. Restart TEM and continue.
d. TEM will now pick up your latest templates from TC_ROOT/install/<template-name>.
Once all files and folders are arranged, this first user should synchronize in the entire template project into the SCM.
This will push all source files from the local BMIDE client to the SCM repository as shown in Figure 31.
For systems like ClearCase and Perforce, you would add all source files to the repository. For systems like CVS and
Subversion, go to the Navigator View, select the top level template project folder, right mouse button click and select
Team->Share Project. Follow the SCM user documentation on how to fill out the fields in this wizard. After completing
this step, the template project will be connected to the SCM. Next ―synchronize‖ all files and folders to the repository.
This will push the files and folders to the central repository where others can start downloading them. After the SCM is
synchronized, the SCM will now track the change history of each file as developers change them.
Figure 31
The next step for each developer who wants to contribute to this template is to install their own BMIDE client on their
local machine. Next install the SCM plug-in into the BMIDE to integrate the BMIDE with the SCM. Then download the
BMIDE template project from the SCM to their BMIDE client (see Figure 32). For ClearCase and Perforce, you may
have to launch a separate administrator tool to synchronize or download the latest BMIDE template files from the
repository. This will place the template project directory and all of the files in a directory on your machine.
The next step is to import the downloaded template project into the BMIDE client. Note that each developer should not
create a new template project using the same name as the first developer, nor should they create one with a separate
name. The correct procedure is to import the project. Use the File->Import->Import a Business Modeler IDE Template
wizard to import the template folder from local machine into your BMIDE client. For more information about the import
wizard see the Business Modeler IDE User Guide. For CVS or Subversion users, you can use the CVS Repositories
Figure 32
Once each user has the template project in the BMIDE, they should set the active source file to the file that is
assigned to them. Then they can start to use the BMIDE to add definitions. After each person completes their work,
they should test first by deploying to a local test environment (see Figure 33). Note that the test environment should
not be shared with other developers.
Figure 33
After testing in the individual environment is complete, each user should synchronize their BMIDE template files to the
SCM (see Figure 34). This step will push all changes created by each individual developer‘s BMIDE to the SCM
repository. Additionally synchronization will pull the latest versions of the files from the SCM to the local developer
machine.
After synchronizing each developer‘s environment will have all the latest extensions in their BMIDE. Each developer
can continue with additional rounds of creating new extensions, deploying, testing and then synchronizing with the
SCM again (see Figure 35).
Figure 35
Up to this point, each developer has been testing his own extensions in his own test environment. Once all
development activities are complete, all extensions should be tested together. At this point typically a project leader or
administrator should synchronize the latest code to his own BMIDE client (see Figure 36). Use the Package Wizard to
build a deployment package and then use TEM to deploy this package into an integration testing database.
If integration testing fails, then fix the issues in an individual test environment and synchronize to the repository. The
administrator can synchronize again, to bring in the latest changes, then rebuild the package and deploy again to the
integration environment. If testing in the Integration Environment passes, the tested template package can be
deployed to a QA testing environment for user testing.
Once user testing passes the final template package can be deployed to a production database.
Figure 37
Figure 38
When the developer is finished creating and testing his template extensions, Figure 39 shows that the developer
should synchronize his BMIDE with the SCM. This will push all of his changes to the files to the SCM. Then he should
notify the administrator that the template is ready for deploying to the production database.
Figure 39
After getting the notification from the developer, the administrator should synchronize his BMIDE with the SCM. This
will pull all the file changes from the SCM to the BMIDE as shown in Figure 40. The administrator should Reload the
Data Model and then review the latest configurations in the BMIDE client.
Since the administrator‘s template now includes schema changes that the developer contributed to the template, the
administrator must take down the production server in order for the schema changes to be processed. Use the
Package Wizard to build a deployment package and then use TEM to deploy this package into the production
database. Restart the server and notify the users to log back on.
Figure 41
Follow the convention outlined in section 6.5 about operational data updates, Figure 42 shows that the administrator
can continue to make regular updates to the production server using the BMIDE as long as the template does not
include any schema changes (Classes, Attributes, Business Objects). Because the production server must remain up
and running, the administrator uses the BMIDE with Hot Deploy to deploy the template to the production database.
However, any users currently logged into the system during the deploy will not see the changes until they log out and
log back in again.
While the administrator is making frequent updates to the production database, the development team may wish to
continue adding extensions to the template to prepare it for the next scheduled system downtime. Figure 43 shows
how the developer can continue to add new schema and operational data to support the update to the database. The
developer should use Hot Deploy to test the extensions in his test environment. After the developer finishes testing,
he should synchronize his BMIDE with the SCM. This will allow any other developers who may also be working on the
template, to stay current and pickup the latest changes in the SCM.
Note that during this timeframe, the administrator should not synchronize with the SCM. Because if the administrator
did synchronize, he would pick up schema changes and inadvertently Hot Deploy them to the production server. As
outlined in section 6.5, schema changes should not be deployed to a production server.
Figure 43
Before the next system down time, the administrator should push all of his operation data updates back to the SCM so
that they can be integrated with the latest template extensions added by the development team. Figure 44 shows the
administrator synchronizing his BMIDE with the SCM. This pushes his latest template files into the SCM.
Note that synchronization will synchronize file changes in both directions. That is, the synchronization will push the
latest changes from the administrator‘s BMIDE to the SCM and pull the latest changes from the SCM to the
administrator‘s BMIDE. Since this means that the administrator could potentially pick up schema changes from the
SCM, the administrator should not perform a BMIDE Hot Deploy during this time. He should wait until all of his
extensions are combined with the developers‘ extensions and tested, then take the system down to do a TEM deploy.
To pick up all of the operation data extensions added by the administrator, the developer should synchronize his
BMIDE with the SCM as shown in Figure 45. The developer should reload the data model into the BMIDE and view
the latest extensions added by the administrator to see how they blend with the new extensions added by the
development team. Use Hot Deploy to deploy the combined extensions to the test environment and test.
Figure 45
After the development team completes the integration testing, the developer should synchronize one more time with
the SCM. This will push all the integrated files back to the SCM as shown in Figure 46.
Finally the administrator or any developer should synchronize his BMIDE with the SCM. This will pull all the latest files
that were tested from the SCM to the local BMIDE. Reload the data model and review the configurations. Because the
template includes schema changes, the administrator must take down the production server. Use the Package Wizard
to build a deployment package and then use TEM to deploy this package into the production database. Restart the
server and notify the users to log back on.
Figure 47
Note that the prefix policy listed here will be enforce by the BMIDE client in Teamcenter 8.3.
In the meantime, you can start using the prefix policy if you feel that you want to avoid potential collisions. We have
found that many customers are already prefixing their definitions in the BMIDE. We are not forcing you to prefix at this
time, however, it is available if you want to utilize it.
When choosing a prefix, here is the policy that you must follow:
A prefix must be used on all class names, type names, rule names, LOV names, etc within a single BMIDE
template. A prefix should not be shared across two or more templates.
The prefix must be placed at the beginning of the model element definition name. Example: ―B9Part‖ is
correct. ―PartB9‖ is not correct.
A prefix must contain 2 to 4 characters.
Characters can be a digit, letter, or underscore.
The prefix must have a digit in character position 2, 3, or 4. Digits may not be in the first character position.
The first character of a prefix must always be a capital letter.
The use of the ―0‖ or ―1‖ digit in a prefix is reserved for Siemens PLM Software Templates
rd rd
The use of the ―2‖ or ―3‖ digit in a prefix is reserved for 3 party template development. If you are a 3 party
please contact GTAC to obtain an assigned prefix.
Customers are to use digits ―4‖ through ―9‖ in the prefix.
It is not necessary for a customer to register their prefix with product development. If a customer prefix is the same as
another customer prefix, it is not an issue as long as these two customers never share data models (BMIDE
templates).
Here are some examples of allowable prefixes for a customer
A3
Ab5
A5c
C4
B9
F8_
Using the same prefixes above, here is how the prefixes would be used for a new type name that includes the word
―Part‖.
A3Part
Ab5Part
A5cPart
C4Part
B9Part
F8_Part
X99_Part
Zwt5Part
Additionally here is how the prefixes would be used for a new type name that includes the word ―Document‖.
A3Document
Ab5Document
A5cDocument
C4Document
B9Document
F8_Document
X99_Document
ZwtDocument
Note that it is not necessary that you rename any existing data model definitions to use the prefix. All existing data
model definitions will be grandfathered in and will not require a prefix. The only exception to this rule is when one of
your existing definitions collides with a Teamcenter definition. In that case, you will need to rename the definition. The
new name should include the prefix to ensure that there will be no future collisions.
If you have already been using a prefix with your data model definitions, you may continue to use it as long as it
follows the prefix policy defined in this document. If it does not align, you must alter the prefix to align with this policy.
1. In the BMIDE, create a new relation business object by creating a new Business Object under the
―ImanRelation‖ business object.
a. Go to the Navigator View and select the ImanRelation business object.
b. RMB-> New Business Object
c. In the name field type in the name of your new relation and click Finish.
<Add>
<TcPropertyAttach typeName="ItemRevision">
<TcProperty arrayLength="-1" isArray="true" propMaxStringLength="0"
propName="My_Relation" propTypeName="Relation"
propValueType="PROP_untyped_relation"/>
3. Now that the relation and relation property have been added to data model in your BMIDE, you can configure
other rules such as Compound Property rules to utilize this new relation and property.
4. Deploy your template to the server to add the relation to the database.
5. To allow users to relate objects via this new relation in the rich client, you will need to add or edit two
preferences.
a. For more information about these two preferences and how to use them, see the Preferences and
Environment Variables Reference.
b. In Rich Client, add the following preferences to expose your custom relation as a property on a set of
types. Format: <relation_type>_relation_primary
i. In our example, we want to expose the My_Relation relation business object as a property on
ItemRevision. This would by creating a new preference called
―My_Relation_relation_primary‖. In the Current values field enter ―ItemRevision‖.
6. Now that the relation and runtime property have been added to data model in your BMIDE, you can configure
other rules to utilize this new runtime property.
7. Deploy your template to the server to add your data model changes to the database.
8. Run business_model_updater with the file to update the database. See the Utilities guide for more
information about this command.
Example:
business_model_updater –u=infodba –p=<password> -g=dba –file=my_lov_reorder.xml
–mode=upgrade –update=all –log=log.txt
9. If you want to verify the order without launching a client, you can use the business_model_extractor to extract
the full data model. Run the extractor and then search for your LOV in the file to review the order of the LOV
values. See the Utilities guide for more information about this command.
10. Do not copy the edited XML file or its definitions back into the BMIDE as this XML format will not work in the
BMIDE client. Note that the master copy of the LOV values is still in the BMIDE. Each time you want to make
a change to the LOV order, do it in the BMIDE and repeat the above steps.
The other problem is with current practice of customizing the master forms. Typically when new Item business objects
are created, the new business objects are children of Item and ItemRevision. If say Item called MyItem is created,
MyItem and MyItemRevision are children of Item and ItemRevision. However the Master forms, MyItem Master and
MyItemRevision Master are typically created as siblings to Item Master and ItemRevision Master. In other words they
are not children of current Item Master or Revision master forms, but are siblings. If the form storage classes are also
customized, then the form storage classes on MyItemMaster and MyItemRevision Master are also siblings to the
OOTB storage classes of Item master and Item revision master. See Figure 53. The green arrows indicate that
MyItem and MyItem Revision inherit the behavior of Item and ItemRevision, as they are children. But the behavior or
attributes from parent master forms of Item Master or ItemRevision Master is not picked up by the custom master and
revision master forms. This results in a loss of desired functionality, faulty behavior, and data corruption issues. The
red arrows indicate where the custom classes or form business objects should have actually been children of the Item
master forms to avoid these issues.
10.4.4.1 What about my existing Forms that have already been swapped? Do I need to un-swap
or migrate data?
No.
If you are upgrading to Tc2007.1.5 or later and there are already some COTS forms swapped for form storage
classes, there is no need to do any work on these forms. There is no work needed for the swapped form for upgrade
to be successful. After the upgrade is done, there may be some work needed if the import of the custom template in
BMIDE client throws errors on the swapped forms explained in section 10.4.4.2
4. In the property constants section, notice that the value of constant Visible is equal to true. Click the edit button
and change the Visible to false.
5. For this to take effect the updated template must be deployed and the server should be restarted.
Figure 58
POM_object POM_object
POM_application_object POM_application_object
WorkspaceObject WorkspaceObject
Form M MyCustomFormStorage
POM_object POM_object
POM_application_object POM_application_object
WorkspaceObject MyCustomFormStorage
Form
Form Storage Class
MyCustomForm
Starting from Teamcenter 8.3.0, BMIDE UI has been updated to present an error message when you attempt to
define a new Form type with form storage class as WorkspaceObject or subclasses of WorkspaceObject.
A custom WorkspaceObject Business Object is more efficient than a custom Form. A Form is represented in terms of
two classes: Form class and its Storage class. As a result, retrieving the form properties derived from its storage
2. Correction of Form Storage class on custom Form types: Before starting the upgrade from Teamcenter
Engineering, please inspect your existing Form types to ensure none of the custom Form types has
WorkspaceObject or its subclasses as form storage class. For example, say you have a custom Form named,
POM_object POM_object
POM_application_object POM_application_object
WorkspaceObject
MyNewCustomFormStorage
Form
TEM uses template match tags to determine which templates are required for upgrade. The results of the match are
shown in the Upgrade Database Features panel in Figure 64. These tags are only used by TEM to match templates
that were available in Engineering. Therefore new templates introduced only for Teamcenter unified architecture do
not have template match tags. If you plan to use your BMIDE template to upgrade other Teamcenter Engineering
databases, then read on. Otherwise you may skip this section.
The TEM panel in Figure 64 shows a list of all templates that were available in the Engineering timeframe. Each
template provides two or three template match tags. Each tag tells TEM to search in the database for a specific data
model definition that should be in the database if the template‘s data model had been installed into Teamcenter
Engineering. If all template match tags are found, then the template is a match in the database and the template is
marked for upgrade. If any of the template tags are not matched, then the template is not marked for upgrade.
Typically the template match tags are used to look for a class or type definition since these are the most common
extensions in any given template. However, other data model definitions can be used as long as they are unique to
your template and are not also defined in another template.
Warning: Do not attempt to edit another template‘s template match tags. These tags are selected for a specific reason
by the owners of the template. If you believe that you have installed a template into Engineering that TEM is not
matching please contact GTAC for assistance. Altering the tags will cause issues with the upgrade and extraction of
custom data model definitions to the BMIDE.
Not only are template match tags used by all of the templates delivered by Siemens PLM Software and our partners,
the template match tags can also be used by customers. The following is a list of reasons why you should use
Note that all data model definitions when loaded into a database are stored as an instance of a class. For example,
every Class that is added to a database is stored as an instance of the POM_class class (in addition to the fact that it
also adds its own table in the database). Every Type that is added to a database is stored as an instance of the
ImanType class. Therefore when we build template match tags we want to see if the database table for Classes
(POM_class) has a class by a given name. Or see if the data table for Types (ImanType) has a type by a given name.
Here is the format for template match tags. We need three things:
The class name that stores the data model definition (database table)
The attribute name that stores the name of the definition (database table column)
The value of the attribute
Template match tags are written into the feature.xml file in the following format. Note that there are no spaces directly
before or after the comma; however it is okay to have a space inside the value field if the value has a space in it. Also
If your template added two classes, here is what the template match tags would look like.
<property name="template_match_1" value="POM_class,name,ClassA"/>
<property name="template_match_2" value="POM_class,name,ClassB"/>
In this example, the first field is ―POM_class‖ and this is the name of a database class (database table) that stores
Teamcenter class definitions. The second field ―name‖ is thge attribute name (database table column) of the
―POM_class‖ (table) that stores the name of the class. ―ClassA‖ and ―ClassB‖ are Teamcenter class names and each
of these two values should be found as a value of one of the instances of the specified database table and column.
Let us try another one. If your template added two types TypeA and TypeB, here is what the template match tags
would look like.
<property name="template_match_1" value="ImanType,type_name,TypeA"/>
<property name="template_match_2" value="ImanType,type_name,TypeB"/>
Where ―ImanType‖ is the database class that holds type definitions. ―type_name‖ is the attribute name (database table
column) that stores the type names. And TypeA and TypeB are two values that should be found in this table and
column.
To match Dataset type definitions DatasetName1 and DatasetName2, use the following format
<property name="template_match_1" value="WorkspaceObject,object_name,DatasetName1"/>
<property name="template_match_2" value="WorkspaceObject,object_name,DatasetName2"/>
Note that the above two match tags use the WorkspaceObject class and object_name attribute to match because the
dataset type definitions are stored in the Dataset class which is a subclass of WorkspaceObject. The dataset name is
an attribute that is defined on the WorkspaceObject class (not defined on Dataset class). Since these template match
tags use a SQL query to find the match, we have to specify the exact table that has the instance. Therefore we use
WorkspaceObject for the first field.
You can also use a combination of classes and types or other data model objects:
<property name="template_match_1" value="POM_class,name,ClassA"/>
<property name="template_match_2" value="ImanType,type_name,TypeB"/>
<property name="template_match_3" value="ListOfValues,lov_name,LOV1"/>
Your feature file does not have any template match tags by default; therefore, you must add them. They also must be
added in the proper section of your feature.xml file. To add them, launch the BMIDE and go to the Navigator view.
Find and double-click your feature_<template_name>.xml file. This will open the file into an editor. Find the section in
the file that has the following line:
<property name="template_file" value="${template_name}_template.xml"/>
Then add your template match tags immediately after it as shown in Figure 65 at the bottom.
You should test your template match tags to ensure that they work correctly. Use the Package wizard to generate
your template package and then use your template package to upgrade a test Teamcenter Engineering database that
includes your solution. The testing should include each version of your add-on solution with each version of
Teamcenter Engineering that is currently supported by your solution (V913, V10, V10 SR1).
During testing, when TEM displays the Upgrade Database Features (Figure 64) panel, you will need to click on the
Browse button to locate your template‘s feature.xml file. Once TEM locates it, TEM will read the template match tags
in the feature.xml file. If all template match tags match, TEM will display your template in a new row in the table and
mark it for upgrade. If TEM does not match all of your tags, then TEM will display a message saying that the template
was not installed in the database. If this happens, carefully review your template match tags and ensure that they are
accurate or check that the database has the data model definitions that you are trying to match. Perhaps these data
model definitions were optional instead of required.
First you may have custom tools, custom references, and custom tool actions were merged (blended) into the
COTS tools, references, and tool actions. This will leave the Dataset definition with two sets references, View
Tools and Edit Tools. Users may be asked to choose between the two tools each time they open or edit the
dataset.
o If you feel that you would like to remove your custom tools, references, and tool actions, and go with
the COTS tools, references, and tool actions, you can follow the steps in section 17.3.
Second, if you plan to use this BMIDE template to upgrade other database sites from Engineering to
Teamcenter unified architecture, you will need to clean up your baseline.xml file.
o Open up your <Project>/<template_name>_tcbaseline.xml
o Search and remove any of the following types of XML tags that include a reference to your merged
dataset name. The following examples demonstrate various Dataset and Business rule XML tags that
can occur in your file that could include the merged type name. If any of these are found to use your
merged type name, then remove the XML tag. The examples below demonstrate a ―PDF‖ dataset
merge. Note do not clean up these definitions from your custom template source files; you should
only cleanup your baseline.xml file.
TcDatasetReferenceAttach
<TcDatasetReferenceAttach datasetType="PDF">
<TcDatasetReference name="PDF">
<TcDatasetReferenceInfo template="*.pdf" format="BINARY"/>
</TcDatasetReference>
TcDatasetToolActionAttach
TcDatasetToolAttach
<TcDatasetToolAttach datasetType="PDF">
<TcDSEditTool name="Adobe"/>
</TcDatasetToolAttach>
TcDeepCopyRule
TcExtension
TcCompoundPropertyRule
<TcCompoundPropertyRule destPropertyName="work_remaining"
destTypeName="ScheduleTask" isReadOnly="false"
pathToSource="REF(exec_form_info,PDF).work_remaining"
sourcePropertyName="work_remaining"
sourceTypeName="TaskExecutionFormInfo"/>
<TcPropertyConstantAttach constantName="Modifiable"
propertyName="comments"
typeName="PDF" value="Write"/>
TcGRMRule
TcNamingRuleAttach
POM_object POM_object
POM_application_object POM_application_object
WorkspaceObject
MyNewCustomFormStorage
Form
The following checklist should be followed if you see an error in the BMIDE Console View:
1) Did the error occur right after synchronizing the custom template project in the BMIDE client with a Source
Control Management (SCM) system? If yes, then the issue may be related to a file merge where the changes
between two users were merged incorrectly. Or two users added the same definition or conflicting definitions.
Work with the two developers who submitted the changes to correct the XML file.
2) Did the error occur while upgrading the custom template project in the BMIDE client? If yes, this means that
something new was added to one of latest dependent templates that conflicts with one of the custom
definitions in your BMIDE template. These issues fall into two groups:
A type name collision is where a new type or class definition has been added to one of the dependent
templates and you also have the same type or class name in your custom template. Since
Teamcenter cannot support two types or classes with the same name, your custom type will have to
be fixed.
A type name collision error message would look like this in the BMIDE Console View.
----------------------------------------------------------------
Model Error: file.xml Line:8 Column:16 A Business Object is already
defined with the name "PDF". Choose another name.
----------------------------------------------------------------
A class name collision would look like this in the BMIDE Console View.
----------------------------------------------------------------
Model Error: file.xml Line:11 Column:57 A Class is already defined with
the name "MyClass". Choose another name.
----------------------------------------------------------------
b. Other issues:
An LOV is already defined with the name "User Names". Choose another name.
13.2.1 Remove the colliding Dataset type definition from the custom template
In the following steps, we will show you how to manually remove the custom dataset definition from the template
source file. Then we will show you how to validate the custom template data model to ensure that you performed the
edit correctly.
1. Launch Business Modeler IDE with your customer project.
2. Go to the ―Navigator‖ view.
3. Locate the extension file under <project>/extensions folder containing the colliding dataset definition.
4. Open the extension file in a Text editor within Business Modeler IDE.
5. Make a backup copy of the colliding customer dataset definition into a temporary file. A sample dataset definition
is shown below.
<TcDataset typeName="PDF" parentTypeName="Dataset" typeClassName="Dataset">
<TcDSViewTool name="CustomPDFTool"/>
<TcDSEditTool name="CustomPDFTool"/>
<TcDatasetReference name="CustomPDF_Reference1">
<TcDatasetReferenceInfo template="*.pdf" format="BINARY"/>
</TcDatasetReference>
<TcDatasetReference name="CustomPDF_Reference2">
<TcDatasetReferenceInfo template="*.pdf" format="BINARY"/>
</TcDatasetReference>
6. Manually remove the conflicting customer dataset definition from the project‘s extension file.
7. Save the XML file.
8. In the ―Navigator‖ view, select your template project icon, right click and choose ―Reload Data Model‖.
9. The customer project should now successfully load and the Console view should not report any errors.
10. Optional Step. If you think that the view and edit tools used in your removed dataset definition are also not
required anymore, then you can use the Business Modeler IDE UI to remove the tools.
a. For example, in the above XML sample, the same tool called ―CustomPDFTool‖ is used for both viewing
and editing the PDF dataset, but it is not used for any other Dataset.
b. Go to the Extension View in the BMIDE, find the tool called ―CustomPDFTool‖.
c. Right Click and select ―Delete‖ to delete the custom tool.
d. Save the data model through File->Save Data Model.
<TcDatasets>
<TcDataset name="DatasetName">
5. To construct the contents of the FixCollidingDatasetInfo.xml, you should refer to the custom and COTS
dataset definitions. Below are examples of the custom and COTS dataset definition. By reading the XML
definition from the BMIDE templates, you will be able to determine how to fill out the fields. Below the import
sections of the BMIDE dataset definitions are marked in bold lettering.
a. The following is an example of a custom PDF dataset definition taken from the backup information
created in a previous step.
<TcDataset typeName="PDF" parentTypeName="Dataset" typeClassName="Dataset">
<TcDSViewTool name="CustomPDFTool"/>
<TcDSEditTool name="CustomPDFTool"/>
<TcDatasetReference name="CustomPDF_Reference1">
<TcDatasetReferenceInfo template="*.pdf" format="BINARY"/>
</TcDatasetReference>
<TcDatasetReference name="CustomPDF_Reference2">
<TcDatasetReferenceInfo template="*.pdf" format="BINARY"/>
</TcDatasetReference>
…
</TcDataset>
b. The following is an example of the COTS PDF dataset definition found in the foundation_template.xml
file.
<TcDataset parentTypeName="Dataset" typeClassName="Dataset" typeName="PDF">
<TcDSViewTool name="PDF_Tool"/>
<TcDSEditTool name="PDF_Tool"/>
<TcDatasetReference name="PDF_Reference">
<TcDatasetReferenceInfo format="BINARY" template="*.pdf"/>
</TcDatasetReference>
…
</TcDataset>
6. Based on the custom and COTS dataset definitions, the resulting FixCollidingDatasetInfo.xml file should
appears as follows.
a. This file will convert all instances of ―PDF‖ that use the ―CustomPDFTool‖ tool to use the ―PDF_Tool‖
tool.
b. This file will convert all instances of ―PDF‖ that use the ―CustomPDF_Reference1‖ reference to use
the ―PDF_Reference‖ reference.
c. This file will convert all instances of ―PDF‖ that use the ―CustomPDF_Reference2‖ reference to use
the ―PDF_Reference‖ reference.
<TcDatasets>
<TcDataset name="PDF">
7. Next you must add a command inside your templates‘ upgrade script. This command will be executed during
an upgrade when your template is applied to the database through TEM.
a. Open the file <project>/install/upgrade_<template>_v2007.default.
b. Add the command ―change_datasets‖ in the section <post-non-schema-change> to update all the
dataset instances in the database.
c. Below is an example of the section comments and section tags. The text in bold is the text that you
should add to this file.
#..............................................................................
# SECTION: Post Non-Schema Changes
#..............................................................................
# Use this section to add any commands that should migrate data after
# the BMIDE tools have changed any existing Business Objects, Business Rules, LOVs,
# Change objects, Validation Data, Tools, etc.
#..............................................................................
<post-non-schema-change>
change_datasets -u=infodba -p=${TC_USER_PASSWD} -g=dba
-ds_info=${TC_INSTALL_DIR}/${template_name}/FixCollidingDatasetInfo.xml
</post-non-schema-change>
c. If this is the case, go to the Access Manager application and add the follow rule. Then move the rule
up in the tree just below the ―Has Bypass‖ rule.
Condition = ―Is SA‖
Value = ―true‖
ACL Name = ―Bypass‖
d. After executing the upgrade, remove this rule from the Access Manager.
14.5 How do I upgrade multiple database sites that all use the same set of data
model extensions?
Question: A customer has Teamcenter Engineering installed in multiple data base sites. Each data base site has the
exact same data model extensions and behaviors. What process should I follow for upgrading?
Answer: Since each site has the exact same data model extensions only one custom BMIDE template will need to be
created. There are two options to accomplish this.
Option 1: You could do the upgrade at each site simultaneously. Run the TEM upgrade to upgrade each site. This will
upgrade the database, extract out the custom template. Import the template into the BMIDE at one site only and
maintain it there. Distribute updates to the BMIDE template to the other sites from the main site.
Option 2: Or you could upgrade one site first. Run the TEM to upgrade this site. Execute the post upgrade steps for
extracting the custom template. Import the template into a BMIDE client.
Commentary: Many customers with multiple sites believe that all sites have the same data model extensions. Often
times we have found that in fact each database could have some minor differences between each site. This scenario
described above will only work if you are certain that the sites are all exactly the same. If they are not, then you should
consider section 14.6 or section 14.7.
14.6 How do I upgrade multiple database sites that all use a different set of data
model extensions?
Question: A customer has Teamcenter Engineering installed in multiple data base sites. Each data base site has a
uniquely different set of data model extensions and behaviors. What process should I follow for upgrading?
Commentary: It is not likely that all sites within a company have completely independent data models. However this
scenario was given to demonstrate that you could separate management of the data model this way. The down side
of this configuration is that if there are any common definitions that all sites share, these common definitions would
have to be maintained at each site and someone would need to ensure they are synchronous. Since this scenario is
not very likely to happen, it might be more likely that each site shares some common definitions and also has some
additional extensions beyond the common ones. If this is the case, see scenario 14.7.
14.7 How do I upgrade multiple database sites that all use a similar set of data
model extensions?
Question: A customer has Teamcenter Engineering installed in multiple data base sites. Each data base site shares a
similar set of common data model extensions and behaviors. Each site may also have some additional extensions
beyond the common site that are specific to the site‘s requirements. What process should I follow for upgrading?
Since you will be using this template to upgrade other Engineering sites, you will need to add template match tags.
See section 11.2. After adding the template match tags, use the Package wizard to generate the BMIDE template
package and distribute this common template package to the other sites for use with upgrade.
During an upgrade each site administrator should use TEM to include the common custom template package you
distributed. Use the Browse button on the Upgrade Database Features page (Figure 64) to locate the common
From this point forward the common data model definitions should be maintain and distributed to the other sites from
a single site administrator. Each of the other sites should maintain their own templates and install them only into their
own database site.
Commentary: For customers with multiple database sites, this is probably the most common scenario. Maintaining a
common set of definitions at one site reduces work and maintenance costs and ensures consistency at all other sites.
14.8 How can I tell if my sites have the same or different data models?
Question: A customer has Teamcenter Engineering installed in multiple data base sites. Each data base site is
supposed to have the same data model; however, the administrators are not certain. How can I tell if my sites have
the same or different data models?
Answer: There is no way in Teamcenter Engineering to determine this. Some people have asked can the
―database_verify‖ utility could be used. This utility only compares schema, types, tools, release status, and unit of
measures between two databases. It does not compare the many other definitions that the BMIDE manages like
Naming Rules, Deep Copy Rules, LOVs, Constants, etc. Therefore it will not provide a complete picture of everything
that can be extracted into a BMIDE template.
Only Teamcenter unified architecture has the tools for comparing data models. Therefore to do this, you must perform
a test upgrade on each site and compare the extracted templates. Once each site template has been extracted you
can either compare these files manually or by using BMIDE command line tools.
Answer: After the upgrade, use the BMIDE extractor command line tool to extract the entire data model from a given
database site. Example output file -> site1model.xml
business_model_extractor –u=infodba –p=<infodba password> -g=dba –outfile=C:\site1model.xml –
log=C:\site1db.log
Next upgrade another database and use the BMIDE extractor command line tool to extract the entire data model from
this database. Example output file -> site2model.xml
business_model_extractor –u=infodba –p=<infodba password> -g=dba –outfile=C:\site2model.xml –
log=C:\site1db.log
Next use the BMIDE comparator tool to compare the two model files.
bmide_comparator -all –old= C:\site1model.xml –new=C:\site2model.xml –delta= C:\site1_site2_delta.xml –log=
C:\site1_site2_delta.log
The output file from the compare tool will list in XML format the additions, deletions, and changes between the two
files. If the delta file is empty, then there are no differences between the two sites. If the delta file is not empty, each
tag must be interpreted as follows.
An <Add> tag indicates that all the elements within the <Add></Add> tags exist in the ―new‖ model but do not exist in
the ―old‖ model.
14.11 Can I use the template created from my test environment upgrade for a
production upgrade?
In this question the person is asking, can I take a test environment where I loaded the same data model from my
production environment, and then upgrade my test environment to extract out the custom template. Then when it is
time to do the real upgrade on the production environment, can I use that template that I extracted from the test
environment, to upgrade my product environment?
This will work successfully if the data model, rules, etc are exactly the same in both the test environment and the
production environment. Any minor difference will result in differences in the extracted template that is used for the
upgrade. It is very hard to be sure that both environments are the same. The databases must be at the same patch
levels, and have the same configuration settings for preferences, etc. Note that some preferences cause changes in
the data model with respect to runtime properties and relation properties. You must also ensure that all data model
scripts, utilities, programs were loaded into the test database.
The best way to achieve this is to dump the production database and load it into a test database. Then do the
upgrade to extract out the custom template. Then use that template to upgrade the actual production database. Note
this will work as long as you ensure that no one makes any data model or behavior changes to the production
database between the time that you dumped the database and when it is finally upgraded.
Some of the definitions within your BMIDE template will refer to non-BMIDE objects in the database; therefore you will
want to ensure that both are loaded whereever your template is loaded. For example, transfer modes are used to
configure ―AppInterface‖ business objects. Since the BMIDE takes care of loading the AppInterface definitions, then
you will need commands in the install and upgrade scripts to ensure that the transfer model definitions are loaded
before the AppInteface definitions are loaded.
Likewise, process templates are used to configure the Change definitions. If you have Change objects that use
process templates then you need commands in the install and upgrade scripts to ensure that the process templates
are loaded before the change management objects are loaded from the BMIDE XML.
To accommodate this type of synchronization between loading BMIDE and non-BMIDE objects, both the install and
upgrade scripts are partitioned into sections. As the install or upgrade progresses, TEM will load parts of the data
model from the BMIDE template and then give the install or upgrade script a chance to load its own data.
# _____________________________________________________________________________
# SECTION: Schema Additions
# _____________________________________________________________________________
# THIS SECTION IS RESERVED for the BMIDE tools to add new Classes and Attributes.
# Do Not add any utilities commands in this section.
# _____________________________________________________________________________
business_model_updater -u=infodba -p=${TC_USER_PASSWD} -g=dba -update=schema -mode=upgrade -
file=${TC_DATA_MODEL}/delta.xml
install -regen_schema_file infodba ${TC_USER_PASSWD} dba
# ..............................................................................
# SECTION: Utilities
# _____________________________________________________________________________
# SECTION: Non-Schema Additions
# _____________________________________________________________________________
# THIS SECTION IS RESERVED for the BMIDE tools to install the Business Objects,
# Business Rules, LOVs, Options, etc. which are managed by BMIDE.
# Do Not add any utilities commands in this section.
# _____________________________________________________________________________
business_model_updater -u=infodba -p=${TC_USER_PASSWD} -g=dba -update=non_schema -mode=upgrade -
file=${TC_DATA_MODEL}/delta.xml
# ..............................................................................
# SECTION: Utilities - Post BMIDE
# ..............................................................................
# Use this section if your solution needs to install any solution objects
# that must be installed after the BMIDE tools install
# Business Objects (Items, Datasets, Forms, Item Element, App Interface, IntDataCapture),
# Business Rules, LOVs, Change Objects, Validation Data, Tools.
# ..............................................................................
# _____________________________________________________________________________
# SECTION: Database Finalization
# _____________________________________________________________________________
# THIS SECTION IS RESERVED for those commands that finish up the
# install.
--------------------------------------------------------------------------------------------
By default, each upgrade script is partitioned into sections and each section is initially empty. You can add your
commands between the section tags. During upgrade, TEM upgrades your data model in partitions, working on
schema first, and then non-schema next. Between each section, TEM calls the commands in your upgrade script
section if any are present. Below is a sample file.
--------------------------------------------------------------------------------------------
# upgrade_customer_v1000.default:
#
# This software and related documentation are proprietary to Siemens PLM Software.
# COPYRIGHT 2007 Siemens PLM Software. ALL RIGHTS RESERVED
#
#
#______________________________________________________________________________
#..............................................................................
# SECTION: Pre Schema Additions
#..............................................................................
# Use this section to add any commands that should migrate data before
# the BMIDE tools have added the new classes and attributes.
#..............................................................................
<pre-schema-add>
</pre-schema-add>
#..............................................................................
# SECTION: Post Schema Additions
#..............................................................................
# Use this section to add any commands that should migrate data after
# the BMIDE tools have added the new classes and attributes, but before
# the BMIDE tools modify or delete any existing classes and attributes.
#..............................................................................
<post-schema-add>
</post-schema-add>
#..............................................................................
# SECTION: Post Schema Changes
#..............................................................................
# Use this section to add any commands that should migrate data after the
# the BMIDE tools have changed any existing classes and attributes,
# but before the BMIDE tools deletes any existing classes and attributes
</post-schema-change>
#..............................................................................
# SECTION: Pre Non-Schema Additions
#..............................................................................
# Use this section to add any commands that should migrate data after
# the BMIDE tools have added the main Business Objects and BMF Rules
#
# Use this section if your solution needs to install any Workflow templates,
# Transfer Modes, or any other data that must be installed before the BMIDE tools install
# Business Objects (Items, Datasets, Forms, Item Element, App Interface, IntDataCapture),
# Business Rules, LOVs, Change Objects, Validation Data, Tools.
#..............................................................................
<pre-non-schema-add>
</pre-non-schema-add>
#..............................................................................
# SECTION: Post Non-Schema Additions
#..............................................................................
# Use this section to add any commands that should migrate data after the
# the BMIDE tools have added the Business Objects, Business Rules, LOVs,
# Change objects, Validation Data, Tools, etc.
#..............................................................................
<post-non-schema-add>
</post-non-schema-add>
</post-non-schema-change>
#..............................................................................
# SECTION: Post Non-Schema Deletions
#..............................................................................
# Use this section to add any commands that should migrate data after the
# the BMIDE tools have deleted any existing Business Objects, Business Rules, LOVs,
# Change objects, Validation Data, Tools, etc.
#..............................................................................
<post-non-schema-delete>
</post-non-schema-delete>
#..............................................................................
# SECTION: Post Schema Deletions
#..............................................................................
# Use this section to add any commands that should migrate data after the
# the BMIDE tools have added/changed/deleted Business Objects, Business Rules, LOVs,
# Change objects, Validation Data, Tools, etc.
#..............................................................................
<post-schema-delete>
</post-schema-delete>
--------------------------------------------------------------------------------------------
Whenever you add utilities, they must go between the specific opening and closing tags. Any commands outside
these tags are not executed.
Also, do not alter the tags in any way. The TEM upgrade runner looks specifically for these tags and does not
recognize any new ones or tags by another name or spelling.
15.5 Does your add-on solution need to support both Teamcenter Engineering and
Teamcenter unified architecture?
For most customers, once you have upgraded your database to Teamcenter unified architecture, your data model and
behaviors will be managed in the BMIDE from that point moving forward. However there are some cases where an
There are two action items that you may have to take with respect to your BMIDE templates. Please continue to read
and follow the actions if the scenarios below apply to you.
Action Item 1:
If you upgraded your database from Teamcenter Engineering to any release of Teamcenter unified architecture, you
may notice the presence of some type definitions in your custom BMIDE template that you did not know that you
owned.
Action Item 2:
If you upgraded your database from Engineering to one of the following releases (Tc2007.1.0, Tc2007.1.1,
Tc2007.1.2, or Tc2007.1.3), please read this section.
Your custom BMIDE template will most likely have some or all of the 69 reinstated classes and types and 4 deleted
types and classes. This is because the upgrade process required you to extract out a custom template using the
―post_bmideupgradetotc‖ utility. Since these classes and types existed in your database, yet none of these had any
XML representation in the foundation template, the utility pulled them into your template because it thought that you
owned them. There is no harm with this. The BMIDE and Teamcenter will work correctly. If you plan to continue using
one of these releases of Teamcenter (Tc2007.1.0, Tc2007.1.1, Tc2007.1.2, or Tc2007.1.3) please do not try to
remove these XML definitions from your custom template. You will fix these once you move to a later release as listed
below.
When you upgrade this database to the next version of Teamcenter Tc2007.1.4 or beyond, these reinstated classes
and types (listed below) will have XML representation in the foundation template. Since both your custom template
and the foundation template have the same definitions, these names will collide. Typically you will see these collisions
occur during an upgrade, when installing a new feature into the server using TEM, or when using the BMIDE. To fix
this, you will need to remove these definitions manually from the XML source files in your custom BMIDE template.
The directions for how to remove these are listed below.
Likewise some or all of the deleted classes and types (listed below) will need to have their XML definitions removed
from your custom template. The directions for how to remove these are listed below.
Below is a list of all the XML definitions that you should remove from your XML source files. Please carefully remove
them. Since there are so many, the easiest way to remove them is to perform the following steps:
Reinstated Types and Classes Cleanup
Install the new version of the BMIDE client and the COTS templates that you require from the latest release
kit. For example if you are upgrading Tc2007.1 MP4 then install the Tc2007.1 MP4 BMIDE client and
templates.
Import the older BMIDE custom template project into the new BMIDE client.
During the import the custom data model will be validated against the new COTS template definitions. During
this time any collisions will be shown in the Console View in the BMIDE client. A collision in the BMIDE for a
class or type would look something like this below:
o Model Error: business_objects.xml Line:19 Column:57 A Class is already
defined with the name "POM_index". Choose another name.
o Model Error: business_objects.xml Line:45 Column:111 A Business Object is
already defined with the name "CORCoreDList". Choose another name.
For each collision shown in the Console View, first check to see if the colliding definition is in the list of
reinstated types below. Note that name collisions can occur for other reasons, such as defining a custom type
that has the same name as a COTS type. These kinds of collisions that you created must be fixed in a
different manner. If the collision listed in the Console View matches one of the definitions listed below, then
manually remove the XML definition from your source file.
Note that not all the XML definitions listed below will appear in your template. You may have none, or some
combination, or all.
When finished with removing all collisions, do a ―Reload Data Model‖ in the BMIDE client. This command will
reload the custom data model and validate it against the COTS template data model.
17.3 How to remove custom tools, references, and tool actions from a COTS
Dataset
This section covers how to remove any custom tools, references, and tool actions added by your BMIDE template to a
COTS Dataset definition.
This situation can occur through several scenarios:
It is permissible in the BMIDE to extend a COTS dataset by adding additional custom view tools, edit tools,
references, and tool actions.
During an upgrade from Teamcenter Engineering to Teamcenter unified architecture, you had defined some
custom Datasets who names collided with a COTS Dataset definition. If you had run the Type Analysis Tool
on the Engineering database before upgrading, the generated report would have advised you of this situation.
If you chose to allow your custom dataset to be merged with the COTS dataset during the upgrade, then you
would have ended up with a merged dataset. This will commonly occur with PDF and Zip Datasets.
During an upgrade from Teamcenter unified architecture to Teamcenter unified architecture, you found that
one of your custom Dataset definitions collided with a new COTS Dataset with the same name. Following the
upgrade instructions for handling type name collisions, you chose to merge your dataset definition with the
COTS definition. This will commonly occur with PDF and Zip Datasets.
If any of these three scenarios occurred, it will not cause any issues for your database. However, you can remove the
custom tools, references, and tool actions from the COTS dataset. One reason for wanting to remove the custom
extensions is that if there are two sets of View Tools and Edit Tools, users will be asked to choose between the two
tools each time they open or edit the dataset in a client.
5. In the Dataset editor click on the ―Dataset Properties‖ tab (see below).
a. Review the Tools for Edit and Tools for View. Note the ones which are COTS and custom.
b. For any tool that you want to remove, write down the name of the tool so it can be used in a later
step. In the example below, the custom tool name is ―Adobe‖.
c. Additionally write down the name of the COTS tool. In the example below the COTS tool is
―PDF_Tool‖.
d. Select the tool to remove and click the ―Remove‖ button. The custom tool should be removed from
the list of tools.
e. Go to File->Save Data Model to save the changes to the template source files.
<TcDatasetReferenceAttach datasetType="PDF">
<TcDatasetReference name="PDF">
<TcDatasetReferenceInfo template="*.pdf" format="BINARY"/>
</TcDatasetReference>
</TcDatasetReferenceAttach>
iii. After removing the XML definition save the XML file.
iv. Go to the Navigator View; select the Project icon, right-click -> Reload Data Model. This will
validate that the manual changes to the XML file are correct. If there are issues these errors
will appear in the Console view. If there are errors, fix the XML file and reload the data model
again. Repeat until there are no errors remaining.
<TcDatasets>
<TcDataset name="DatasetName">
<TcTool fromName="OldToolName" toName="NewToolName"/>
<TcDatasetReferences>
<TcDatasetReference fromName="OldReferenceName1" toName="NewReferenceName1"/>
<TcDatasetReference fromName="OldReferenceName2" toName="NewReferenceName2"/>
</TcDatasetReferences>
</TcDataset>
</TcDatasets>
8. To construct the contents of the FixCollidingDatasetInfo.xml, you should refer back to the names of the tools
and references that you wrote down from the previous steps. Based on the example that we have provided,
the resulting file would be shown below.
a. The configuration file below states that we will be converting any ―PDF‖ Dataset instances that use
the ―Adobe‖ tool to the ―PDF_Tool‖.
b. And will convert any ―PDF‖ Dataset instances that use the ―PDF‖ reference name to the
―PDF_Reference‖ name.
9. Open up a Teamcenter command line prompt and execute the clearlocks command to ensure there are no
others users logged onto the system
10. In the command prompt execute the following command:
11. You should view the log file ―%temp%/ChangeDatasetInfo_<timestamp>.log‖ to ensure that there are no
errors.
a. If there are errors, then look at the log files named ―TC_ROOT/logs/change_dataset*.syslog‖ to
understand the reason for failure.
b. One of the common reasons for the utility to fail is if the Teamcenter DBA user (say infodba) does not
have sufficient privileges to update dataset instances created by other users. The error message for
this is shown below.
c. If this is the case, go to the Access Manager application and add the follow rule. Then move the rule
up in the tree just below the ―Has Bypass‖ rule.
Condition = ―Is SA‖
Value = ―true‖
ACL Name = ―Bypass‖
d. After executing the utility, remove this rule from the Access Manager.
12. Note that if you want this utility to be automatically run, so that it cleans up a database during an upgrade, you
should also add the ―change_datasets‖ command listed above and the corresponding XML file to your custom
template project in the BMIDE. See section 13.2.2 for more details about how to add this command and XML
file to the upgrade script(s) for your template.
13. Package the BMIDE template using the “Package Template Extensions” wizard in the BMIDE.
14. Use TEM to deploy the packaged template to the database from the previous step. This will correct the data
model definitions for the Dataset in the database.
15. After the upgrade completes, you may want to validate that the instances of the dataset were corrected by
following section 13.2.3.
17.4 How to remove COTS elements causing data model errors from custom BMIDE
template
This section is applicable only if you are upgrading your custom BMIDE template in the BMIDE client to Teamcenter
2007.1.4 (or later) release and are seeing data model errors when upgrading the custom template.
Note: These instructions should not be used to remove any other element that is causing data model errors in the
BMIDE client. Please contact GTAC for help with such issues.
17.5 How to add Smart Folder capability to Teamcenter without having to install the
CPG Template
Smart folders provide a mechanism for configuring arbitrary subdivisions of data within a project or program
based on functional and sub functional units. Smart folders are pseudo folders configured in a hierarchical
structure; they are not physical folder objects in Teamcenter.
Capability to add/show smart folders in Teamcenter Project is now available without CPG.
This is not applicable if you have ―Packaging and Artwork‖ template deployed in your database as it‘s
already have this constant defined.
Assumption: You must have working setup of Business Modeler IDE which contains loaded
custom template.
Step 1 : How to manually edit/add global constant-
Go to the Navigator view, open the extension file (example - default.xml)
Add the XML into the file between the <Add> tags as shown below
<Add>
<TcGlobalConstant name="DefaultProjectSmartFolders"
dataType="String" defaultValue=""
description="DefaultProjectSmartFolders" isMultiValued="false"
isValueAttachmentSecured="false"
allowOpsDataUpdate="false" allowOpsDataUpdateOverride="false"/>
</Add>
Save and close the file
Reload Data Model
o Click on ―New LOV…‖ menu option on RMB it will open a new wizard to
create LOV.
o In wizard fill the required values.
o Click on ―Add‖ button to add your Business Object Names.
o In Value filed enter the name of LOV created above (i.e. T2LOV).
<TcGlobalConstantAttach constantName="DefaultProjectSmartFolders"
value="Default Project Smart Folders" />
17.5.2.1 You already have global constant DefaultProjectSmartFolders defined in your custom
template
In a case your template already has definition of DefaultProjectSmartFolders constant you will get error
during process of template migration for duplicate constant definition. You need to remove this from
custom template to avoid any conflict.
Go to the Navigator view, find the source file where you have DefaultProjectSmartFolders
defined
Double click to open it
Delete Global Constant and its attachment-
<TcGlobalConstant name="DefaultProjectSmartFolders" dataType="String"
defaultValue=""
description="DefaultProjectSmartFolders" isMultiValued="false"
isValueAttachmentSecured="false"
allowOpsDataUpdate="false" allowOpsDataUpdateOverride="false"/>
You need to delete TcGlobalConstantAttach and TcLOV as well from extension file (where
this attachment was defined), delete below-
<TcGlobalConstantAttach constantName="DefaultProjectSmartFolders"
value="Default Project Smart Folders"/>
After successful upgrade to Teamcenter 10.1, please refer section 1.1.2 of this document to add your
custom LOVs and override the DefaultProjectSmartFolder global constant again.
If you have multiple custom templates, you need to clean up the DefaultProjectSmartFolders global
constant definition and attachments from all those templates. For instructions please refer section 2.1.
The intention of renaming a template is to change the internal name of your template. Let‘s ensure you understand
what this means. Every template has a ―Template name‖ and ―Template display name‖. For example in the Figure 67
the ―Template name‖ is ―seplanning‖ and the ―Template display name‖ is ―SE Planning‖.
The ―Template name‖ is an internal unique name for your template. This name is used by BMIDE and its utilities for
various reasons like in creation of your template package for installation and distribution, registering your template in
the database, templates that dependent on your template refers to it by this internal name. The reason for this
behavior is because we do not expect the internal name of a template to change. The ―Template display name‖ on the
other hand is what is visible to users during TEM installation, update and upgrade and can be changed at any time to
suite your business needs.
The process described in this section is to help you change the ―Template name‖ field entry which is currently
disabled in the BMIDE.
An alternative to changing the ―Template name‖ is to just change the ―Template display name‖. It is easy to change
the ―Template display name‖ for your template without incurring an overhead of testing and validation. If you intend to
change the ―Template display name‖ then you can do the following –
1) Open your project in BMIDE
If your business needs require you to change the ―Template name‖ then you must exercise caution while renaming
your template. Here is the list of cautionary items-
There is no automated support to rename a template. It is a manual process.
Renaming a template will require system downtime.
After you rename your template in BMIDE, you must update the template name in all your Developer
Environments, Integration Test Environments, Production Environments, User Acceptance Testing
Environments, etc.
You must also update other templates that you own and are dependent on the template being
renamed.
You must share your renamed template package with your partners who have installed your template
and request them to update their Developer Environments, Integration Test Environments, Production
Environments, User Acceptance Testing Environments, etc.
If your partners have created additional templates that are dependent on your renamed template,
then you must inform them to update all such templates to use the new name of your template.
If you have shared your template with partners then do not include new data model in your renamed
template. Ensure that the data model contents of your renamed template matches with the one that
was previously distributed to your partners. It is not wise to distribute a template that is both renamed
and has new data model changes. Since renaming is a manual process, including new data model
changes in a renamed template increases the debugging complexity if we encounter issue with
deploying your renamed template.
If you have shared your template with partners, then the renamed template that you distribute must
be in the same release as that of your partner. For example, if you shared your template belonging to
Teamcenter 8.3 with your partner, then renaming of your template must also be done in the same
Teamcenter 8.3 release. You cannot rename your template in a release that is newer to Teamcenter
8.3 or older to Teamcenter 8.3.
While describing the renaming steps, the following conventions are used:
oldtemplate
This is the name used to indicate the current name of your template
newtemplate
This is the name used to indicate the new name for your template
2) Keep a backup copy of your oldtemplate project. In case you run into issues with renaming your template,
we can always get back to your old state of the template.
4) In the next few steps, we will make changes to oldtemplate project files in your file system. We will open
certain files in your project to find and replace the word ―oldtemplate‖ (which is the name of the current
template that you are renaming) with the word ―newtemplate‖ which is the new name for your template.
During this process, please ensure that you are doing a case sensitive search and replace.
5) In your file system, go to the location where the oldtemplate project resides. For example
<TC_ROOT>/bmide/workspace/<oldtemplate project>.
a) File: client_oldtemplate.properties
i) Open the file <project>/client_oldtemplate.properties, if it exists.
ii) Search and replace all occurrences of oldtemplate with newtemplate
iii) Rename the file client_oldtemplate.properties as client_newtemplate.properties
b) File: ProjectInfo.xml
i) Open the file <project>/ProjectInfo.xml
ii) Search and replace all occurrences of oldtemplate with newtemplate
c) File: .project
i) Open the file <project>/.project
ii) Search and replace all occurrences of oldtemplate with newtemplate
d) File: dependency.xml
i) Open the file <project>/extensions/ dependency.xml
ii) Search and replace all occurrences of oldtemplate with newtemplate
f) File: feature_oldtemplate.xml
i) Open the file <project>/install/feature_oldtemplate.xml
ii) Search and replace all occurrences of oldtemplate with newtemplate
iii) Rename the file feature_oldtemplate.xml to feature_newtemplate.xml
g) File: install_oldtemplate.default
i) Open the file <project>/install/install_oldtemplate.default
ii) Search and replace all occurrences of oldtemplate with newtemplate
iii) Rename the file install_oldtemplate.default to install_newtemplate.default
h) File: upgrade_oldtemplate_xxxx.default
i) Open all your upgrade scripts whose name is of the format
<project>/install/upgrade_oldtemplate_v2007.default
ii) Search and replace all occurrences of oldtemplate with newtemplate
iii) Rename all upgrade scripts from upgrade_oldtemplate_xxxx.default to
upgrade_newtemplate_xxxx.default
6) After you have fixed all files in the project, the next step is to rename your project folder
a) In your File system, go to the folder <TC_ROOT>/bmide/workspace
b) Rename the project folder name from ―oldtemplate” to ―newtemplate‖
c) After this step, your workspace would look like this -<TC_ROOT>/bmide/workspace/newtemplate
The updating of Corporate Server environments involves three steps which are explain in detail in subsequent
sections-
1) Update TEM related files in TC_ROOT
2) Update files in TC_DATA/model
3) Deploy the renamed template to the database
1) Before proceeding, you must obtain the template package for ―newtemplate‖
a) File: configuration.xml
i) Open the file <TC_ROOT>/install/configuration.xml
ii) Search and replace all occurrences of oldtemplate with newtemplate. Please ensure you are
performing a case sensitive and exact word match search and replace.
File sample after changes:
<features>
...
...
<installed feature="399B9CA4D818408AD040E33034580C1C"
name="newtemplate/Data Model" />
<spf feature="3FD330C0710D6D839C4F15B0868A5297" name="aldID_02" />
<spf feature="E289526B3F58306609C4EB06BC9BEBB2" name="EDA Server and
Rich Client Support" />
<spf feature="74D6C1B94FAE0AE4158817B01ECB8AAD" name="newtemplate" />
...
...
</features>
b) File: uninstall.xml
i) Open the file <TC_ROOT>/install/uninstall.xml
ii) Search and replace all occurrences of oldtemplate with newtemplate. Please ensure you are
performing a case sensitive and exact word match search and replace.
c) File: feature_oldtemplate.xml
i) Delete the file named feature_oldtemplate.xml from the directory <TC_ROOT>/install/install/modules
ii) Copy the file named feature_newtemplate.xml from your ―newtemplate‖ template package to
<TC_ROOT>/install/install/modules
1) Update each of the files listed below. In these files, you will do a search and replace of ―oldtempalate‖ with
―newtemplate‖. Ensure that you are using a case sensitive and exact word match in your search and replace
process.
a) File: client_oldtemplate.properties
i) Open the file <TC_DATA>/model/client_oldtemplate.properties, if it exists.
ii) Search and replace all occurrences of oldtemplate with newtemplate
iii) Rename client_oldtemplate.properties as client_newtemplate.properties
b) File: FileVersions.txt
i) Open the file <TC_DATA>/model/FileVersions.txt, if it exists.
ii) Search and replace all occurrences of oldtemplate with newtemplate
c) File: master.xml
i) Open the file <TC_DATA>/model/master.xml
d) File: oldtemplate_dependency.xml
i) Delete the file ―oldtemplate_dependency.xml‖ from <TC_DATA>/model folder
ii) Unzip ―newtemplate_template.zip‖ and copy the file ―newtemplate_dependency.xml‖ to
<TC_DATA>/model
e) File: oldtemplate_template.xml
i) Delete the file ―oldtemplate_template.xml‖ from <TC_DATA>/model folder
ii) Unzip ―newtemplate_template.zip‖ and copy the file ―newtemplate_template.xml‖ to
<TC_DATA>/model
a) Launch Teamcenter Rich Client and query the folder of type Fnd0BMIDEResource. See Figure 68 for the
results of the search.
b) From the search results, delete all files related to oldtemplate as listed below:
oldtemplate_template.xml
oldtemplate_dependency.xml
oldtemplate_template_en_US.xml. You will have to do the same for all language files that is
applicable to your ―oldtemplate‖.
1) Before updating the database with your renamed template, you have to first unregister your ―oldtemplate‖
and register your ―newtemplate‖ with the database and TEM. To do this, run the below commands-
a) Unregister oldtemplate
bmide_manage_templates -u=<user name> -p=<user password> -g=dba -
option=remove -templates=oldtemplate
b) Register newtempalte
bmide_manage_templates -u=<user name> -p=<user password> -g=dba -option=add -
templates=newtemplate
2) Update the database with your ―newtemplate‖ package that was created in BMIDE
a) Launch TEM in maintenance mode
b) Select the option Teamcenter FoundationUpdate database(Full Model – System downtime required).
See Figure 69.
c) When TEM prompts for the template package, you must browse and provide the ―newtemplate‖ package.
This is the template package you generated in BMIDE after renaming and importing your project. See
Figure 70 showing the selected newtemplate.
d) Go through the rest of the TEM panels and update the database
NOTE: The TEM options shown here is from Teamcenter 8.3.0. Please ensure you are selecting the correct
option in TEM to update your database in releases older than Teamcenter 8.3.0. For more details on how to
update a template, please read the topic Adding featuresInstalling a custom solution or third-party
templateUpdate the database using TEM in the Teamcenter installation guide.
At this point you have completed the renaming process of your ―oldtemplate‖. You can continue working on your
―newtemplate‖.
However, if you had shared the ―oldtemplate‖ with your partners then you must request them to apply the renaming
process described in section titled ―Updating Teamcenter installations where the renamed template is deployed‖.
If you have other templates dependent on ―oldtemplate‖ that whether you or your partner owns then apply the steps
described in the section titled ―Update other templates that are dependent on the renamed template‖.
18.3 Update other templates that are dependent on the renamed template
This section describes the steps to update templates that were dependent on your ―oldtemplate‖. These could be
templates you own or your partners. Since the ―oldtemplate‖ is renamed to ―newtemplate‖ you must now update all
templates that were dependent on ―oldtemplate‖ to be now dependent on ―newtemplate‖.
While describing the dependency change steps, the following conventions are used:
partner
o This is the name of the template in which the dependency must be changed from ―oldtemplate‖ to
―newtemplate‖. It could be a template you own or your partner owns.
1) Ensure the ―partner” template project in which the dependency has to be changed is in sync with the
database. This means if you have any new data model changes in your template that is not deployed to the
database, ensure you deploy them before the renaming process. After fixing the dependency on
―oldtemplate‖, the final step would be to deploy your template to the database. So if you include deployment
of new data model and changing the dependency of your template as a single process and say deployment
fails, then it adds to the complexity of debugging such failed deployments.
3) Shutdown BMIDE
d) When TEM asks for the template package, browse and provide the ―newtemplate‖ package which
contains the renamed template.
NOTE: The TEM options shown here is from Teamcenter 8.3.0. Please ensure you are selecting the
correct option of TEM in releases older than Teamcenter 8.3.0. For more details on adding a template
for usage within BMIDE, see ―Add a template to a Business Modeler IDE Template project‖ in the
Business Modeler IDE User Guide.
7) Load the ―partner‖ template whose dependency was changed in BMIDE and validate there are no loader
errors.
a) Launch BMIDE
b) Select ―partner‖ project, RMB select ―Open Project‖
c) This will open your project in BMIDE and load it
d) Review the ―Console‖ view and ensure there are no loading errors
To update the TC_ROOT files, you can follow the steps outlined in section titled ―Update TEM related files in your
Corporate Server TC_ROOT‖.
Updating the TC_ROOT folders require system downtime. Hence you must bring down all Teamcenter servers.
Please ensure that you update the TC_ROOT in all these environments-
Developer Environments
Integration Test Environments
Production Environments
User Acceptance Testing Environments, etc.
If your ―partner‖ template is installed in your database, then you must update the <TC_DATA> folders in all your
environments to rename all files related to ―oldtemplate‖. In this step you will not manipulate any files related to
―partner‖ template. You are only going to apply the process to rename ―oldtemplate‖ to ―newtemplate‖ in your
TC_ROOT.
To update the <TC_DATA>/model files, you can follow the steps outlined in section titled ―Update files in
TC_DATA/model‖.
Updating the TC_DATA/model folders require system downtime. Hence you must bring down all Teamcenter servers.
Please ensure that you update the TC_DATA/model in all these environments-
Developer Environments
Integration Test Environments
Production Environments
User Acceptance Testing Environments, etc.
1) Before updating the database, you have to first unregister your ―oldtemplate‖ and register your ―newtemplate‖
with the database and TEM. To do this, please run the below commands on command line:
a) Unregister oldtemplate
bmide_manage_templates -u=<user name> -p=<user password> -g=dba -
option=remove -templates=oldtemplate
b) Register newtemplate
bmide_manage_templates -u=<user name> -p=<user password> -g=dba -option=add -
templates=newtemplate
c) When TEM prompts for the template package, you must browse and provide both the ―newtemplate‖ and
―partner‖ template packages. See Figure 73 showing the selected ―newtemplate‖ and ―partner‖ template
for database udpate.
d) Go through the rest of the TEM panels and update the database.
NOTE: The TEM options shown here is from Teamcenter 8.3.0. Please ensure you are selecting the correct
option of TEM in releases older than Teamcenter 8.3.0. For more details on how to update a template, please
read the topic Adding featuresInstalling a custom solution or third-party templateUpdate the database
using TEM in the Teamcenter installation guide.
At this point you have completed the renaming process of ―oldtemplate‖ and fixing all templates that either you or your
partner own and were dependent on ―oldtemplate‖. You can now continue to work on your ―partner‖ template as
before.
//Use Teamcenter ITK and C++ APIs to access data of the target object identified by ―objTag‖
//Implement business logic code to check the data of the target object
//set *result to true or false depending on the validation result.
}
It should be noted the stub for the Impl class is generated the first time when the code generation is invoked. The
details of implementing a custom operation and code generation can be found in Business Modeler IDE Guide -
>Using the Business Modeler IDE for codeful customization.
Also note an operation that can be used in a condition expression must satisfy certain criteria. For example, the
operation must return an int and must have exactly one output that is the last parameter in the operation signature.
Please refer to Business Modeler IDE Guide -> Business Modeler IDE Reference -> Rules reference ->
Conditions reference -> Condition system -> Condition operation rules for details.
TcExtension to define an extern function for the property: MyCustomObject. The name of the extern function
is ―getMyCustomObjectBase‖, which must be unique.
<TcExtension name="getMyCustomObjectBase" internal="false"
cannedExtension="false" languageType="CPlusPlus" description="">
<TcExtensionValidity parameter="PROPERTY:UserSession:MyCustomObject:PROP_ask_value_tag:4"/>
</TcExtension>
#ifdef cplusplus
extern “C”
{
#endif
extern MYLIB_API int getMyCustomObjectBase(METHOD_message_t *, va_list args);
#ifdef cplusplus
}
#endif
The following is an example code snippet for the base function: ―getMyCustomObjectBase‖, which is expected to
return the tag of the singleton instance of the custom business object. Please note the instance is created but not
saved so that this custom business object is actually used as a ―runtime‖ object, thus causing no impact on database
data. Also note the tag of the instance is cached in a static variable. Using the static variable to cache the tag is to
make sure only one instance is created.
int getMyCustomObjectBase( METHOD_message_t *, va_list args )
{
va_list largs;
va_copy( largs, args );
va_arg( largs, tag_t ); /*Property Object tag_t not used*/
tag_t* customObjTag = va_arg( largs, tag_t* );
va_end( largs );
Teamcenter::BusinessObject* obj =
Teamcenter::BusinessObjectRegistry::instance().createBusinessObject(creInput);
myCustomObjectTag = obj->getTag();
}
*customObjTag = myCustomObjectTag;
return ifail;
}
Suppose the condition signature is: isConditionExampleA(WorkspaceObject o, UserSession u). At this very last step,
the customer is now able to start with UserSession argument ―u‖ to build a condition expression using the custom
operation ―checkObjects‖. In ―Expression:‖ field of ―New Condition…‖ dialog,
Enter u.
Then, ContentAssist will automatically popup to display applicable properties and operations of UserSession
to choose from or press Ctrl + space bar
Select ―checkObjects‖ operation from the ContentAssist selection list and enter WorkspaceObject ―o‖
argument as the input target object to ―checkObjects‖ operation
u.MyCustomObject.checkObjects( o ) = false
If your business needs require you to remove the template from then you must exercise caution while
removing your template. Here is the list of cautionary items-
There is no automated support to remove a template. It is a manual process.
If you miss executing a step in the template removal process, it may result in future deploy/upgrade
future.
Removing a template will require system downtime.
After you remove the template dependency in BMIDE, you must update the same in all your
Developer Environments, Integration Test Environments, Production Environments, User Acceptance
Testing Environments, etc.
You must also update other templates that you own and are dependent on the template being
removed
If your partners have created additional templates that are dependent on your template to be
removed, then you must inform them to update all such templates to remove dependency on your
template.
If you have shared your template with partners then do not include new data model new data model
in your template for which you removed the dependency on another template. Ensure that the data
model definitions of your template matches with the one that was previously distributed to your
partners, except the necessary changes to resolve the data model loading errors displayed in the
console log. It is not wise to distribute a template that is both template dependency removal and has
new data model changes. Since template removal is a manual process, including new data model
changes in a template with dependencies removed increases the debugging complexity if we
encounter issue with the deploying your template that has template dependency removal.
If you have shared your template with partners, then your template with dependencies removed must
be in the same release as that of your partner. For example, if you shared your template belonging to
Teamcenter 8.3 with your partner, then removing of your template dependency must also be done in
the same Teamcenter 8.3 release. You cannot remove your template dependency in a release that is
newer to Teamcenter 8.3 or older to Teamcenter 8.3.
Assumptions:
There is no instance data in the database for the data model defined in the template to be removed
If there are any other templates that are dependent upon this template, they must be removed from the
database first before this template can be removed.
The contents of model directory are in sync with the database.
o This means if you have any new data model changes in your template that is not yet deployed to the
database, ensure you deploy them before removing template dependencies. If you include
deployment of new data model and removing of template dependency as a single process and say
deployment fails, then it adds to the complexity of debugging such failed deployments.
o But if you have shared your template with your partner then do not add new data model to your
template after removing the template dependency. Ensure the data model matches with the one that
was previously distributed to your partners.
There are two possible scenarios of removing a template that you own:
A. No template is dependent on the template you want to remove
COTS
If none of the templates are dependent on the template to removed, you can proceed with the steps detailed
below starting from Section 20.3.1.
X Want to remove
this template
COTS
If you have a custom template that is depended on this template, you will have to remove the dependency
before removing this template. Execute the steps detailed in section 21 before executing the steps detailed in
this section. After removing the dependency, you can proceed with the steps detailed below starting from
Section 20.4.1.
20.3.1 Delete the data model definitions from the template to be removed in
BMIDE
The first step in the template removal process is to delete the data model definitions from the template project in
BMIDE and ensure it loads successfully within BMIDE. This section describes the steps to delete the data model
definitions from the custom template to be removed and the database. Since this is a custom template, you would
have access to the template project‘s source code which is required to perform these steps.
Following are steps to delete the data model definitions:
9) Keep a backup copy of your customer project. In case you run into issues with removing your template, we
can always get back to your old state of the template.
10) Launch BMIDE and remove the data model definitions from the extension files.
a. Go to the Navigator view, expand the <Project>/extensions to view the source files.
b. Open each XML source file (except master.xml and dependency.xml) and remove the XML code
between the two <Add></Add>, <Change></Change> and <Delete></Delete> tags. Save the files.
c. Repeat the same steps for source files below the <Project>/extensions/lang directory. Save the file.
5) Before proceeding, you must obtain the template package for ―customer‖ template
6) Create a backup of the folder <TC_DATA>/model
7) Update the database with your ―customer‖ package that was created in BMIDE
e) Launch TEM in maintenance mode
f) Select the option Teamcenter FoundationUpdate database (Full Model – System downtime required).
See Figure 76 TEM panel with template update optionFigure 76.
NOTE: The TEM options shown here is from Teamcenter 8.3.0. Please ensure you are selecting the
correct option in TEM to update your database in releases older than Teamcenter 8.3.0. For more details
on how to update a template, please read the topic Adding featuresInstalling a custom solution or third-
party templateUpdate the database using TEM in the Teamcenter installation guide.
At this point you have deleted the data model definition of the template to be removed from the database.
e) File: configuration.xml
iii) Open the file <TC_ROOT>/install/configuration.xml
iv) Search and delete all occurrences of customer. Please ensure you are performing a case sensitive
and exact word match search and delete.
File sample with the lines to be deleted:
f) File: uninstall.xml
iii) Open the file <TC_ROOT>/install/uninstall.xml
iv) Search and delete all occurrences of customer. Please ensure you are performing a case sensitive
and exact word match search and delete.
g) File: feature_customer.xml
iii) Delete the file named feature_customer.xml from the directory <TC_ROOT>/install/install/modules
6) Update each of the files listed below. In these files, you will do a search and delete the entries containing
―customer‖. Ensure that you are using a case sensitive and exact word match in your search and delete
process.
g) File: FileVersions.txt
iii) Open the file <TC_DATA>/model/FileVersions.txt, if it exists.
iv) Search and delete all occurrences of customer.
h) File: master.xml
iii) Open the file <TC_DATA>/model/master.xml
iv) Search and delete all occurrences of customer
i) File: customer_dependency.xml
iii) Delete the file ―customer_dependency.xml‖ from <TC_DATA>/model folder
j) File: customer_template.xml
iii) Delete the file ―customer_template.xml‖ from <TC_DATA>/model folder
7) Update all the template-related files from the <TC_DATA>/model folder to datasets in the database.
This step is required only if you are working with Teamcenter 8.3 or a later release
From the TC command shell, run the manage_model_files utility pointing to the <TC_DATA>/model
directory
manage_model_files –u=<user name> -p=<user password> -g=dba –option=upload
i. Launch Teamcenter Rich Client and query the folder of type Fnd0BMIDEResource. See Figure 77 for
the results of the search.
ii. From the search results, delete all files related to customer as listed below:
customer_template.xml
customer_dependency.xml
customer_template_en_US.xml. You will have to do the same for all language files that is
applicable to your ―customer‖ template.
iii. Close RAC.
At this point you have completed the removal process of your ―customer‖ template.
Assumptions:
There is no instance data in the database for the data model defined in the template to be removed
If there are any other templates that are dependent upon this template, they must be removed from the
database first before this template can be removed.
The contents of model directory are in sync with the database.
o This means if you have any new data model changes in your template that is not yet deployed to the
database, ensure you deploy them before removing template dependencies. If you include
deployment of new data model and removing of template dependency as a single process and say
deployment fails, then it adds to the complexity of debugging such failed deployments.
o But if you have shared your template with your partner then do not add new data model to your
template after removing the template dependency. Ensure the data model matches with the one that
was previously distributed to your partners.
Note that the instructions below will assume that the template being removed is called ―tcii‖. If you are removing a
template with another name please substitute the name of your template everywhere you see the word ―tcii‖ in the
following directions.
There are two possible scenarios of removing a template that is not owned by you:
COTS
If none of the templates are dependent on the template to removed, you can proceed with the steps detailed
below starting from Section 20.4.1.
COTS
If you have a custom template that is depended on this template, you will have to remove the dependency
before removing this template. Execute the steps detailed in section 21 before executing the steps detailed in
this section. After removing the dependency, you can proceed with the steps detailed below starting from
Section 20.4.1.
20.4.2.1 Delete the data model definitions of the template to be removed from the database
a) From the TC command shell, run business_model_extractor utility to extract the data model from the
database.
At this point you have deleted the data model definition of the tcii template to be removed from the database.
b) File: uninstall.xml
i) Open the file <TC_ROOT>/install/uninstall.xml
ii) Search and delete all occurrences of ―tcii‖. Please ensure you are performing a case sensitive
and exact word match search and delete.
c) File: feature_tcii.xml
i) Delete the file named feature_tcii.xml from the directory <TC_ROOT>/install/install/modules
2) Update each of the files listed below. In these files, you will do a search and delete the entries containing
―tcii‖. Ensure that you are using a case sensitive and exact word match in your search and delete process.
b) File: tcii_dependency.xml
i) Delete the file ―tcii_dependency.xml‖ from <TC_DATA>/model folder
c) File: tcii_template.xml
i) Delete the file ―tcii_template.xml‖ from <TC_DATA>/model folder
d) File: tcii_tcbaseline.xml
i) Delete the file ―tcii_template.xml‖ from <TC_DATA>/model/baselines folder
e) File: tcii_icons.zip
i) This step is required only if you are working with Teamcenter 9.0 or a later release
ii) If exists, delete the file ―tcii_icons.zip‖ from <TC_DATA>/model/icons folder
3) Update all the template-related files from the <TC_DATA>/model folder to datasets in the database.
a) This step is required only if you are working with Teamcenter 8.3 or a later release
b) From the TC command shell, run the manage_model_files utility pointing to the <TC_DATA>/model
directory
manage_model_files –u=<user name> -p=<user password> -g=dba –option=upload
c) Launch Teamcenter Rich Client and query the folder of type Fnd0BMIDEResource. See Figure 80 for
the results of the search.
d) From the search results, delete all files related to customer as listed below: (NO delete option when you
right click. But del button works)
tcii_template.xml
tcii_dependency.xml
tcii_template_en_US.xml. You will have to do the same for all language files that is applicable to
your ―tcii‖ template.
tcii_icons.zip
tcii_icons.zip.ref
tcii_template.ref
e) Close RAC.
To unregister the ―tcii‖ template from the database, run the below command from the Teamcenter command prompt-
bmide_manage_templates -u=<user name> -p=<user password> -g=dba -option=remove -
templates= tcii
At this point you have completed the removal process of your ―tcii‖ template.
X Want to delete
dependency on
this template
COTS
This section describes the steps to remove the dependency on a template in BMIDE. Note that the instructions below
will assume that for template ―template2‖, you want to remove the dependency on ―template1‖. If you are removing
dependency on a template with another name please substitute the name of your template everywhere you see the
word ―template1‖ in the following directions.
Assumptions:
There is no instance data in the database for the data model defined in the template to be removed
2) Keep a backup copy of your template project. In case you run into issues with updating your template, we can
always get back to your old state of the template.
4) Shutdown BMIDE
<include file="foundation_template.xml"/>
...
</TcBusinessDataIncludes>
6) Load the ―template2‖ template whose dependency was changed in BMIDE and validate there are no loader
errors.
a) Launch BMIDE
b) Select ―template2‖ project, RMB select ―Open Project‖
c) This will open your project in BMIDE and load it
d) Review the ―Console‖ and ensure there are no loading errors. If there are no loading errors, the
console view displays a success message as below:
-----------------------------------------------------------------------
Loading project: "template2"...
Project "template2" load completed on Sun Mar 04 17:52:20 EST 2012.
For information on loading errors, please refer Section 13 Troubleshooting BMIDE Validation errors and
Section 6.7.4.2.1 Loader / Model errors.
22.1 Identify the data model definitions defined in the template you want to remove
The first step in deleting the instance data is to identify the data model elements, in the template to be
removed, which can have the instances in the database. Below are steps to identify the custom data model
definitions in the ―customer‖ template:
1) Open the file <TC_DATA>/model/custom_template.xml
2) From the XML tags present in the template XML file, identify the data model elements that can possibly have
instances in the database. For example, below are the XML tags to identify some of the data model elements
from the TCII template.
Class:
Type:
Relation Type:
Dataset:
NoteType:
Tool:
Below table shows the data model elements defined in TCII template (tcii_template.xml):
Dataset
IdeasAssemblyViewInfo
IdeasAssembly
IdeasDrawing
IdeasDrawingSet
IdeasFem
IdeasPart
Relation
IDEAS_ACCONTEXT
IDEAS_DRAWING
IDEAS_FEM
IDEAS_SOURCE
IDEAS_DWGSET
NoteType
I-DEAS occurrence
identifier
Tool
Ideas
Table 3 Data Model elements in TCII template
This section provides you some examples to create the queries get the required business object instances for the
data model elements defined in TCII template. It also provides you a sample list of commonly encountered issues
while deleting the instance data and the corrective actions.
3) Run the query created in step 1. This will list all the item revisions containing IdeasDrawing datasets
attached with Manifestation relation. Copy all the item revisions and paste them under the folder
created in step 2
4) Select all the item revisions under the ItemRevsWithIdeasDrawings folder, switch to Details panel,
select View -> Expand
5) Select the all the expanded objects under the ItemRevsWithIdeasDrawings folder and sort the objects
by Type in Details panel. This will list all the IdeasDrawing datasets together
6) Select all the IdeasDrawing datasets in Details panel and select Edit -> Delete
7) If the dataset deletion fails, check the error message, fix the issue and delete the dataset. Repeat this
process until all datasets are deleted. Refer Section 22.2.2 for most commonly encountered issues
and their corrective actions.
8) Follow the same steps as IdeasDrawing dataset for below dataset types:
i. IdeasDrawingSet
ii. IdeasFem
iii. IdeasPart
iv. IdeasAssemblyViewInfo
3) Run the query created in step 1. This will list all the item revisions containing
ItemRevsWithIdeasAssemblies datasets attached with Specifications relation. Copy all the item
revisions and paste them under the folder created in step 2
4) Select all the item revisions under the ItemRevsWithIdeasAssemblies folder, switch to Details panel,
and select View -> Expand
5) Select the all the expanded objects under the ItemRevsWithIdeasAssemblies folder and sort the
objects by Type in Details panel. This will list all the IdeasAssemblies datasets together
7) Perform the General… query with Type as IdeasAssembly. Make sure there are no objects left of this
type. Delete the unreferenced objects, if any left
9) If the dataset deletion fails, check the error message, fix the issue and delete the dataset. Refer
Section 22.2.2 for most commonly encountered issues and their corrective actions.
10) Perform the General… query with Type as IdeasAssembly. Make sure there are no objects left of this
type. Delete the unreferenced objects, if any left
3) Copy all the BOMView Revisions and paste them under the folder created in step b
4) Double click on the BOMView Revision to launch PSM. Select View -> Expand Below
5) Double click on the BOMLines that have IDEAS TMTD note type in All Notes column
6) In the dialog, select IDEAS TMD in the Existing notes pull down menu and click Remove button. Click OK
iii. Tools
Ideas
2) After deleting the instances, search for the instances of above types and make sure there are no instances
left.
a. In BMIDE, go to the Business Objects view select the project in which you want to add the
extension. Right-click the project and choose Organize->Set active extension file. Select the file
where you want to save the data model changes.
b. In the BMIDE, expand the project and the Rules→Extensions folders.
c. Right-click the Extensions folder and choose New Extension Definition.
The New Extension Definition wizard runs.
a. In the Business Objects view, right-click the business object you have made available on the
extension (Folder), choose Open,
b. In the business object editor, click the Operations tab. In the operations list, find and select the
operation you want to attach the post action too. Example: ―create (Teamcenter::createInput*)‖.
c. In the Post Action table, click the ―Add‖ button (see below):
e. Hit the finish button, the Post-Action table will look the following:
Basically there are 2 options for placing the extension implementation files:
a. This is a new mechanism where extension code can be placed and built from BMIDE See the
“Write extension code” in BMIDE online help for details.
b. This is a legacy mechanism where extension codes can be placed anywhere (not in BMIDE),
use Build the library for the example extension” in BMIDE online help to built the library.
#ifdef __cplusplus
}
#endif
#include <bmf/libuserext_undef.h>
#endif //USER_EXT_H
Sample cxx file (<filename>.cxx)
#include <userext.hxx>
#include <stdio.h>
#include <stdarg.h>
#include <ug_va_copy.h>
#include <CreateFunctionInvoker.hxx>
using namespace Teamcenter;
va_list local_args;
va_copy( local_args, args);
pFoldCreInput->getString("object_name",name,isNull);
pFoldCreInput->getString("object_desc",description,isNull);
// Write custom business logic here
va_end( local_args );
return 0;
}
Run the ―dumpbin‖ (win) or ―nm‖ (UNIX) to see if the ―H2FolderPostAction‖ extension symbol has been
exported correctly. The symbol should not be mangled (C++).
dumpbin /EXPORTS <path_of_libH2libextr>\libH2libext.dll
The output should look similar to the following:
71 00002BE0 H2FolderPostAction = _H2FolderPostAction
5. Deploy your extension definition to your database by deploying your custom template ―H2FolderPostAction”
(use BMIDE User Guide for more details)
6. Test the extension ―H2FolderPostAction” by creating a folder object in RAC. The extension will be executed.
23.2 Relation Navigation from Secondary to Primary Object (Custom Runtime Property):
Problem: It is possible to navigate from primary object to secondary object through relation properties
from RAC/Thin client’s properties panels or from summery view. Out of the box it is not possible to navigate
from secondary object to primary object similar to relation properties. This custom solution provides a way
to navigate from secondary object to primary objects through customization.
Example: ItemRevision (object IR001) is attached with Document (object Doc001) with IMAN_specification
relation. Currently in RAC/web client summary/ properties page it is possible to navigate from IR001 to
Doc001 through IMAN_sepcification relation properties. It is not possible to navigate from Doc001 to IR001.
<TcExtensionAttach extensionName="getH2MyRelationToPrimary"
operationName="PROP_ask_value_tag" isActive="true" propertyName="h2MyRelationToPrimary"
extendableElementName="Document" extendableElementType="Type"
extensionPointType="BaseAction" conditionName="isTrue" description=""/>
Reload BMIDE custom project to make sure there are no typographical errors in console. Deploy the template.
iii) Implement getter C++ function for h2MyRelationToPrimary property:
The getter function for a property operation is declared in the following manner to avoid C++ name
mangling. In this example, the library name is ―myLibrary‖
#ifdef __cplusplus
extern "C"{
#endif
#ifdef __cplusplus
}
#endif
The following is an example code snippet for the function ―getH2MyRelationToPrimary‖, which is
expected to return the tag of primary business object.
int getH2MyRelationToPrimary (
METHOD_message_t * message, va_list args )
{
int ifail = ITK_ok;
va_list largs;
va_copy( largs, args);
va_arg( largs, tag_t );
tag_t* primaryTag = va_arg( largs, tag_t*);
va_end( largs );