Introduction To Teamcenter Customization
Introduction To Teamcenter Customization
Customization Architecture
Teamcenter customization architecture can be broadly distinguished based on Teamcenter
technical architecture. It can be categorized in to three layers.
Web or Thin Client Customization: This customization is for Teamcenter Web client.
Teamcenter provides standard web interface for viewing and editing Teamcenter object in
web browser. Web client is builds on asynchronous JavaScript and XML (AJAX) to allow
dynamic loading of data in the browser. The HTML pages are renders by java script on
XML data. Most of the thin client customization is carried through JavaScript which
allow the rendering as well managing request\response from web server. Both client-toserver requests and server-to-client responses in Teamcenter thin client are standard
HTTP responses.
SOA Customization: It is also called Teamcenter services. It is a standard SOA based
services provided by Teamcenter for integrating with third party as well custom client.
Also Teamcenter provides framework to create your own custom SOA services. I covered
Teamcenter SOA services in detail in my SOA blogs.
BMIDE Extension Customization: This is mainly a server customization using
Teamcenter BMIDE. BMIDE provide various extension customization mechanisms for
implementing desired behavior in Teamcenter. Some of example of BMIDE extension is
pre-action or post-action operation for Business object, Runtime property etc. This
extensions are implemented in BMIDE environment by writing C\C++ server code
mainly using ITK API. BMIDE framework create stub code and other require classes for
extension implementation. Developer only required implementing base logic of the
extension. I will try to cover extension implementation in one of my future blog.
Apart from the above customization; Teamcenter Dispatcher module can also be
customized for required translation behavior. Most of time Dispatcher client required to
be implemented for extracting and loading translated file from Teamcenter. The
Dispatcher Client Framework is based on Teamcenter SOA service and most OOTB SOA
API is used apart from Dispatcher API which encapsulates most of complex Teamcenter
SOA API calls. I already covered Dispatcher Customization in my blog on Teamcenter
Dispatcher.
See Also :
Teamcenter FMS Overview
Teamcenter SOA : Introduction
Teamcenter Dispatcher Framework
Posted by Manoj Blog at 11:43 AM No comments:
Email ThisBlogThis!Share to TwitterShare to Facebook
object based search query based on attribute criteria. It is also used in report builder for
creating report based on query output. I covered it in detail in my Report Builder blog. In
this blog I will explain in detail about local query builder configuration and basic concept
to create or modify query.
User whose value can be set by user before query execution. The attribute can be
of search class or related class.
Search Class: This is target class against which search will be executed. The search
result will be list of instance of this class. As defined above section this will be base class
for query. You can navigate required class from Class Selection dialog which shows
Teamcenter hierarchy data model.
Attribute Selection: This provide list of attributes of search class. Option provide to see
only display attributes for a given class or all attributes its inherited from all parent class
hierarchy. This section help to select attribute used for search Criteria
Search Criteria: This defined criteria for context search as well user search criteria field.
Following are field of Search Criteria section
Boolean Rule : This connect multiple search clauses in search criteria through And\OR
condition. AND condition required related clauses should be satisfied where as OR
condition means any of them.
UserEntry Name : Shows the display name shown in query. It refers to query locale file
for actual display name of attributes search dialog. Make it empty if you want to hide
some of clauses.
Logical Operator: This is most important field of Search field which defined actual query
condition required to be executed. It basically define rules of attributes are evaluated
against the value provided for execution. For example for date attribute you can defined
greater then or less then Operator to execute query for before or after date clauses. Query
builder support almost all sql operator clauses. The below image shows all support
operation condition in Teamcenter.
on set of and / or clause through grouping the clauses throuch under different
bracket () .
5. Query results only shows list of instance of search class only. You can't see
related object along with search object in query results dialogs.
See Also :
1)
2)
3)
a)
Most of time you create custom type by extending data model of Item
or form type. Once deploy from BMIDE, it will create a new table in
Data base with columns having custom attribute defined in BMIDE. All
inherited classes automatically inherit parent attributes. Hence child
attributes are combination of parent attributes plus child attributes.
Business Object:
The building block of Teamcenter is Business Object. It resides above
POM Objects or DB Classes. Business Object can be seen as actual
representation of real life entity which are encapsulated as Business
object. The underlining objects are still persistence schema classes.
Teamcenter UA provides hundred of OOTB business objects. Following
are major characteristic of Business Object.
Business Objects are related to each other through relations.
Business Objects have property which can be persistence (attributes
from underlining classes) or Dynamic (evaluated run time).
Business Objects behavior can be controlled through rules which are
defined in BMIDE. Rule can be either configurable (Ex: Naming Rules)
or customization (extension, user_exit etc).
GRM Relation: Teamcenter Relation is second building block. Relation
defined the inter dependent of various Business Object with each
others. In Teamcenter Relation can be categorized in to two groups.
Reference by : The Business Object underline schema classed direct
has reference to other object through attributes. It can be compare to
pointer reference to other classes in object orient concept. For example
POM_application object has reference to owning group or user.
FMS Overview:
FMS is independent tool which run as service in server (as FSC) and
client machine (as FCC). Teamcenter Application Tier and Client Tier
interact with FMS framework through HTTP or HTTPS protocol. The two
components of FMS are FMS server cache (FSC) and FMS client Cache.
As name suggest FSC is service running in server side which basically
cache file in server and serves multiple user request where as FMS
client cache work in client machine where it serve request for single
user and also interact with FSC for getting latest or new files from
server.
Architecture of FMS:
As discussed in FMS Overview, FMS has two components: FSC and FCC.
For basic installation you usually have one FSC and multiple FCC based
on number of user using the Teamcenter Client. Each of portal clients
will have one FCC running on client machine. But in production
Environment where user can be in multiple geographical location or
number of user are so high that single FSC cant service so many
users. Also if volumes are mounted in different server then also we
required FSC on each volume server as FSC is must for each of the
volume server. Hence we required to have multiple FSC running in
different server to server different geography or set of user or volume
server. This multiple FSC server are distributed in such a way that they
can be near to each of geographical location. Due to multiple FSC
server architect we then required to define one FSC server as master
for managing request and routing to different FSC server. The below
diagram shows FMS architecture.
FMS Configuration
Configuration of FMS is managed through xml files. Basically there are
three types of Files
FMS Master
FSC
FCC
1.
2.
3.
4.
5.
6.
7.
8.
I cover all aspect of FMS overview. Hope this will help to understand FMS working and
configuration.
Dispatcher Client is the front end of Dispatcher Framework which basically interacts with
Teamcenter through SOA for translation request. Teamcenter required to be configuring
through ETS preferences for new translation services and object type on which this
service is valid. Once the request is received to Dispatcher Client, it processes the request
and put all extracted files required to be translated in to directory called staging directory.
Staging directory is required to be configured during Dispatcher Service Installation. In
staging directory a unique subfolder is created for each request by Dispatcher client based
on Task ID generated during user request in Teamcenter. Once Dispatcher client
completes the extract, it inform scheduler for translation processing. Scheduler in turn
informs Module to start processing the task. Module translate the file and put the output
in staging directory. Once completed schedule ping the Dispacher client which load
translated file back to Teamcenter.
Siemens PLM provide lot of out of box translation service which required to be make
active. In next blog I will provide more detail about each component and there
configuration.
Configuring Translator
In my last blog I discuss Dispatcher Framework of Teamcenter. In this blog I will discuss
in detail on each of module and how to configure COTS translation service. As discussed
in last blog there are three components for Translator.
1) Scheduler
2) Module
3) Dispatcher Client
Each module run as independent service and in different server. Component communicate
through RMI
Scheduler : This component act as Moderator between Module and DispatcherClient.
Module and DispatcherClient required configuring to communicate to Scheduler. Once
installed the scheduler directory structure created as shown below.
The transscheduler.properties file stored in config subdirectory which defined port and
other properties for Scheduler. The scheduler can be run by runscheduler.bat present in
bin subfolder. Lib store all Jar file correspond to scheduler. Most of time there is no
change required to be done in Scheduler once installed.
Module: Module is the component which does actual translation. It interacts with
Scheduler to get the Translation Task. Module invokes specific Translation based on Task
information and Translator service available to it. . Once installed the Module directory
structure created as shown below.
The conf folder has translator.xml which contains all Translation service details for
Module. Modules publish this service to Scheduler. Based on this information Scheduler
in turn dispatch specific Translation task to the Module.
Contain of translator.xml look like as follow
The XML show subsection of configuring one of Translation service in Module. Every
translation service in Module starts with name of service as element in translator.xml. As
in above example Translation service JtToCatiaV5 is configured under provider
SIEMENS with service name jttocatiaV5. The above configuration show presently the
service is not active. Means Module will not publish this service. If you want to make this
Lib folder contains jar files for Dispatcher Client. All customize Jar file for new translator
service required to be copy in this folder. Detail regarding Translator customization will
be discuss in my next blog. The config contain all file related to Translator configuration
for DispatcherClient. DispatcherClient.config contains information related to Translator
server like rmi port of Scheduler, staging directory etc. Where as Service.properties
contain information required to connect to Teamcenter like host, Translator Teamcenter
user, tcserver port number etc. For activating COTS translation usually we dont required
to change in DispatcherClient component.
Activating COTS Translation Service: Siemens provided many Cots service with
installation. But this service are by default are not activated. Also some of the Translator
service required core service to be installed. For example previewservice translation can
only work if visualization and vis translator is installed. Following steps required to be
Also it provides OOTB Data Loader for loading of output file automatically. This auto
behavior can be controlled without writing piece of code by configuring Translator.xml
for the specific translation service. The entire class document related to Dispatcher Client
can be found under docs folder inside Dispatcher Client root directory. Also sample
implementation can found in sample folder under Dispatcher Client root directory.
Implementation:
Dispatcher Framework provides two main interfaces for customization the translator.
1) Taskprep class for extracting the file from Teamcenter. Implementation to prepare task
to submit to Translation serverice.
2) DatabaseOperation class for loading the translated files to Teamcenter.
Usually both the class required to implemented for new translation service. Taskprep is
the first called when a translation request is created and Dispatcher then find the specific
task prep implementation for correspondent translation service request. Once the
Translation is done by Module ,the dispatcher invoke DatabaseOperation implementation
for the given service for upload of data to team center. In our example if we required to
convert text document from one language to other then the task prep with first extract
Document from target Dataset and put the file in staging location. Once the module
complete the translation the Database Operation class will be invoked and the translated
file will be uploaded to Teamcenter with specified dataset type and attach to target object
with relation.
m_SecondaryObjs =
request.getProperty("secondaryObjects").getModelObjectArrayValue();ModelObject are
SOA base wrapper class for all Teamcenter objects . primaryobject are object in
teamcenter which selected for Translation and secondary object are those object which
are associated with target through relation. For example in case of language translation
we decided to that text file can be target object (Primary object) and the Item Revision to
which is associated will be then secondary object.
Once we get the primary object then the Name reference file required to be extracted
from dataset and put in staging location. This is done through SOA call to teamcenter.
Sample code snippet
Dataset dataset = (Dataset) m_PrimaryObjs[i];
ModelObject contexts[] = dataset.get_ref_list();
ImanFile zIFile = null;
for(int j = 0; j < contexts.length; j++)
{
if(!(contexts[j] instanceof ImanFile))
{
continue;
}
zIFile = (ImanFile)contexts[j];m_InputFile =
TranslationRequest.getFileToStaging(zIFile, stagingLoc);Also required to create a
Translation request detail, which is referred by Module for translation. For example in
Language translator usecase we would required to have option where user can provide
from which language to which language a translation is required. This is done by having
Translator Argument while creating translation request by user. This can be retrieve and
further process in Taskprep. The snippets for accessing the argument are as follows.
Map translationArgsMap = TranslationRequest.getTranslationArgs(request);This Map
contains an Argument as key and its value as value. Also Taskprep can create its own
argument based on process which can be used by module or database loader for further
processing.
translationArgsMap.put(argumentKey, argumentValue);For example in Language
Translator we would required to change the character set to specific value based on
translated Language selected by user.
The translation request detail is created as xml file which resides in staging director under
unique task id. The sample will look like this
Basically this xml contain user argument which required for Translation. For example
above the option provide from and to language. This is used by module for translating.
Also it has detail of corresponding dataset, item and item rev. This can be populated but
not always required as in above example we also population uid of primary and
secondary object which can be used for loading the translated file to with specific relation
to an object.
Loader Implementation: Database loader is implemented by extending
com.teamcenter.ets.load.DatabaseOperation abstract class. Load() function required to be
implemented for a translation service. The DatabaseOperation class has Translationdata
transData attribute which encapsulate all translated request data. From translation data we
can get all information we populate during extraction (taskprep). For example from
Transdata you can get result file list from translation. This help for loader to load all file
in teamcenter. The pseudo code for same will
TranslationDBMapInfo zDbMapInfo = transData.getTranslationDBMapInfo();
List zResultFileList = TranslationTaskUtil.getMapperResults(zDbMapInfo,
scResultFileType);
Where TranslationTaskUtil is utility class provide various generic facility.
ScResultFileType is expected file type for translation. User and Taskprep option can be
access through TranslationTask which is a member of DatabaseOperation. The pseudo
code for same will
TranslatorOptions transOpts = transTask.getTranslatorOptions();
TranslatorOptions provide encapsulation of all option with Key and Value pair. The map
can be access through
Option transOption = transOpts.getOption(i);
if(transOption.getName().equals("SomeoptionName"))
strOutputType = transOption.getValue() ;
Uploading of all result file is done through SOA call to Teamcenter. Dispatcher
Framework provides various helper class which encapsulate the SOA call to Teamcenter.
If requirement cant be fulfilled through helper class then SOA can directly be called for
the same. 0ne of helper class is DatasetHelper class which provides all functions related
to dataset. One of function is which create new dataset for all result file list and attach it
to primary or secondary target with a given relation. The pseudo code for same will be
zat
dtsethelper.createInsertDataset((ItemRevision)secondaryObj, (Dataset)primaryObj,
datasettype , releationtype, namereferencetype, resultdir, filelist, flag to insert
to source dataset or itemrevision);
Jar File Packaging and Dispatcher configuration:
We required to create a Jar file for the custom dispatcher code. Also in JAR file should
have a property file which defines implemented Taskpreperation and Database loader
class initiated through reflection mechanism in dispatcher framework. This is sample
property file.
Translator.serviceprovide.translation servicename.Prepare=packagename.TaskPrep
class name
Translator. .serviceprovide.translation servicename.Load=
packagename.DatabaseOperation class name
Service provider is the name of service provided, for example OOT translation service it
is Siemens. It is configure as preference called ETS.PROVIDERS. Translation
Servicename is the name of Translation service which configure in Module config and in
Teamcenter preference ETS.TRANSLATORS.
In case of Language translation usecase service provider name can exampletranslation
and service name can be examplelanguagetranslation. The content for property for this
will be
Translator. ExampleTranslation
examplelanguagetranslation.Prepare=packagename.LanguageTransTaskPrep class
name
Translator. ExampleTranslation.examplelanguagetranslation.Load=
packagename.LanguageTransDatabaseOperation class name
Once the JAR package is created it required to put is DispatcherClient\lib folder. Also
service.property under DispatcherClient\config folder required to be update with the
property file name
import
TSBasicService,TSCatiaService,TSProEService,TSUGNXService,TSProjectTransServic
e, ourpropertyfilename
This will load all classed when DispatcherClient is started.
most of the time we required to set some environment like Teamcenter root or Tc data.
3) Add the service detail in Translator.xml under Module\conf regarding the service.
Let take our example usecase of Language Translator. We are going to use third party
translator for example Google Translator for it. There are some Java API which invoke
remote google translator. We will required to create a Java wrapper on top of this API to
create our Teamcenter Translator. Our Program will take input file , outputfile with
location, language from which it will be translate and to language which required to
translated.
Probably we also required to create bat file for setting a JAVA_Home and other env
variable. This bat will also take this four parameter required for our program. Our sample
config required to be added inTranslator.xml is as follow
url is connection string for two tier or four tier server connection.
credentialManagerInstance is a instance of class which implemented
CredentialManager interface.
public class AppCredentialManager implements
CredentialManager
Calling SAO services:
Teamcenter provide set of OOTB SOA service for different modules like
work flow etc. Each of this service has its own static service class
which provide handle to those specific services. For example Query
service handle can be get by
SavedQueryService queryService =
SavedQueryService.getService(connectionObj);
Or workflow service instance can be obtain through
The above image show the SavedQuery and available operation for it.
Once we get instance on query service we can invoke all available SOA
operation on it. The detail of all operations functionality and its
argument Data Type is describe in BMIDE.
Quick Example of using SOA service:
Let look small code snippet of using OTTB SOA service in Java. These
below code release the object using operation from TcWorkflow SOA
service.
1.
4.
5.
6.
If the connection is http, ensure its pointing out to the right URI and
this can be checked through Run->Debug Configurations-> Arguments
If it the connection is through iiop, it should be set as follows
-Dhost=iiop:localhost:1572/TcServer1
Go through the files to understand how the services are being called
and can be used in the custom solution. Refer my OOTB SOA Service
Blog for basic understanding of sample code.
1) Check whether you can achieve the required result at client side by
using OOTB SOA.
2) Analyze the desire state of transaction between Client and SOA server
layer. For example you have to look whether transaction should be
committed in one request or multiple request provide by OOTB SOA is
acceptable.
3) Analyze what service you want to implement. Whether it will be single
request base or multiple requests which satisfy the use case.
4) Analyze what input to perform the service. This will help in defining
input data type.
5) Analyze what output will be provided for requested service and how
the output will be used. This will also help in deciding whether you
required having loose or strong binding.
These close my series on Teamcenter SOA. I thanks my friend Bhaskar for introducing me to
Teamcenter
SOA
Framework.
Hope this blogs will help good foundation for all people who want to learn Teamcenter
SOA services and serve as quick start on for using and creating own services.
Detail Steps :
1. Create a new service library in BMIDE Extensions tab by selecting
Project->Code Generation->Services
2.
Select the newly created service library (Ex: D4SoaTest) and create
new service
a.
queries->Vector of TestQueryObject
services->Teamcenter::Soa::Server::ServiceData
5.
Create Operation using the above defined data type. Select
Operations tab of the service (Ex Test Service). Click Add on to create new
operation.
a. Click on Browse button of New Service Operation dialog
a. Select
D4::Soa::Test::_2012_02::TestService::TestGetSavedQueriesRe
sponse as the return data type
a. Enter Service Operation Name: testGetSavedQueries
a. Enter Service Operation Description: SOA Operation for
getting Query List
a. Enter Return Description: List of Query Object in Teamcenter
a. Click on Finish
5.
a.
6.
Once the Operation is created, in Operation Tab when Service is
opened.
6. Save the datamodel.
9.
Check the Console view to know if the code generation is successful
or errors in other case.
9. Source and header files corresponding to each service are created.
They are placed in the following path in Navigator view:
Project->src->server->LibraryName
Ex: AccentureTest->src->server->D4SoaTest (This folder contains the files
which need to be implemented by the developer)
Project->output->client->LibraryName - This contains the auto generated
files for the client (no changes required to these files)
Project->output->server->LibraryName - This contains the auto
generated files for the server(no changes required to these files)
Project->output->types->LibraryName - This contains the auto generated
files for the data types that are created. (no changes required to these
files)
Inferences:
a.
i.
ii.
testGetSavedQueries
11.
Open the source file and enter the required code. Shown below is
the file generated in the step #8. Operation testGetSavedQueries is high
12.
a.
13.
Deploy the data model. This will deploy the library, service and
operation definitions in the template to the database as well as it copies
the built server libraries to TC_ROOT\bin. Ex Project\output\server\lib to
TC_ROOT\bin
You can now call your SOA at client site in a same way as you called
sample SOA.