Saturday, September 24, 2011

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 service active then required to change the isactive value to true.
The TransExecutable element define the location of Translator root directory and name of exe or bat required to call for translation. In above example jttocatiav5.bat will be invoked located at d:/Siemens /DISPAT~1/Module/Translators/jttocatia/v5 location.
The Options element define what argument required to be pass. In above example two arguments with –i and –o with their value will pass by Module will to jttocatiav5.bat. The Module will convert the above config while calling actual jttocatia translator as follows.
d:/Siemens /DISPAT~1/Module/Translators/jttocatia/v5 location/ jttocatiav5.bat -i {Input file dir} –o {outputfiledir}
The inputfile dir and outputfile dir will get at run time through DispatcherClient component through Scheduler Component.
The FileExtensions define the input and output extension expected for this Translator. In this example the input file will of .jt and output is of type .CATPart or .CatProduct.
Apart from this Module has transmodule.properties file which detail has related scheduler rmi port and staging root directory configured. The Module can be run by runmodule.bat present in bin subfolder. Lib store all Jar file correspond to scheduler.
DispatcherClient: This is the component which interfaces with Teamcenter. Its main job is to fetch data files Teamcenter and upload translated file to Teamcenter. Once installed the DispatcherClient directory structure created as shown below.



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 don’t 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 done to make any COTS translator active
1) Modify Translator.xml inside Module/conf folder. Make service active by changing isactive attribute to true. See Translator.xml image above.
2) Change the core bat file for that translator present in root service directort and provide all required variable value like tc_root, tc_data,ug_root etc. For example in jttocatiaV5 translator required to provide UGS_LICENSE_SERVER in catiav5tojt.bat file.
3) Verify following preference are present in Teamcenter to enable it in Teamcenter.

a. ETS.PROVIDERS : Provide list of Translator provider. SIEMENS is a default value. So in case of configuring COTS translation, will required to change any thing.
b. ETS.TRANSLATORS.. This provide list of Translation available by provider. So for COTS configuration required translation service name for preference ETS.TRANSLATORS.SIEMENS. For example for jttocatiav5 is required to be added here.
c. ETS... : Provide list of Business Object type on which this translator can be invoked as primary object. For example in case of jttocatiav5 it should be invoked for JT dataset type only. Then the preference required to be set is ETS.DATASETTYPES.SIEMENS.JTTOCATIAV5 with multi-value and value as JtSimplification and other dataset type which support JT files.
There are other preference which are optional.


See Also :
Dispatcher Framework
Customizing Translation Services

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Thank you Manoj sir for the detail information. This information helped a lot in creating Dispatcher services.

    ReplyDelete