T4S4-RAC GUI Examples Preference
T4S4-RAC GUI Examples Preference
T4S4-RAC GUI Examples Preference
Preference
Example
Collection
Contents
Preface 5
Legal notice:
All rights reserved. No part of this documentation may be copied by any means or made available to
entities or persons other than employees of the licensee of the Teamcenter Gateway for SAP S/4HANA®
or those that have a legitimate right to use this documentation as part of their assignment on behalf of
the licensee to enable or support usage of the software for use within the boundaries of the license
agreement.
Trademark notice:
Siemens, the Siemens logo and SIMATIC IT are registered trademarks of Siemens AG.
Camstar and Teamcenter are trademarks or registered trademarks of Siemens Product Lifecycle
Management Software Inc. or its subsidiaries in the United States and in other countries.
SAP, R/3, SAP S/4HANA®, SAP Business Suite® and mySAP are trademarks or registered trademarks of SAP
or its affiliates in Germany and other countries.
All other trademarks, registered trademarks or service marks belong to their respective holders.
The examples assume that you have installed Teamcenter 10.1.0 or higher.
The installation of T4x includes importing an initial set of preferences into Teamcenter. The preference
files presented here provide examples that go beyond that.
The names of GUI preferences have prefixes to control to which T4x product they apply to. At the time of
this writing the product-specific prefixes are T4S., T4O. or T4EA. The T4X., prefix applies to all T4x
products at the same time.
Note that there are more products in the T4x family, e.g. T4CPG. However as they do not have a GUI
component they are not covered here. Also some of the examples cannot be applied to T4EA as it does
not have a transaction window and does not support custom actions.
Note:
• In the examples the T4X., prefix is used for the preferences that could be applied to more than
one product with the same semantics. Preferences which are specific to a particular product are
prefixed with the product-specific string.
• If we ask you to modify a preference and you find that this preference does not exist yet just
create it.
• Italic font is used to mark text strings that act as placeholders or for references to other parts of
the document.
• When editing preference files and using non ASCII characters be careful to adjust your text
editor to save the file in the encoding specified in the first line of the file, e.g. UTF-8.
You sometimes will want to create new objects using preferences, for example new menu items inside
the T4x Gateway menu. You then have to invent IDs for them so they can be referenced from other
preferences. The latter you need to specify the object’s details.
There are also objects you can point to that you do not need to create, for example predefined menu
items.
The leftmost elements are T4S, T4O, T4EA or T4X. They denote the T4x GUI itself. Use T4S, T4O or T4EA
to limit the scope of the preference to that product. T4X stands for any of the first three.
The values of attributes can be IDs. Depending on the semantics of the attribute they cause the creation
of new objects or point to objects created through other preferences.
In order to reduce the number of preferences you have to create there are attributes whose values are
implicitly set to their object’s ID if not overridden by another preference. For example if you do not
provide a displayable name for a menu item its ID is used.
The elements in the middle represent chains of references from one object to another. Sometimes
references need to denote objects you created. Then the references are followed by the object’s IDs.
A preference S is called sub-preference of a preference P if S’s name is P’s name plus a dot and a string
with no dot.
Variable names are actually dot-separated paths, with the first elements naming the sources of the
variables. For example ${env.TPR} would be expanded to the value of the TPR environment variable.
env
prop
textServer
pref.default
Values of preferences where the values of array preferences are separated by newline characters
appData
Values stored in the data model of the GUI, for example ${appData.productTag} would
expand to the name of the product, or ${appData.eaShortName} to SAP, EBS, etc.
Note that just after starting the Teamcenter Rich Client the GUI logs the available environment variables
and Java system properties if you configured it accordingly.
Customers can add their own key-value pairs in files named user_property_names.xml. For
example the French key-value pairs would be added to the $TC_ROOT/lang/textserver/fr_FR/
user_property_names.xml file.
Look into the existing language files and create your own key-value pairs using copy&paste.
Caution:
• Be careful to create keys that are not in use already. We recommend prefixing them with a
string identifying your customization.
Changes to the language files need to be propagated to the Teamcenter clients. Open a command shell
with Teamcenter environment and run the following command:
You need to replace password with the password for the infodba user. For more information search the
Teamcenter documentation for generate_client_meta_cache or navigate to
Home > Administering Teamcenter > Utilities Reference > Maintenance utilities > System maintenance.
In order to stay compatible with existing configurations and with the T4x server the GUI maps
preference names to alternate names and in some cases even translates their values so they can be
evaluated by the current GUI.
According to old scheme names start with T4X_, T4S_, T4O_ or T4EA_. Note that these prefixes are fix,
so if you know about a preference that works for T4S you cannot simply make it available to all products
by simply replacing T4S_ with T4X_.
Where the new names as well as the old names are allowed only the new names will be given. If for
compatibility reasons only the old names are allowed, e.g. because the T4x server needs them, only the
old names are given.
This example demonstrates how to prevent the Gateway menu from appearing in the main menu of the
Teamcenter Rich Client:
hide_gateway_menu.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.UI.GatewayMenu.Hide" type="Logical"
array="false" disabled="false" protectionScope="Site"
envEnabled="false">
<preference_description>This preference prevents the Gateway
menu from appearing in the main menu of the Teamcenter
Rich Client
</preference_description>
<context name="Teamcenter">
<value>true</value>
</context>
</preference>
</category>
</preferences>
The GUI changes the visibility of the Gateway menu according to the current perspective.
The list of perspectives which are to contain the Gateway menu is specified through the
T4X.UI.GatewayMenu.VisibleIn array preference. If the preference is not defined the following
default will be used:
• com.teamcenter.rac.ui.perspectives.navigatorPerspective
• com.teamcenter.rac.pse.PSEPerspective
• com.teamcenter.rac.cme.pmp.PMPPerspective
• com.teamcenter.rac.cme.collaborationcontext.CollaborationContextPerspective
• com.teamcenter.rac.cme.mpp.MSEPerspective
• com.teamcenter.rac.cm.perspectives.changeManager
These list items are perspective IDs. They are independent of the language in which Teamcenter is run.
In order to find out the ID of a particular perspective you can enable GUI logging, change to the
perspective whose ID you are interested in and watch the log output.
You can also address perspectives using their labels but keep in mind that they depend on the language
in which Teamcenter was launched.
You can use asterisks to specify patterns to be matched against the name or IDs of perspectives, e.g.
com.teamcenter.rac.cme.*
In order to not having to repeat the default perspectives there are two more preferences you may use:
T4X.UI.GatewayMenu.AlsoVisibleIn
The items in this list are also used to check whether the current perspective shows the Gateway
menu or not.
T4X.UI.GatewayMenu.HiddenIn
The items in this list are used to specify perspectives in which to hide the Gateway menu. It
subtracts entries from the T4X.UI.GatewayMenu.VisibleIn (or its default if it does not exist)
and T4X.UI.GatewayMenu.AlsoVisibleIn preferences . Use it to reduce the default set of
perspectives.
gateway_menu_for_application.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
gateway_menu_for_application.xml
<preference name="T4X.UI.GatewayMenu.HiddenIn" type="Logical"
array="true" disabled="false" protectionScope="Site"
envEnabled="false">
<preference_description>This preference lists the applications
which will not contain the Gateway menu
</preference_description>
<context name="Teamcenter">
<value>*.changeManager</value>
</context>
</preference>
<preference name="T4X.UI.GatewayMenu.AlsoVisibleIn" type="Logical"
array="true" disabled="false" protectionScope="Site"
envEnabled="false">
<preference_description>This preference lists the applications
which will contain the Gateway menu
</preference_description>
<context name="Teamcenter">
<value>*.ClassificationPerspective</value>
</context>
</preference>
</category>
</preferences>
This is about the last section. Only the menu item to show the connections to the EA systems is available
out of the box. You can change this by modifying the T4X.PredefinedMenuItems preference. Just
enter the IDs of the menu items you want to appear in the Gateway menu.
The IDs are as follows (The values in parentheses are also valid for compatibility reasons):
Menu item to open the window showing the connections to the EA systems
ShowLog (SHOW_LOG)
Menu item to open the window showing the logging information for the selected Teamcenter
object
ShowCustomData
Menu item to open the data view; this serves as a short cut for Window → Show View → Other...
→ Teamcenter Gateway → SAP Data
This example demonstrates how to enable all predefined menu items in the Gateway menu.
show_all_predefined.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.PredefinedMenuItems" type="String"
array="true" disabled="false" protectionScope="Site"
envEnabled="false">
<preference_description>This preference specifies which
predefined menu items to enable in the Gateway menu.
</preference_description>
<context name="Teamcenter">
<value>ShowCustomData</value>
<value>SHOW_LOG</value>
<value>CONNECT</value>
</context>
</preference>
</category>
</preferences>
3.4 Custom_menu_items
Custom menu items receive their own chapter. See Custom menu items
4.2 Compatibility
In order to ease sharing parts of the configuration between the various products of T4x we tried to find
names for the EA object types which abstract from the EA system. For example the SAP-specific name
"Document Info Record" became "Document". We call them generic names and use them for the IDs of
the EA object types. The names which are specific for the EA systems remain existent in the
displayName, wireName and shortWireName attributes. For example for the "Document" type the SAP-
specific names are "Document Info Record", "DocumentInfoRecord" and "DIR" resp.
However in cases where the communities around the various EA systems have strongly gotten used to
particular names we went back to more EA-specific names. For example the terms "Material", "Item" and
"Article" describe similar concepts in T4S, T4O and T4EA resp.
In order to add a new menu item to the Gateway menu simply invent an ID for it and add it to the
T4X.CustomMenuItems preference. The ID will be added to the menu just below the automatically
generated items for the EA object types. It is still disabled i.e. clicking on it has no effect and it appears
grayed out. This will change as soon as we connect it with some sort of operation. See Assign a custom
action to a custom menu item.
By default the menu items is displayed with its ID. IF you want it to be presented with a name that
differs from its ID create the DisplayName sub-preference and set it to the desired name. This is a
template preference. Consult Template preferences to learn more about them.
If you want a menu item to be represented with an icon create the Icon sub-preference and set it to the
desired path. This is a template preference so you can use placeholders to build up the path to the icon.
Consult Template preferences to learn more about them.
A separator is a horizontal line you can add to the menu to visually separate your custom menu items
from the automatically generated ones or from each another. A menu item becomes a separator if it is
given the special ID :separator . In contrast to regular IDs this one can appear more than once among
the custom menu items.
5.2.5 Example: create a menu item with a display name and an icon
Just for the purpose of demonstration we copied the newprocess.png image file out of Teamcenter to
the directory where the Teamcenter Rich Client is installed. The icon it contains will then appear on the
left side of the menu item's name:
add_menu_item.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.CustomMenuItems" type="String" array="true"
disabled="false" protectionScope="Site" envEnabled="false">
<preference_description>This preference lists the top level
custom menu items.
</preference_description>
<context name="Teamcenter">
<value>:separator</value>
<value>MyMenuItem</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.MyMenuItem.DisplayName"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a display
name for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>My Menu Item</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.MyMenuItem.Icon"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies the path of
an icon for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>${env.TPR}/newprocess.png</value>
</context>
</preference>
</category>
</preferences>
Try it with your own image file. You can use image files in the PNG or GIF format. Their names should
end with .png or .gif. If they don't the GUI appends these file name extensions to the names of the
image files and tries to load them with these names.
Merge preference values in the database with values in the XML files
This example demonstrates how to place the separator and the menu item introduced in the previous
example at the top of the menu item.
positioned_menu_items.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.CustomMenuItems" type="String" array="true"
disabled="false" protectionScope="Site" envEnabled="false">
<preference_description>This preference lists the top level
custom menu items.
</preference_description>
<context name="Teamcenter">
<value>Sep1:separator</value>
<value>MyMenuItem</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.Sep1:separator.Position"
type="Integer" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a position
for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>2</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.MyMenuItem.DisplayName"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a display
positioned_menu_items.xml
name for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>My Menu Item</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.MyMenuItem.Icon"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies the path of
an icon for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>${env.TPR}/newprocess.png</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.MyMenuItem.Position"
type="Integer" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a position
for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>2</value>
</context>
</preference>
</category>
</preferences>
5.4 Add a sub menu with a menu item to the Gateway menu
A custom menu item becomes a sub menu if you add the IDs of the subordinate menu items to its
SubItems sub-preference.
This example demonstrates how to place the menu item introduced in the first example inside a
subordinate menu.
sub_menu.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.CustomMenuItems" type="String"
array="true" disabled="false" protectionScope="Site"
sub_menu.xml
envEnabled="false">
<preference_description>This preference lists the top level
custom menu items.
</preference_description>
<context name="Teamcenter">
<value>:separator</value>
<value>MySubMenu</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.MySubMenu.DisplayName"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a display
name for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>My Sub Menu</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.MySubMenu.SubItems"
type="String" array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference lists the items of a
subordinate menu.
</preference_description>
<context name="Teamcenter">
<value>MyMenuItem</value>
</context>
</preference>
<preference
name="T4X.CustomMenuItems.MySubMenu.SubItems.MyMenuItem.DisplayName"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a display
name for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>My Menu Item</value>
</context>
</preference>
<preference
name="T4X.CustomMenuItems.MySubMenu.SubItems.MyMenuItem.Icon"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies the path
of an icon for a custom menu item.
</preference_description>
sub_menu.xml
<context name="Teamcenter">
<value>${env.TPR}/newprocess.png</value>
</context>
</preference>
</category>
</preferences>
In order to connect a custom menu item to a command create the Command sub-preference plus the
CommandId sub-preference and set the latter to the ID of the command to be invoked through the
custom menu item.
Command IDs are typically dot separated paths starting with the name of the plug-in in which they are
implemented. They are specified in the plugin.xml files inside the .jar files below the portal/
plugins directory of the Teamcenter installation directory.
This example demonstrates how to invoke a parameter-less command through a custom menu item.
The command opens the dialog to create a new workflow process. Note that it does not allow the
specification of the details of the process such as the name of the workflow template.
If you simply want to create a process by-passing the dialog you need to do so using custom actions with
WORKFLOW mode.
new_process_command_menu_item.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.CustomMenuItems" type="String"
array="true" disabled="false" protectionScope="Site"
envEnabled="false">
<preference_description>This preference lists the top level
custom menu items.
</preference_description>
<context name="Teamcenter">
<value>:separator</value>
<value>NewProcess</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.NewProcess.DisplayName"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a display
name for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>Create a new Workflow Process</value>
</context>
</preference>
<preference
name="T4X.CustomMenuItems.NewProcess.Command.CommandId"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description> This preference specifies the
command id of the command to be invoked through this
custom menu item.
</preference_description>
<context name="Teamcenter">
<value>com.teamcenter.rac.newProcess</value>
</context>
</preference>
</category>
</preferences>
Note that most commands bring their own icon so you do not need to specify one for the menu item.
In order to specify parameters for a command connected to a custom menu item you need to create the
Parameters sub-preference with the IDs of the parameters. Below that create the Value sub-
preference with the value of the parameter. If you choose the IDs to be equal to the names of the
parameters you're done. Otherwise create the Name sub-preferences with the names of the parameters.
This example demonstrates how to invoke a command with a parameter through a custom menu item.
The command opens the wizard to create a new Document type. The type can be revised in the dialog
that opens when the user clicks on the menu item.
new_item_command_menu_item.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.CustomMenuItems" type="String"
array="true" disabled="false" protectionScope="Site"
envEnabled="false">
<preference_description>This preference lists the top
level custom menu items.
</preference_description>
<context name="Teamcenter">
<value>:separator</value>
<value>NewItem</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.NewItem.DisplayName"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a
display name for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>Create a new Workflow Process</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.NewItem.Command.CommandId"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies the
command id of the command to be invoked through this
custom menu item.
</preference_description>
<context name="Teamcenter">
<value>com.teamcenter.rac.common.AddNew</value>
</context>
</preference>
new_item_command_menu_item.xml
<preference name="T4X.CustomMenuItems.NewItem.Command.Parameters"
type="String" array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference lists the
parameters of the command to be invoked through this
custom menu item.
</preference_description>
<context name="Teamcenter">
<value>objecttype</value>
</context>
</preference>
<preference
name="T4X.CustomMenuItems.NewItem.Command.Parameters.objecttype.Value"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies the
value of a command parameter.
</preference_description>
<context name="Teamcenter">
<value>Document</value>
</context>
</preference>
</category>
</preferences>
1. Predefined actions are those which are defined out of the box. In general the sets of actions are
different for every product of T4x. For example T4S comes with Create, Create Direct, Change,
Change Hidden, Display, etc.
2. They only appear in the Gateway menu if they belong to use cases which are configured for the
GUI. Some actions normally never appear in the Gateway menu because they get invoked
independently from use cases. For example the ShowCustomData action is executed whenever the
user requests data from the EA system to be displayed in the Data View.
The details of these actions need to be modified only rarely. For example the admin may want to by-pass
the transaction window for read-only actions.
Custom actions can be defined by the admin to provide the user with additional functionalities, for
example to start a particular workflow. The admin most probably wants to adjust their details to fit the
user's need.
Both types of actions share most of their attributes, so the tweaking you can apply to custom actions can
in many cases also be applied to predefined actions.
Some attributes get set through preferences which are also or even exclusively evaluated by the T4x
server. The names of such preferences start with T4S_, T4O_ or T4EA_ but not T4X_. In the following
such attributes are given with their preference names where MenuItemId stands for the ID of the menu
item and T4?_ for the product-specific prefix.
AutoPerform : logical
If set to true the action will be executed immediately without waiting for the user to click on the
transaction window's Perform button. The transaction window will open no matter the value of
this preference. Compare with SilentPerform .
SilentPerform : logical
If set to true the action will be executed immediately completely by-passing the transaction
window. Compare with AutoPerform .
RefreshTcObject : logical
If set to true the Teamcenter object on which to apply the action will be refreshed after executing
the action so changes of its attributes become visible. This is useful for actions that change the
state of the Teamcenter object.
RequiresEaConnection : logical
If set to true the GUI will ensure that the connection to the EA system has been established before
executing the action.
ProvideFeedback : logical
If set to true a dialog window will appear upon a successfully completed action.
OpenUrl : logical
If set to true If set to true the action is supposed to return a URL which will then be opened in a
HTML browser.
T4?_Gateway_Menu_Custom_MenuItemId_ObjectType : String
T4?_Gateway_Menu_Custom_MenuItemId_ObjectDataRequired : logical
The list of types of Teamcenter objects which may be passed with the action
The following attributes, given with the names of the corresponding preferences, are exclusively
evaluated by the T4x server:
T4?_Gateway_Menu_Custom_MenuItemId_Mode : String
• If the value is WORKFLOW this custom action creates a new workflow process. The process is
further specified by a number of preferences which correspond to text fields the user can fill out
in the New Process Dialog dialog.
The preferences are as follows:
T4?_Gateway_Menu_Custom_MenuItemId_Mode : String
If the value is WORKFLOW this custom action creates a new workflow process. The process is
further specified by a number of preferences which correspond to text fields the user can
fill out in the New Process Dialog dialog.
The preferences are as follows:
T4?_Gateway_Menu_Custom_MenuItemId_JobDescription : String
T4?_Gateway_Menu_Custom_MenuItemId_JobName : String
Corresponds to the Process Name field in the New Process Dialog dialog.
T4?_Gateway_Menu_Custom_MenuItemId_ProcedureName : String
Corresponds to the Process Template field in the New Process Dialog dialog.
• If the value is not WORKFLOW this custom action causes the invocation of a TCL procedure which
must be defined in a .sd file below the var/mmap directory inside the T4x installation directory.
The procedure receives the single parameter TransactionId. It is further specified by the
following preferences:
T4?_Gateway_Menu_Custom_MenuItemId_ObjectCustomCall : String
Take the regular mapping procedues as blueprints to implement these kind of Tcl procedures.
This example demonstrates how to create a new workflow process through a custom action. The custom
action calls into the T4x server which performs the actual task of creating the process.
This example configures T4x to create the new process from the T4S_MM template shipped with T4S.
Note that T4x requires the process name and description to be set although these don't have to be set in
the New Process Dialog dialog.
new_process_custom_action.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.CustomMenuItems" type="String"
array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference lists the top level
custom menu items.
</preference_description>
<context name="Teamcenter">
<value>:separator</value>
<value>NewT4SMMProcess</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.NewT4SMMProcess.DisplayName"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a display
name for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>New T4S_MM Workflow Process</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.NewT4SMMProcess.Icon"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies the path
of an icon for a custom menu item.
</preference_description>
<context name="Teamcenter">
<value>${env.TPR}/newprocess.png</value>
</context>
</preference>
<preference name="T4S_Gateway_Menu_Custom_NewT4SMMProcess_Mode"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
new_process_custom_action.xml
<preference_description> This preference specifies whether
this custom action is supposed to create a new workflow
process or to invoke a TCL procedure. In the first case
the value would be WORKFLOW. Anything else would cause a
TCL procedure to be invoked.
</preference_description>
<context name="Teamcenter">
<value>WORKFLOW</value>
</context>
</preference>
<preference name="T4S_Gateway_Menu_Custom_NewT4SMMProcess_TypeList"
type="String" array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description> This preference specifies the list
of types of Teamcenter objects which may be passed with
the action.
</preference_description>
<context name="Teamcenter">
<value>SAP2_T4S_Item Revision</value>
</context>
</preference>
<preference
name="T4S_Gateway_Menu_Custom_NewT4SMMProcess_ObjectType"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description> This preference specifies the EA
object type to which this action applies e.g.
"MaterialMaster".
</preference_description>
<context name="Teamcenter">
<value>MaterialMaster</value>
</context>
</preference>
<preference
name="T4S_Gateway_Menu_Custom_NewT4SMMProcess_ProcedureName"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description> This preference specifies the name
of the workflow template from which to instantiate the
new process. It corresponds to the "Process Template"
field in the "New Process" dialog.
</preference_description>
<context name="Teamcenter">
<value>T4S_MM</value>
</context>
</preference>
<preference name="T4S_Gateway_Menu_Custom_NewT4SMMProcess_JobName"
type="String" array="false" disabled="false"
new_process_custom_action.xml
protectionScope="Site" envEnabled="false">
<preference_description> This preference specifies the name
of the workflow process to be created. It corresponds to
the "Process Name" field in the "New Process" dialog.
</preference_description>
<context name="Teamcenter">
<value>T4S MM through custom action</value>
</context>
</preference>
<preference
name="T4S_Gateway_Menu_Custom_NewT4SMMProcess_JobDescription"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description> This preference specifies the
description of the workflow process to be created. It
corresponds to the "Description" field in the "New
Process" dialog.
</preference_description>
<context name="Teamcenter">
<value>T4S MM through custom action</value>
</context>
</preference>
</category>
</preferences>
This example demonstrates how to call a TCL procedure defined in a .sd file in the var/mmap directory.
You can try it with T4S. For the other T4x products just replace the T4S-specific prefixes with those of
the desired product. The example writes the contents of the global ::TcData array to the session log
file.
You need to perform some extra steps to make the example running:
1. Create the t4s_custom_actions.sd file inside the var/mmap directory and copy&paste the
following lines into it:
t4s_custom_actions.sd
namespace eval ::T4S::CUSTOM::MAPPING {
namespace export dumpTcData
t4s_custom_actions.sd
log " \$::TcData($key) = \"$::TcData($key)\""
}
set ::StatusInfo(ReverseMappingStatus) \
[::T4S::MM::MAPPING::SAP_MaterialMaster2TC_Object \
$TransactionId SKIPPED {}]
return SKIPPED
}
procedure_custom_action.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.CustomMenuItems" type="String"
array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference lists the top level
custom menu items.
</preference_description>
<context name="Teamcenter">
<value>:separator</value>
<value>LogTcData</value>
</context>
</preference>
<preference name="T4X.CustomMenuItems.LogTcData.DisplayName"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies a display
name for a custom menu item.
</preference_description>
procedure_custom_action.xml
<context name="Teamcenter">
<value>Log TcData Array</value>
</context>
</preference>
<preference name="T4S_Gateway_Menu_Custom_LogTcData_Mode"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies whether
this custom action is supposed to create a new workflow
process or to invoke a TCL procedure. In the first case
the value would be WORKFLOW. Anything else would cause a
TCL procedure to be invoked.
</preference_description>
<context name="Teamcenter">
<value>INTERACTIVE</value>
</context>
</preference>
<preference name="T4S_Gateway_Menu_Custom_LogTcData_TypeList"
type="String" array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies the list
of types of Teamcenter objects which may be passed with
the action.
</preference_description>
<context name="Teamcenter">
<value>SAP2_T4S_Item Revision</value>
</context>
</preference>
<preference name="T4S_Gateway_Menu_Custom_LogTcData_ObjectType"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies the EA
object type to which this action applies e.g.
"MaterialMaster".
</preference_description>
<context name="Teamcenter">
<value>MaterialMaster</value>
</context>
</preference>
<preference
name="T4S_Gateway_Menu_Custom_LogTcData_ObjectCustomCall"
type="String" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference specifies the fully
qualified name of the procedure to invoke.
</preference_description>
<context name="Teamcenter">
<value>::T4S::CUSTOM::MAPPING::logTcData</value>
procedure_custom_action.xml
</context>
</preference>
</category>
</preferences>
This example demonstrates how to avoid a log-on dialog to pop up before fetching data from an EA
system to be presented in the Data View.
Note:
If you follow this example be aware that the connection to the EA system must be established by
other means. The recommended way to avoid having the user to log into EA systems is to set up
automatic login. How to do so depends on the EA system and thus on the T4x product. Search the
T4x documentation for the term Auto Login.
suppress_log-on.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference
name="T4X.Actions.ShowCustomData.RequiresEaConnection"
type="Logical" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference avoids a log-on
dialog being opened before executing the action.
</preference_description>
<context name="Teamcenter">
<value>false</value>
</context>
</preference>
</category>
</preferences>
This example demonstrates how to let read-only actions execute immediately by-passing the transaction
window. This is not not applicable to T4EA as it does not have a transaction window.
by-pass_tx_window.xml
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.Actions.Display.SilentPerform"
type="Logical" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference lets this action
execute immediately by-passing the transaction window.
</preference_description>
<context name="Teamcenter">
<value>true</value>
</context>
</preference>
<preference name="T4X.Actions.HttpDisplay.SilentPerform"
type="Logical" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference lets this action
execute immediately by-passing the transaction window.
</preference_description>
<context name="Teamcenter">
<value>true</value>
</context>
</preference>
<preference name="T4X.Actions.ProductStructure.SilentPerform"
type="Logical" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference lets this action
execute immediately by-passing the transaction window.
</preference_description>
<context name="Teamcenter">
<value>true</value>
</context>
</preference>
<preference name="T4X.Actions.HttpProductStructure.SilentPerform"
type="Logical" array="false" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference lets this action
execute immediately by-passing the transaction window.
</preference_description>
<context name="Teamcenter">
<value>true</value>
</context>
</preference>
</category>
</preferences>
As mentioned in section Compatibility layer the current GUI uses a different naming scheme. Moreover
it allows for a more fine-grained use case based assignment between EA and TC object types that also
includes the action. By default the GUI uses the old naming scheme. It is however possible to override
preferences following the old scheme by ones following the new scheme.
ShowCustomData is the ID of the action that fetches and displays data from EA systems. The ID of a use
case results from appending the ID of an EA object type. So ShowCustomDataMaterial would be the
ID of the “show the data of an SAP MaterialMaster” use case.
In order to avoid EA object types appearing in the data view’s EA object type chooser you would set the
T4X.UseCases.ShowCustomDataEaObjectTypeID.SupportedTcObjectTypes preference to a
value that does not identify a Teamcenter object type, e.g. NONE, replacing EaObjectTypeID with the ID
of an EA object type.
The following example removes the Change and Equipment types from the EA object type chooser:
suppress_target_types_for_data_view.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences version="10.0">
<category name="SAP Gateway">
<category_description></category_description>
<preference
name="T4X.UseCases.ShowCustomDataChange.SupportedTcObjectTypes"
type="String" protectionScope="Site" array="true"
disabled="false" envEnabled="false">
suppress_target_types_for_data_view.xml
<preference_description> This preference specifies the
Teamcenter types that are supported for the data view
when it shows data for the Change target type.
</preference_description>
<context name="Teamcenter">
<value>NONE</value>
</context>
</preference>
<preference
name="T4X.UseCases.ShowCustomDataEquipment.SupportedTcObjectTypes"
type="String" protectionScope="Site" array="true"
disabled="false" envEnabled="false">
<preference_description> This preference specifies the
Teamcenter types that are supported for the data view
when it shows data for the Equipment target type.
</preference_description>
<context name="Teamcenter">
<value>NONE</value>
</context>
</preference>
</category>
</preferences>
Attributes
CustomData
shows the ERP Data view (e.g. for T4S: the “SAP Data view”)
Status
shows the detailed status messages, particularly the last error message
The following example changes the transaction window so that it only shows the transaction status and
the atributes of the Teamcenter object in that order.
tabs_in_transaction_window.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences version="10.0">
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.UI.Transaction.Tabs" type="String"
protectionScope="Site" array="true" disabled="false"
envEnabled="false">
<preference_description> This preference specifies the
presence and order of the tabs in the transaction
window of the T4x RAC UI
tabs_in_transaction_window.xml
</preference_description>
<context name="Teamcenter">
<value>Status</value>
<value>Attributes</value>
</context>
</preference>
</category>
</preferences>
EaConnection
A chooser widget allowing the user to choose the EA system to connect with
EaObjectType
A chooser widget allowing the user to choose the type of the EA object (= target type); The EA
object is associated with the selected Teamcenter object and typically the result of a data transfer.
Separator
A vertical bar used to visually separate the control widgets from each other
LastRefreshed
Progress
A progress indicator as an icon showing whether a refresh operation is in progress, has finished
with success or with an error
Separator
Another vertical bar used to visually separate the control widgets from each other
Refresh
data_view_control_panel.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences version="10.0">
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.UI.CustomData.ControlWidgets"
type="String" protectionScope="Site" array="true"
disabled="false" envEnabled="false">
<preference_description>This preference specifies the
presence and order of the widgets in the data view's
control panel
</preference_description>
<context name="Teamcenter">
<value>Refresh</value>
<value>EaObjectType</value>
<value>Progress</value>
</context>
</preference>
</category>
</preferences>
This example reduces the control panel to contain only the refresh button the EA object type chooser
and the progress indicator as shown in the figure below. Compare this with the figure at the beginning
of this section. Note how the position of the control panel has changed due to its smaller width. It has
moved from the view to the tab header leaving more vertical space for the EA data:
If T4x is configured to always use a single connection it makes sense to hide the connection chooser.
In order to control its height you may change the T4X.UI.EaConnections.Height preference. It
defaults to 200 pixel which provide enough space for four entries without having to scroll down.
change_dimensions.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences version="10.0">
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.UI.EaConnections.Height"
type="String" protectionScope="Site" array="false"
disabled="false" envEnabled="false">
<preference_description> This preference specifies the
height of the Connections Window of the RAC UI
</preference_description>
<context name="Teamcenter">
<value>300</value>
</context>
</preference>
</category>
</preferences>
If you replace Height with Width you can modify the initial width of a window or dialog.
In order to modify the dimensions of other types of UI elements you can replace EaConnections with
their IDs as listed below:
EaConnections
Transaction
Messages
ShowLog.InternalBrowser
The browser window shown when Show Log is selected from the Gateway menu
ShowWebPage.InternalBrowser
The browser window shown for actions that return URLs or for hyperlink elements placed in the
data view
By default message details with up to ten lines are immediately shown. When they have more lines they
are hidden and the user must click on the title to make them visible.
The below example sets the value to 0 meaning that the details will be initially hidden.
message_details_appearance.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences version="10.0">
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.UI.Messages.Details.ExpandedMaxLines"
type="Integer" protectionScope="Site" array="false"
disabled="false" envEnabled="false">
<preference_description>This preference specifies how the
details part of message boxes of the T4x RAC UI are
displayed
</preference_description>
<context name="Teamcenter">
message_details_appearance.xml
<value>0</value>
</context>
</preference>
</category>
</preferences>
The example below changes the name of the Gateway menu from “T4S Gateway” to “SAP”, . “T4O
Gateway” to “EBS” or “T4EA Gateway” to “EA”
Note that ${appData.eaShortName} acts as a placeholder that expands to “SAP” in case of T4S, to
“EBS” in case of T4O or to “EA” in case of T4EA. You can also use placeholders to provide language
specific labels. See Template preferences.
change_labels.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences version="10.0">
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4X.UI.GatewayMenu.Label" type="String"
protectionScope="Site" array="false" disabled="false"
envEnabled="false">
<preference_description>This preference specifies the
label of the Gateway menu of the T4x RAC UI
</preference_description>
<context name="Teamcenter">
<value>${appData.eaShortName}</value>
</context>
</preference>
</category>
</preferences>
The presentation of the Attributes tab in the Transaction window is determined by so called stylesheets
(also known as XML Rendering Templates, XRT). In Teamcenter a stylesheet is represented as a data set
of XMLRenderingStylesheet type with a single XML file. For their format please consult the
documentation shipped with Teamcenter. The names of the XML files end with .xml in contrast to the
names of the data sets.
Caution:
When importing files into data sets Teamcenter suggests using their names for the data sets. Take
care to remove the .xml file name extensions from the data set names.
Each stylesheet declaration points to a single stylesheet. Multiple stylesheet declarations may point to
the same stylesheet.
You would normally choose the name of the data set for the ID in order to let a stylesheet declaration
point to a stylesheet. If there is a requirement to give them different values create the Rendering sub-
preference and set it to the name of the data set.
The type of the object in the EA system to which the transaction is applied
EA connection
The type of the object in Teamcenter to which the transaction is applied, e.g. Design Revision
TC object type
The type of the object in Teamcenter to which the transaction is applied, e.g. Design Revision
Type Hierarchy
A list containing the Teamcenter object type and all its super types, starting with the Teamcenter
object type
The principle by which the GUI selects the most suitable stylesheet is then pretty simple:
It starts by creating a list of stylesheet declarations which gets initialized with the content of the
T4X.AttributesStylesheets preference. We will call this the candidates list.
It then walks through the list of candidates in the order given by the preference and throws out those
ones that are not suitable with respect to a particular transaction attribute, for example the type of the
selected object. In other words it removes stylesheet declarations that have been trimmed to require a
particular transaction attribute and that requirement is not fulfilled.
It repeats the step above but this time taking another attribute into account.
Filtering with all attributes eventually results in a new candidates list. If it is empty a built-in default
stylesheet will be used. Otherwise the first one determines the rendering.
EaObjectTypes
This array sub-preference must contain the EA object type (also known as target type) of the
selected transaction for the stylesheet declaration to remain in the candidates list. If not given or
empty all EA object types will be accepted.
EaConnections
This array sub-preference must contain the EA connection of the selected transaction for the
stylesheet declaration to remain in the candidates list. If not given or empty all EA connections will
be accepted.
Types
This array sub-preference must contain one of the types from the type hierarchy of the selected
transaction for the stylesheet declaration to remain in the candidates list. If not given or empty all
Teamcenter object types will be accepted.
The T4x GUI starts with the first type of the type hierarchy and goes through the entire candidates
list until it finds a stylesheet declaration whose Types attribute contains that type. If it finds one,
that will be used for the rendering. Otherwise the GUI continues with the second type of the type
hierarchy and so on.
This way you can specialize a stylesheet for particular type (e.g. Design Revision) and have a
fallback stylesheet for its super types (e.g. ItemRevision).
Example:
This example is inspired by the set of preferences shipped with Teamcenter Gateway for SAP Business
Suite (T4S). Note that it contains two stylesheet declarations for SAP documents, one for DataSets and
another one for ItemRevisions:
stylesheet_declarations.xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<category name="SAP Gateway">
<category_description></category_description>
<preference name="T4S.AttributesStylesheets" type="String"
array="true" disabled="false" protectionScope="Site"
envEnabled="false">
<preference_description>This preference defines the list
of style sheets available for the T4S transaction
window
</preference_description>
<context name="Teamcenter">
<value>T4SStylesheetMaterial</value>
<value>T4SStylesheetDocument4Dataset</value>
<value>T4SStylesheetDocument4ItemRevision
</value>
</context>
</preference>
<preference
name="T4S.AttributesStylesheets.T4SStylesheetMaterial.EaObjectTypes"
type="String" array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference assigns a given
style sheet (defined by the corresponding
stylesheet_declarations.xml
T4S.AttributesStylesheets preference) to a defined
transfer target of the target system
</preference_description>
<context name="Teamcenter">
<value>Material</value>
</context>
</preference>
<preference
name="T4S.AttributesStylesheets.T4SStylesheetDocument4Dataset.EaObjectTypes
"
type="String" array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference assigns a given
style sheet (defined by the corresponding
T4S.AttributesStylesheets preference) to a defined
transfer target of the target system
</preference_description>
<context name="Teamcenter">
<value>Document</value>
</context>
</preference>
<preference
name="T4S.AttributesStylesheets.T4SStylesheetDocument4Dataset.Types"
type="String" array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>The preference assigns a given
style sheet (defined by the corresponding
T4S.AttributesStylesheets preference) to a defined
transfer source of the source system
</preference_description>
<context name="Teamcenter">
<value>DirectModel</value>
<value>UGMASTER</value>
<value>MSWord</value>
</context>
</preference>
<preference
name="T4S.AttributesStylesheets.T4SStylesheetDocument4ItemRevision.EaObject
Types"
type="String" array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>This preference assigns a given
style sheet (defined by the corresponding
T4S.AttributesStylesheets preference) to a defined
transfer target of the target system
stylesheet_declarations.xml
</preference_description>
<context name="Teamcenter">
<value>Document</value>
</context>
</preference>
<preference
name="T4S.AttributesStylesheets.T4SStylesheetDocument4ItemRevision.Types"
type="String" array="true" disabled="false"
protectionScope="Site" envEnabled="false">
<preference_description>The preference assigns a given
style sheet (defined by the corresponding
T4S.AttributesStylesheets preference) to a defined
transfer source of the source system
</preference_description>
<context name="Teamcenter">
<value>SAP2_T4S_Item Revision</value>
</context>
</preference>
</category>
</preferences>
Asia-Pacific
Americas Suites 4301-4302, 43/F
Granite Park One AIA Kowloon Tower, Landmark East
5800 Granite Parkway 100 How Ming Street
Suite 600 Kwun Tong, Kowloon
Plano, TX 75024 Hong Kong
USA +852 2230 3308
+1 314 264 8499