34
Erich Brauchli – PLM-Consulting Erich Brauchli – PLM-Consultin Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli g Teamcenter Enterprise: Guidelines for Customizing Volume ITI-MTI-D Written by Erich Brauchli March 2, 2008 Version 9.12 Reflecting Teamcenter ® Enterprise 2005 Email: [email protected] Internet: http://www.brauchli.info (Total 34 pages) Entire List of Teamcenter Documents: ITI-MTI-A Guidelines for Planing and Operation ITI-MTI-B Guidelines for Setup and Configuration ITI-MTI-C Guidelines for Oracle Setup and DB Configuration ITI-MTI-D Guidelines for Customizing ITI-MTI-E Rules D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 1/34

Teamcenter Enterprise: Guidelines for Customizing Enterprise: Guidelines for Customizing Erich Erich Brauchli Brauchli – – PPLM-Consulting LM-Consultin 2. March 2008 (V9.12)

Embed Size (px)

Citation preview

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-ConsultinTeamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

g

Teamcenter Enterprise: Guidelines for Customizing

Volume ITI-MTI-D Written by

Erich Brauchli

March 2, 2008

Version 9.12

Reflecting Teamcenter® Enterprise 2005

Email: [email protected] Internet: http://www.brauchli.info

(Total 34 pages)

Entire List of Teamcenter Documents: ITI-MTI-A Guidelines for Planing and Operation ITI-MTI-B Guidelines for Setup and Configuration ITI-MTI-C Guidelines for Oracle Setup and DB Configuration ITI-MTI-D Guidelines for Customizing ITI-MTI-E Rules

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 1/34

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 2/34

Content 1 General Remark ................................................................................................................................................3 2 Memory Management .......................................................................................................................................3

2.1 Pointers ......................................................................................................................................................................3 2.2 Low Level Routines ....................................................................................................................................................4 2.3 Character Arrays ........................................................................................................................................................4 2.4 Strings got from Objects.............................................................................................................................................4

2.4.1 objGetAttribute ........................................................................................................................................4 2.4.2 objClass ..................................................................................................................................................5

2.5 Nature of pointer types / releasing routines................................................................................................................5 2.5.1 SetOfStrings............................................................................................................................................5 2.5.2 Char* ≡ string ..........................................................................................................................................5 2.5.3 SetOfObjects ...........................................................................................................................................5 2.5.4 ObjectPtr .................................................................................................................................................5 2.5.5 NVSET ....................................................................................................................................................6 2.5.6 SqlPtr ......................................................................................................................................................6 2.5.7 SetPtr ......................................................................................................................................................6

2.6 String handling ...........................................................................................................................................................6 2.7 Freeing Arguments.....................................................................................................................................................7

2.7.1 Update-Parameter...................................................................................................................................7 2.7.2 Output Parameter....................................................................................................................................7

2.8 IML-Methods ..............................................................................................................................................................7 2.9 Calling next Methods..................................................................................................................................................7

3 Relations ...........................................................................................................................................................8 3.1 Rules for Relations .....................................................................................................................................................8 3.2 Handle Relations at MakeItemRevisionDP, CheckOutItemDP, CheckInItemDP, …..................................................8 3.3 Customized Structure Relations.................................................................................................................................9

4 General Action Flow .........................................................................................................................................9 5 Status Handling ..............................................................................................................................................10

5.1 ‘dstat’ ........................................................................................................................................................................10 5.2 ‘mfail’ ........................................................................................................................................................................10 5.3 Samples ...................................................................................................................................................................11

5.3.1 Sample Method Code ...........................................................................................................................11 5.3.2 Values of ‘*mfail’ used in Teamcenter Enterprise .................................................................................12 5.3.3 Reporting „Database Integrity Error“ .....................................................................................................27

6 User Interface..................................................................................................................................................27 6.1 Multipel Locales........................................................................................................................................................27

6.1.1 Sample text definition:...........................................................................................................................27 6.1.2 AWK script sample “generate.second.locale” .......................................................................................28

6.2 Dialog Editor.............................................................................................................................................................28 7 Query Scopes..................................................................................................................................................29 8 Some sample codes .......................................................................................................................................30 9 Miscallaneous .................................................................................................................................................31

9.1 Custom Servers........................................................................................................................................................31 9.2 Subclassing and Methods ........................................................................................................................................31

10 Upgrade: Obsolete / deprecated messages and objects ............................................................................32 10.1 Obsolete Items .........................................................................................................................................................32 10.2 Deprecated Items .....................................................................................................................................................32 10.3 Usage of ‘vfysourc’ ...................................................................................................................................................32

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-ConsultinTeamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

g

1 General Remark This document reflects a number of guidelines, which should avoid common errors I have seen upon code

reviewing in different projects.

It is not the intention to create a complete set of guidelines; it is simply driven by misunderstandings of C-programmers, which are novice in Teamcenter Enterprise method programming.

It is my intention to add new topics as observed in other cases.

Be aware, that Teamcenter Enterprise has strict object oriented architecture, even if its standard is not completely compatible with OMT standards. Teamcenter Enterprise has started before the OMT standard was released. But Teamcenter Enterprise respects its standard very strongly. If your customization breaks these rules (even for a small performance gain), you will pay hard in a future release upgrades. If you respect the rules, then any future upgrade will be smooth.

2 Memory Management

Memory Management

Object

Attributes

Attribute ...

Attribute ...

Attribute ...

Attribute ...

Attribute ...

Pointer

Pointer

Pointer

Static Dynamic Managed

2.1 Pointers Pointers, defined within a message or function are usually in dynamic memory. Pointers got back from

some low-level functions bring you a STATIC pointer (see later).

Assigning memory to a string pointer through the following actions assign the memory the pointer is pointing to in managed memory:

nlsStrAlloc, nlsStrDup

Assigning memory to a string pointer through the following actions assign the memory the pointer is pointing to in managed memory too:

objGetAttribute

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 3/34

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 4/34

But be aware, this pointer points into the memory structure of the “object”. Thus the pointer is valid only as long as the “object” is not moved within the memory and as long as it is not freed. Generally the object is “moved”, if is used in a method call as an argument, which is declared as “update” in the message signature of the called message.

Most common error is to get a pointer (through any objGet...) to point to some object or string or structure within that object without being aware, that the ‘owner’ of the memory copy of object may release or change the object. In the first case you are working with a pointer pointing to some random memory content, in the later case you will have a new (changed) value in the content (string, object,...), which you do not know where it comes from (see previous paragraph).

2.2 Low Level Routines Low level system routines giving back a string (like ‘low_rad_convert’ or ‘osGetTempName’ and other similar) point all always to the same location in static memory. This means:

after: ptr1 = low_rad_convert(i,10); ptr2 = osGetTempName(Host,User,NULL);

both pointers point to the same static location, and the value of convert is overwritten.

‘nlsStrDup’, ‘nlsStrCpy’ or ‘nlsStrCat’ must copy such string value before any other action may occur with this value.

2.3 Character Arrays Defined as: char mystring[24];

Be carefully using strings that are defined as arrays of char. They are allocated (both the pointer and the value part) in dynamic memory (on the stack!); thus they are freed upon exit of the routine.

If you use such a string to put together a value, you may not deliver the pointer to outside of the routine, because it points to a value that disappears at the end of the routine.

Better practice is string mystring = NULL; … mystring = nlsStrAlloc(24); or string mystring = NULL; … mystring = nlsStrDup(…);

2.4 Strings got from Objects

2.4.1 objGetAttribute The code ‘objGetAttribute(thisObj,ClassAttr,&mystring)’ sets the value of pointer ‘mystring’ to point into the

managed memory belonging to the object. Thus it points to a subset of the memory occupied, what ‘thisObj’ points to. However if for any reason the memory of ‘thisObj’ is released, ‘mystring’ points to some random value.

If you are sure, that ‘thisObj’ stays intact until you do no more need ‘mystring’, then it is OK. If not you are advised to replace like this:

if (dstat = objGetAttribute(thisObj,ClassAttr,&strin1)) goto EXIT; mystring = (nlsIsStrNull(string1)) ? NULL : nlsStrDup(string1);

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 5/34

This gives you a real copy of the string in newly allocated managed memory. You have to free it later by ‘nlsStrFree(mystring)’, if it is not inserted into something else, which will free globally.

2.4.2 objClass Replace ‘objGetAttribute(thisObj,ClassAttr,&mystring)’ by ‘mystring = objClass(thisObj)’ and respect the

same rules as with ‘objGetAttribute’.

2.5 Nature of pointer types / releasing routines

2.5.1 SetOfStrings A pointer pointing to a chain of pointers to strings, much like an array of pointers, but the series of pointers

is in managed memory too. Your pointer points to the first of them.

May be freed by: ‘low_set_destroy’. This frees the memory of each individual string, if the individual strings have been added by ‘low_set_add_str’ to the set, and then it releases the chain of pointers.

2.5.2 Char* ≡ string A pointer pointing to a chain of characters. The chain of characters is in any type of memory.

Only pointers pointing to managed memory may be freed by: ‘nlsStrFree’. Your pointer points to managed memory, if you have assigned a value either through ‘nlsStrAlloc’ or through ‘nlsStrDup’.

Never free:

strings you have got out of an object, because the character chains will be freed with the object!

strings you have got out of a set of strings, because the character chain will be freed with set!

strings you have assigned a character array. The array will be freed at end of the routine auto-matically. The array is not in managed memory allocated.

strings you have assigned a constant string value. The constant is not in managed memory allocated, but rather in static memory. But you may release a string got as ‘nlsStrDup(“Constant String”)’.

Strings used in ‘BeginFrame’, ‘EndFrame’, ‘ClearFrame’ and string sets used in ‘smSetSessionDbScope’ or got from ‘smGetSessionDbScope’.

2.5.3 SetOfObjects A pointer pointing to a chain of pointers to objects. The chain of pointers itself as well as the space of

each object is part of managed memory.

May be freed by: ‘objDisposeAll’. This frees first each individual object in the chain and then the chain of pointers.

You are responsible for freeing sets of objects, which: you have created explicitly or by ‘setCopy’. you have got by any query method giving back a set of objects or relation objects.

2.5.4 ObjectPtr A pointer to a chain of pointers to strings, sets of strings and other more complex structures, depending

on type of object. The chain of pointers as well as the values they point to are in managed memory.

May be freed by: ‘objDispose’. This frees first each individual structure the pointers in the chain point to, and then the chain of pointers.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 6/34

Never free: ‘thisObj’1 (first argument of an object message). Objects you have got out of a set of objects (by ‘low_set_get’). Values got through simple pointer values assignment (‘ptr1 = ptr2’).

You are responsible for freeing objects, which: you have created explicitly through a constructor message or with ‘objCopy’. you have got by any query method giving back the object or a relation object.

2.5.5 NVSET A pointer to a chain of pointers to name-value-pairs, which each consists of two string pointers. Both the

chain of pointers and what they are pointing to are in managed memory.

Must be freed by: ‘dlow_nvs_destroy(&...)’. This frees content and pointer chain. Note that the routine requires a pointer to the NVSET.

2.5.6 SqlPtr A pointer to a structure used to create SQL clauses (where clauses, select clauses, sort clauses, …). The

entire structure is in managed memory.

Must be freed by: ‘oiSqlDispose’.

2.5.7 SetPtr A pointer to a chain of pointers to any type of things. With exception of (2.5.1) SetOfStrings or (2.5.3)

SetOfObjects the system can not determine, what memory space each pointer points to. For allocation of your own structures, see “memMalloc” in Teamcenter Enterprise customization manuals.

May be freed by: ‘low_set_destroy’. But first you need to free, what each individual pointer in the set points to. And after that this routine frees only the chain of pointers!

Common Note to all above: If you create such objects within a for-loop, you need to free things within each loop; if you do it only at the common place after the CLEANUP-label, you free only the last one.

If you reuse such a pointer variable again for a new content after having freed the relative memory, you should first assign a “NULL” value to it, because there are some of the assignment routines will struggle, if the pointer points still to freed (or even not freed) memory.

A good sample for this is the routine “oiSqlCreateSelect”, which crashes, if the first argument (the SqlPtr) has already a value.

2.6 String handling The only string handling routine, which cares itself about memory allocation, is ‘nlsStrDup’. This routine

allocates the required space in managed memory and then copies the chain of characters into it.

All the other routines assume, that you did allocate the space before, and that you are sure, that you do not write into it beyond the allocated length. Thus they can be used to create a content into an array of chars defined at specific length as a variable (on the stack or static2) or into a string area got through ‘nlsStrAlloc’. Below is a sample of correct string construction to be assigned to an output argument.

1) until Metaphase 2.2 usually called ‘this‘, from Metaphase 2.3 on in accordance to C++ reserved word list changed to ‘thisObj‘. 2) be careful with static arrays. They can be used only in an uninterrupted peace of code.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 7/34

string subCmt = NULL; /* Build submit comment */ string stamp = NULL; ………… ………… stamp = nlsStrDup(sysGetDateTime()); i = nlsStrLen(cmt_txt) + nlsStrLen(stamp) + nlsStrLen(cons_mode_act) + 3; subCmt = nlsStrAlloc(i); if ((subCmt) == NULL) { dstat = uiOutOfMemory(); goto EXIT; } nlsStrCpy(subCmt,cmt_txt); nlsStrCat(subCmt,stamp); nlsStrCat(subCmt," : "); nlsStrCat(subCmt,cons_mode_act); subCmt[i] = '\0'; if (i>MAX_COMMENT_LGT ) { if (dstat = nlsStrTruncate(subCmt, MAX_COMMENT_LGT)) goto EXIT; }

2.7 Freeing Arguments

2.7.1 Update-Parameter What you get into your method as an argument of type ‘update’ is never in your responsibility to be freed.

It is up to the calling routine to handle that correctly.

Don’t even worry about these arguments upon server hops. If you call an other message within your method, that resolves to message in an other server, and if you pass this argument again as ‘update’, then the system will release the space from this server, assign it to the new one, and upon return it will be assigned back again to your method, but a new address. In this latter case, your object (and any attribute got out of it) most probably will no more be in the same location; thus pointer may point to wrong locations. An such pointer must be refreshed.

2.7.2 Output Parameter If you call another message with Output- or Update-Parameters, then you have to free the space of them,

before your method finishes (as far as they are not arguments of your routine).

2.8 IML-Methods IML (little C) is no more available for in Teamcenter Enterprise context. Only exception: some installation procedures called by cfgedit2. An IML compiler is no more contained in Teamcenter release material.

2.9 Calling next Methods • A String represented as Pointer into an object (got through objGetAttribute), may not be delivered to a next

message. Copy it first through ‘nlsStrDup’.

• The “Session”-object is passed implicitly always as an Update-Argument to any message.

• Attributes, got via smGet-functions out of the Session-Object, may not be delivered to a next message. (Use “nlsStrDup”-copies).

• Local Static Pointers, which point into the Session-Object, will be destroyed at any „Server-Hop„, i.e. Static Pointers may be used only within Static Functions, but never as an argument when calling an external method (directly or indirectly).

• Objects within Sets are completely new allocated when passed to another message. Be careful with pointers pointing into such sets.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 8/34

• General rule: use „objGetClass„ to pass the class name into another message. If it is passed as an update argument, then „objClass„ is OK.

3 Relations Handling of relations seems to be a topic where I realize often missing entry level knowledge.

3.1 Rules for Relations For creating a Relation object in general you need three or four permissions:

a) Create on the relative Relation Class

b) Relate on left and right side.

c) DropOnIcon1 / DropOnWindow for the object class, where you drop the object onto.

3.2 Handle Relations at MakeItemRevisionDP, CheckOutItemDP, CheckInItemDP, …

In general it is wrong to override MakeItemRevisionDP, CheckOutItemDP or CheckInItemDP-methods, even with including a “…AtParent” call, just for doing something with eventual relations to object, to which the message is sent.

Teamcenter Enterprise has standard customization hooks for this topic (see API manual), which are called for each relation object, in which the checkout- or revise-object is left or right side:

ProcERORelForRevise called at MakeItemRevisionDP of left or right

ProcERORelForCheckOut called at CheckOut of left or right, and called on Revise of left or right, if no ‘ProcERORelForRevise’ for this relation is defined.

ProcERORelForCopy called at Copy of left or right.

ProcERORelForMkVersn provides a place to process any relations for the ‘MakeItemVersionDP’ action.

ProcERORelForShwCopy performs the necessary processing when a copied item partici-pates in a relation.

PrcPredRelForCin messages to perform any actions needed for the predecessor's relations.

PrcPredRelForCkiReplc messages to perform any actions needed for the predecessor's relations.

DoesPredRelPrcForCin messages to flag whether any actions needed for the predecessor's relations.

DoesSuccRelPrcForCin messages to flag whether any actions needed for the successor's relations.

PrcSuccRelForCin messages to perform any actions needed for the successor's relations.

PrcSuccRelForCkiReplc messages to perform any actions needed for the successor's relations.

etc.. For more details consult Teamcenter manuals.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 9/34

3.3 Customized Structure Relations Starting with Metaphase 3.1 (due to increased performance in expand processing) you need to respect

more restrictive rules than usually before.

If you create your own structure relations, which you want to inherit the behavior of the standard ones, and for which you want to inherit all behavior and code for their relative dynamic revision-to-revision relation, then you must verify, that only leaf relation classes in the structure sub-tree are persistent.

If you do not respect this rule, you must program the behavior of the dynamic relations or any expand of such a dynamic relation will crash.

4 General Action Flow Create new customized functionality with same logical flow concept to remain compatible with next

Teamcenter Enterprise release and with possible future changes in your local configuration.

Teamcenter Enterprise Customization Manual shows in its overview chapter a flow structure, which has to be implemented for any interactive API “<Action>” (for process of single object):

Message Action

ValidateFor<Action> Validates that the specified action can proceed. SetUpDialog Prepares the dialog object to receive user response. SetDialogDefaults the default values in the specific dialog object. InteractWithUser Sends the dialog object to the client and requests the client to

display a window and waits for user response. ValidateDialog Called from the OKButton method; validates the user response. ProcessDialog Called from the OKButton method; processes the user response. Do<Action> Performs the requested action; this can be a series of methods.

same interactive API “<Action>” for process of set of objects:

Message Action

ValidateFor<Action> Validates that the specified action can proceed. SetUpDialgForSet Prepares the dialog object to receive user response. SetDialgDefaultsForSet the default values in the specific dialog object. InteractWithDialog Sends the dialog object to the client and requests the client to

display a window and await user response; should be used to display DPddSet and DPddSLIs dialog classes.

ValidateDialgForSet Called from the OKButton method; validates the user response. ProcessDialgForSet Called from the OKButton method; processes the user response. Do<Action> Performs the requested action; this can be a series of methods.

If the “Do<Action>” is “nonoverridable”, then it must call:

Do<Action>Pre before executing main stream code.

Do<Action>Post after main stream code, but before the database actions are commited.

For more details see Teamcenter Enterprise Customization Manual, chapter 2.

For any such interactive API it is forseen to have a relative “non interactive API called “<Action>Object”. Non interactive means that it does not display any dialog to a user. Thus dialogs are just local temporary objects filled by your program. Non interactive API’s have the following general structure.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 10/34

Message Action

ValidateFor<Action> Validates that the specified action can proceed. SetUpDialog Prepares the dialog object to provide action arguments. SetDialogDefaults the default values in the specific dialog object. - <Action>Object method fills into the dialog object whatever is

needed to process the action. ValidateDialog validates the dialog (necessary only if there is no guarantee that

the filled in values are legal). Do<Action> Performs the requested action; this can be a series of methods.

This is the same method as used for interactive API.

5 Status Handling Following remarks reflect bad programming style I have detected in a lot of customizations.

5.1 ‘dstat’ All message methods as well as many functions give a status back to the caller. This status allows

checking, if and how the called function could be completed.

Standard Teamcenter Enterprise programming conventions foresee that you define in each method a variable of type “status” and name “dstat”. This variable must be initialized with a value “OKAY” (see sample later in this chapter). The macro MODNAME conventionally is used for traceback purpose.

MODNAME("ClassName:MessageName"); status dstat = OKAY;

It is important to check this status after each message call, because in most cases your code should not continue, if this status is no more OKAY. There are only few exceptions, where we do not depend on correct termination of a called routine. Most often I do not check the status of a ‘uiShowText’, because I do not care or change the behavior of the routine, if the text could not be displayed, and it does not change any logic of my program.

A ‘dstat’ got back from any routine in general means: a not recoverable error occurred.

The most astonishing method code I have seen did just check ‘dstat’ after all ‘uiShowText’ and ‘uiShowExternalString’, but no where else.

It is mandatory to carry forward any “dstat” got from a called method, so that you get a complete trace back of where the program crashed. At the end of the stack the dispatcher will stop the service and restart a fresh one. This grants that services with eventually scrambled memory are not recalled for a next action.

Before exiting your method, you should check ‘dstat’, to invoke an abort and trace back, if an error occurred:

CLEANUP: /* Cleanup whatever can be done. Free memory as requested. */ EXIT: if (dstat != OKAY) dlow_return_trace(mod_name, dstat); return (dstat);

For this reason it is important to have still the relevant status of error in the variable “dstat” at EXIT. If you overwrite it by a ‘dstat’ got from showing an error message, this will not help much.

5.2 ‘mfail’ All message methods have a last argument called ‘*mfail’. This is a status variable reporting errors from

routines called inside. This argument is described as “output’ in the message signature. Thus it is mandatory to assign a value to this argument before exiting, otherwise the calling routine will react on a randomly set value.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 11/34

When you call any other message in your method code, it is mandatory to check ‘*mfail’ upon return. Any non-zero ‘*mfail’ value must be checked and reported to who called you, with the only exception where you are able to react on a specific value in ‘*mfail’.

A ‘mfail’ got back from any message in general means: a recoverable error occurred. MODNAME("ClassName:MessageName"); status dstat = OKAY; *mfail = USC_OKAY;

5.3 Samples

5.3.1 Sample Method Code The following sample code shows the usage of ‘dstat’ and ‘mfail’. /* $Id m_revrel.mth 7.4.1997 SDRC */ /* Methods to handle Custom-specific Relations at Delete Item Date: 7th April 1997 */ static code; #include <usr.h> #include <msg.h> #include <serv.h> #include <msgomf.h> #include <sc.h> #include <ui.h> #include <Mtimsgh.h> #include <Mtimsg.h> #include <pdmroot.h> #include <usr.h> #include <relation.h> /******************************************************************* *#F FILE: m_revrel.mth ******************************************************************** *#T NAME: Handle Delete of Document, when relation MainSub exists *#T ********************************************************************/ ; /* end static code */ /********************************************************************* *#T NAME: MainSub:ValIfDelRelAllowed *#T *#D DESCRIPTION *#D *#D Validate the MainSub Relation for object deletion: *#D Deletion is denied, if requesting Object is "Sub-Document". *#D *#M CALLED MAIN-MESSAGES *#M RefreshItObj ********************************************************************/ message MainSub:ValIfDelRelAllowed( input : ObjectPtr thisObj :: input : ObjectPtr itemObj :: input : integer side :: output: integer* mfail ) code { MODNAME("MainSub:ValIfDelRelAllowed"); status dstat = OKAY; NVSET textsup = NULL; string docname = NULL; ObjectPtr inScopeObj = NULL; boolean found; *mfail = USC_OKAY; if (side == RLT_RIGHT) { *mfail = USC_VALIDATION_ERROR; if (dstat = objGetAttribute(itemObj,DisplayedNameAttr,&docname)) goto EXIT;

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 12/34

if (nlsIsStrNull(docname)) { if (dstat = RefreshItObj(itemObj,FALSE,FALSE,&found,&inScopeObj,mfail)) goto EXIT; if (*mfail) goto CLEANUP; if (inScopeObj) { if (dstat = objGetAttribute(inScopeObj,DisplayedNameAttr,&docname)) goto EXIT; } else { if (dstat = objGetAttribute(itemObj,DisplayedNameAttr,&docname)) goto EXIT; } } if (nlsIsStrNull(docname)) dlow_nvs_set(&textsup,"NAME","???"); else dlow_nvs_set(&textsup,"NAME",docname); dlow_nvs_set(&textsup,"CLASS",objClass(itemObj)); uiShowText("21subValDelSub01",textsup,UI_STATUS_TEXT,dstat,WHERE); uiShowText("21subValDelSub01",textsup,UI_ATTENTION_TEXT,dstat,WHERE); } /* //.TXT 21subValDelSub01 //.The #CLASS# object #NAME# may not be deleted. //.It is referenced as Subdocument by another one. //.HLP //.Delete first the Main-Document, or delete first the relation //.between Main- and Sub-Document. //.CMT //.21subValDelSub01 Custom Text */ CLEANUP: if (textsup) dlow_nvs_destroy(&textsup); if (inScopeObj) objDispose(inScopeObj); EXIT: if (dstat != OKAY) dlow_return_trace(mod_name, dstat); return (dstat); } ;

5.3.2 Values of ‘*mfail’ used in Teamcenter Enterprise This list is got out of Teamcenter Enterprise 2005 / SR1:

DB-Errors: --------- #define DB_SQL_STMT_TOO_LARGE -41 #define DB_DISTRIBUTED_TIMEOUT -40 #define DB_SERVER_CONNECTION_FAILURE -39 #define DB_FREE_MEMORY_ERROR -38 #define DB_CURSOR_CACHE_ERROR -37 #define DB_UNIQUE_CONSTRAINT_VIOLATION -36 #define DB_LINK_NOT_FOUND -35 #define DB_TOO_MANY_DB_LINKS -34 #define DB_INVALID_CURSOR_ID -33 #define DB_BAD_PASSWD -32 #define DB_BAD_USERID -31 #define DB_OUT_OF_DATE -30 #define DB_BAD_DBID -29 #define DB_DBID_FAILURE -28 #define DB_DATA_NOT_FOUND -27 #define DB_BINARY_TOO_LARGE -26 #define DB_UNIMPLEMENTED -25 #define DB_NO_RESULT -24 #define DB_BAD_ARG -23 #define DB_INVALID_CURSOR_PTR -22 #define DB_NO_BIND_SQLDA -21 #define DB_INVALID_PTR -20 #define DB_CANNOT_LOGIN -19 #define DB_DBIF_ERROR -18 #define DB_ALREADY_LOGGED_IN -17

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 13/34

#define DB_NO_SELECT_SQLDA -16 #define DB_NOT_A_SELECT -15 #define DB_NOT_LOGGED_IN -14 #define DB_NULL_SQLDA -12 #define DB_UNKNOWN_BIND_TYPE -11 #define DB_SQL_BIND_ARG_MISMATCH -10 #define DB_OUT_OF_MEMORY -9 #define DB_DATA_HAS_CHANGED -8 #define DB_LOCK_FAIL -7 #define DB_ROLLBACK_REQUIRED -6 #define DB_CURSOR_NOT_OPEN -5 #define DB_UNKNOWN_SELECT_TYPE -4 #define DB_HOST_COUNT_MISMATCH -3 #define DB_NULLS_IN_AGGREGATE -2 #define DB_NO_DBCONFIG_DATA -1 Diverse constants: ------------------ #define DDE_SUCCESS 0 #define DDE_NOTSUPP 1 #define DDE_NOSERVER 2 #define DDE_NOTPROCESSED 3 #define DDE_BUSY 4 #define DDE_SYSERR 20 #define BASE_DDE_RPCPROC 200 #define DBE_ERRID_SIZE 11 #define DBE_VENDOR_SIZE 11 #define USC_LEFT 0 /* Left Justify Text */ #define USC_CENTER 1 /* Center Justify Text */ #define USC_RIGHT 2 /* Right Justify Text */ USC-Error Codes: --------------- #define DMM_MFAIL_ERR -1 #define USC_OKAY 0 #define USC_OKAY 0 #define CCF_PRDPLNIT_TYPE_PROPOSED 1 #define CCF_PRDPLNIT_TYPE_ACTUAL 2 #define CCF_PRDPLNIT_TYPE_UNKNOWN 3 #define CCF_PRDPLNIT_TYPE_NONE 4 #define USC_SERVER_UNAVAILABLE 4 #define USC_ACCESS_DENIED 5 #define USC_DATABASE_LOCK_FAILURE 7 #define USC_DATABASE_OBJECT_OUT_OF_DATE 8 #define USC_DATABASE_NO_OBJECT_TO_LOCK 9 #define USC_DATABASE_LINK_FAILURE 10 #define DBE_ERRID_SIZE 11 #define DBE_VENDOR_SIZE 11 #define USC_DATABASE_OBJECT_NOTINALLDBS 12 #define DBE_MODNAME_SIZE 19 #define DDE_SYSERR 20 #define USC_MSG_LENGTH 24 #define QRY_MFAIL_STATUS_LEN 80 #define USC_VALIDATION_ERROR 1001 #define USC_DATABASE_INTEGRITY_ERROR 1002 #define USC_DATABASE_FAILURE 1003 #define USC_INVALID_MESSAGE_USAGE 1006 #define USC_SESSION_SHUTDOWN 1009 #define USC_OBJECT_NOT_FOUND 1010 #define USC_POST_ERROR 1011 #define USC_OMF_DUPLICATE_KEY_FOUND 1012 #define USC_UPGRADE_NOT_COMPLETE 1013 #define USC_EFFECTIVITY_ERROR 1014 #define USC_FILE_FRAMING_ERROR 1015 #define USC_NOT_TOP_FRAME 1016 #define USC_OMF_BULK_DATA_INACCESSIBLE 1017 #define OMF_CHECK_DB_FRAME_NO_ACTIVE_FRAME 1018 #define USC_OMF_NO_ITEMS_FROM_EXPAND 1020 #define USC_OMF_DB_TOOL_NOT_FOUND 1021

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 14/34

#define USC_OMF_DB_TOOLNAME_NOT_FOUND 1022 #define USC_METHOD_NOT_IMPLEMENTED_ERROR 1023 #define DBE_ERR_MSG_SIZE 1024 #define DBE_SQL_SIZE 1024 #define USC_ARGUMENT_MISMATCH 1024 #define USC_CLASS_NOT_PERSISTENT 1025 #define USC_OMF_DYNAMIC_OBJECT_HANDLE_ERROR 1026 #define MFAIL_ORG_OBJECT_NOT_FOUND 1027 #define MFAIL_GLOBAL_ITEM_IDENTIFICATION_NOT_ENABLED 1028 #define MFAIL_ORG_PARTICIPANT_NAME_REQUIRED 1029 #define MFAIL_INVALID_ORGANIZATION_TYPE_AND_ID 1030 #define MFAIL_SHARE_DESIGN_REFERENCE_FEATURE_NOT_ENABLED 1031 #define MFAIL_REQUESTED_OBJECT_NOT_FOUND 1032 #define MFAIL_GIVE_OWNERSHIP_FEATURE_NOT_ENABLED 1033 #define USC_OMF_CREATE_RELS_NETWORK_NO_TERMINAL_OBJECT 1034 #define USC_RESERVED_KEYWORD 1035 #define MFAIL_OBJECT_IS_NOT_IN_VAULT 1036 #define MFAIL_OBJECT_IS_CHECKED_OUT 1037 #define MFAIL_OBJECT_IS_NOT_CHECKED_IN 1038 #define MFAIL_CANNOT_EXPORT_OBJECT_IN_TEAM 1039 #define USC_OMF_TRN_OS_FILE_NOT_FOUND 1050 #define USC_OMF_TRN_ATTACHED_DEST 1051 #define OMFERR_AUTH_PASSWORD_IS_NULL 1052 /* No Password error */ #define USC_OMF_DROP_REJECT_DROP 1075 #define USC_OMF_DROP_VISUAL_FAILURE 1076 #define USC_OMF_DROP_INVALID_BGOBJ 1077 #define USC_OMF_EDIT_UNACCESSIBLE_FILE 1100 #define USC_OMF_EDIT_FROZEN 1101 #define USC_OMF_EDIT_SUPERSEDED 1102 #define USC_OMF_EDIT_INVALID_EDITOR 1103 #define USC_OMF_EDIT_INVALID_VIEWER 1104 #define USC_OMF_EDIT_NOT_SUPPORTED 1105 #define USC_OMF_EDIT_PROCESS_ERROR 1106 #define USC_OMF_NO_ROOT_ERROR 1107 #define USC_OMF_RELATE_FROZEN 1125 #define USC_OMF_RELATE_SUPERSEDED 1126 #define USC_OMF_RELATE_NO_RELSHIPS 1127 #define USC_OMF_RELATE_INVALID_RELSHIP 1128 #define USC_OMF_RELATE_CANT_DROP_REL 1129 #define USC_OMF_RELATE_ILLEGAL_RELSHIP 1130 #define USC_OMF_RECYCLE_VALIDATION_ERROR 1131 #define USC_OMF_TCL_OBJ_MISSING 1150 #define USC_OMF_TCL_INVALID_ACTION 1151 #define MFAIL_ACTION_CANCELED 1176 #define MFAIL_OBJECT_IS_UNMANAGED 1200 #define MFAIL_OBJECT_IS_MANAGED 1201 #define MFAIL_UNMANAGED_AUTH_ERROR 1202 #define MFAIL_DELG_NAMED_DELG_NOT_FOUND 1225 #define MFAIL_DELG_DELG_TYPE_NOT_DEFINED 1226 #define MFAIL_DELG_MISSING_ATTR_FOR_DELGTYPE 1227 #define MFAIL_DELG_NAME_ALREADY_IN_LIST 1228 #define MFAIL_DELG_RELATION_NOT_FOUND 1229 #define MFAIL_DELG_GET_DELEGATION_INFO_ERROR 1230 #define MFAIL_DELG_PERSISTENT_ITEM_CLS_NOT_FOUND 1231 #define MFAIL_DELG_PERSIST_ITM_CLS_IN_META_BAD 1232 #define MFAIL_DELG_TOO_MANY_BUSITEM_FOR_DELG 1233 #define MFAIL_DELG_CACHE_MGMT_ERROR 1234 #define MFAIL_OBJECT_IS_IMMUTABLE 1250 #define MFAIL_OBJECT_IS_RESERVED 1255 #define MFAIL_OBJECT_ALREADY_RESERVED 1256 #define OMF_CANNOT_GET_OBJECT_FOR_BOM_EXCHANGE 1257 #define MFAIL_UNDORSV_NOT_ALLOWED 1258 #define MFAIL_NO_OWNER_FOR_USER 1260 #define MFAIL_SHARE_MISSING_OBJECTS 1261 #define MFAIL_SHARE_MKEY_IN_USE_BY_OTHER_OBJECT 1262 #define MFAIL_SHARE_NO_PULL_SRC_OBJECT 1263 #define MFAIL_SHARE_NO_FED_INSTALL_OBJECT 1264 #define USC_OMF_INCORRECT_PASSWORD_ERROR 1291 #define USC_OMF_PASSWORD_FORMAT_ERROR 1292 #define USC_OMF_PASSWORD_REUSE_ERROR 1293 #define USC_OMF_PASSWORD_EXPIRED 1294 #define USC_OMF_RETRYLIMIT_EXCEEDED 1295

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 15/34

#define USC_OMF_INCORRECT_LOGIN 1296 #define USC_OMF_USRPWD_MATCH_ERROR 1297 #define USC_OMF_ACCOUNT_DEACTIVATED_ERROR 1298 #define USC_OMF_MULTIPLE_USRSTAT_ERROR 1299 #define MFAIL_EXPAND_CONTEXT_UNAVAILABLE 1300 #define USC_OMF_DEFER_INACCESSIBLE 1306 #define USC_OMF_CONFLICTING_SYMLINK 1307 #define USC_OMF_NAME_CONFLICT 1308 #define USC_OMF_REPLICATED_CONTENTS_UNAVAILABLE 1309 #define USC_OMF_FILE_REFERENCE 1310 #define USC_OMF_REPLICATION_UNNECESSARY 1311 #define USC_OMF_INVALID_REPLICATION 1312 #define USC_REPSERV_NO_FILESYSOBJ 1313 #define USC_REPSERV_NO_OWNERDIR 1314 #define USC_REPSERV_NO_POLICY 1315 #define USC_REPSERV_NO_REFRESH 1316 #define USC_REPSERV_NO_ACCESSON 1317 #define USC_OMF_DEFER_CANNOT_LOCK 1318 #define USC_REPSERV_UNREGISTERED 1319 #define USC_OMF_FILE_TRANSFER_FAILED 1320 #define USC_OMF_NO_SOURCE_FILE 1321 #define USC_OMF_REPLICATION_NOT_PERMITTED 1322 #define USC_OMF_REPLICATION_DESTINATION_IS_SOURCE 1323 #define USC_OMF_CHECKSUM_MISMATCH 1324 #define USC_OMF_DESTINATION_RESERVED 1325 #define USC_OMF_CIR_TRN_PROHIBITED 1326 #define USC_OMF_REPLICATION_BLOCKED 1327 #define USC_OMF_DEFER_NO_VALID_SRC 1328 #define USC_SE_INDEX_FAILURE 1330 #define USC_SE_SEARCH_SERVICE_NOT_CONFIGURED 1331 #define USC_SE_CANT_START_SEARCH_SERVICE 1332 #define USC_SE_SEARCH_ERROR 1333 #define USC_SE_CONFIG_VAR_NOT_FOUND 1334 #define USC_SE_ERROR 1335 #define USC_SE_NO_INDEXABLE_FILE 1336 #define MFAIL_SEARCH_NOT_ENABLED 1337 #define USC_SE_SYNCINDEX_SERVICE_NOT_CONFIGURED 1338 #define USC_SE_CANT_START_SYNCINDEX_SERVICE 1339 #define MFAIL_SEARCH_UNKNOWN_OPERATOR 1340 #define MFAIL_SEARCH_UNKNOWN_CONTAINS_TYPE 1341 #define USC_SE_INVALID_PORT_NUMBER 1342 #define USC_SE_ACI_PORT_NOT_FOUND 1343 #define USC_SE_ACI_HOST_NOT_FOUND 1344 #define USC_SE_CANT_OPEN_AUX_IDX_FILE 1345 #define USC_SE_INVALID_ACI_NUM_TRIALS 1346 #define USC_SE_INVALID_ACI_TIMEOUT 1347 #define USC_SE_NO_BIDC 1348 #define USC_SE_NO_INDEXING_ON_CHECKIN 1349 #define USC_SE_NO_ATTACHED_FILES 1350 #define USC_SE_FILE_OBJ_NOT_INDEXABLE 1351 #define USC_SE_FILE_NOT_CHECKED_IN 1352 #define USC_SE_FILE_NOT_OWNED 1353 #define USC_SE_UNBALANCED_QUOTES 1354 #define USC_SE_UNBALANCED_PARENS 1355 #define USC_SE_INVALID_BOOLEAN 1356 #define USC_SE_CONSEC_BOOLEANS 1357 #define USC_SE_INVALID_LANGUAGE 1358 #define USC_SE_SEARCH_ERROR2 1359 #define USC_SE_NOT_INDEXED 1360 #define USC_SE_RES_NOT_INDEXED 1361 #define USC_BAD_SE_INDEX_LANG 1362 #define USC_SE_NO_TEXT_ENTERED 1363 #define USC_SE_START_END 1364 #define USC_SE_BAD_DATE 1365 #define USC_SE_DATE_OPERATOR 1366 #define USC_SE_LANG_ERROR 1367 #define USC_SE_ATTR_NOT_INDEXED 1368 #define USC_SE_NO_PREFIX_TABLE 1369 #define USC_OMF_NO_FILE_SYSTEM 1380 #define USC_OMF_NO_REPLICATED_LOCATION 1381 #define USC_OMF_REPLICATION_STOPPED 1382 #define USC_OMF_ODR_FSI_CONSISTENCY_ERROR 1383 #define USC_OMF_ODR_FSY_CONSISTENCY_ERROR 1384

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 16/34

#define USC_EL_SERVICE_NOT_CONFIGURED 1400 #define USC_EL_CANT_START_SERVICE 1401 #define USC_OMF_OWNERSHIP_BOTH_SITES 1450 #define USC_OMF_OWNERSHIP_FROZEN_CONFLICT 1451 #define LCMERR_EFFECTIVITY 2050 #define LCMERR_PROC_HIST_EXP 2051 #define LCMERR_FSITEM_DOES_NOT_EXIST 2052 #define LCMERR_ALTUSER_OOO 2053 #define LCM_MFAIL_DATABASE_SCOPE_IS_NULL 2400 #define LCMERR_NO_VALID_LIFECYCLES 2600 #define LCMERR_NO_VALID_ROUTE_LIST 2601 #define LCMERR_WORKITEM_IN_LIFECYCLE 2602 #define LCMERR_WORKITEM_NOT_REGISTERED 2603 #define LCMERR_WORKITEM_IS_SHADOW_COPY 2604 #define LCMERR_WORKITEM_IS_CHECKED_OUT 2605 #define LCMERR_WORKITEM_NOT_IN_VAULT 2606 #define LCMERR_WORKITEM_IS_SUPERSEDED 2607 #define LCMERR_WORKITEM_IS_RESERVED 2608 #define LCMERR_WORK_CLAIMED_BY_OTHER 2700 #define LCMERR_WORK_CLAIMED_BY_SELF 2701 #define LCMERR_WORK_NOT_IN_REQ_STATE 2702 #define LCMERR_AUTH_PASSWORD_IS_NULL 2703 #define LCMERR_WORK_IS_NOT_CLAIMED 2704 #define LCMERR_NO_WORK_FOUND 2705 #define LCMERR_ITEMS_OUT_OF_SYNC_WITH_SIGS 2706 #define LCMERR_NOT_ELIGIBLE_USER_FOR_WORK 2707 #define LCMERR_WORK_IN_REQ_STATE 2708 #define LCMERR_NOT_CURRENT_USER_FOR_WORK 2709 #define LCMERR_WORK_NOT_IN_RDY_STATE 2710 #define LCMERR_NO_PROCESS_ACTORS 2800 #define LCMERR_NO_PROCESS_BRANCHES 2801 #define LCMERR_NO_PARENT_PROCHIST 2802 #define LCMERR_NO_EFFECT_PROCESS 2803 #define LCMERR_NO_STEP_ENTRY 2804 #define LCMERR_NO_WORK_BREAKDOWN 2805 #define LCMERR_INACTIVE_USER 2806 #define LCMERR_WHEN_REPLACE_USER 2807 #define LCMERR_NO_LIFE_CYCLE_STEPS 2808 #define LCMERR_WORKLISTTYPE_NOT_FOUND 3000 #define PSM_PREPARE_UNSUPPORTED 3001 #define PSM_PREPARE_UNREG_OBJ 3002 #define PSM_PREPARE_REL_EXISTS 3003 #define PSM_PREPARE_CANCELLED 3004 #define PSM_PREPARE_MULTI_OPEN_REV 3005 #define PSM_PREPARE_ALL_REVS_FROZEN 3006 #define LCMERR_NO_TABLE_ROWS 3100 #define LCM_DELETE_NOT_ALLOWED_FOR_ADHCDATA 3101 #define APC_NO_ITEMS_FROM_EXPAND 3501 #define APC_INVALID_CLASS_FOR_ACTION 3502 #define APC_EFFECTIVITIES_NOT_SUPPORTED 3503 #define APC_NOT_FIRST_LEVEL_CHILD 3504 #define APC_CAN_NOT_SUBDIVIDE_STRUCT 3505 #define APC_INVALID_INPUT 3506 #define APC_PARENT_HAS_NO_CHILDREN 3507 #define APC_CHILD_HAS_NO_SUBORDINATES 3508 #define APC_ITEM_REL_MISMATCH 3509 #define APC_STRUCTOPTIONS_NOT_SUPPORTED 3510 #define APC_UNITS_DONOT_MATCH 3511 #define APC_QUANTITY_CANNOT_BE_MODIFIED 3512 #define APC_OFFERED_SERVICES_HAVE_MODIFIED 3513 #define APC_OFFERED_SERVICES_HAVE_DELETED 3514 #define APC_CONDITION_DOES_NOT_EXIST 3515 #define USER_NOT_ALLOWED_TO_QUERY 3516 #define APC_CAD_DATA_NOT_ALLOWED 3517 #define APC_MOS_FINDS_NO_RELS 3518 #define APC_MOS_FINDS_MULTIPLE_RELS 3519 #define APC_MOS_VIEWS_AND_OCC 3520 #define APC_ILV_VIEWS_AND_OCC 3521 #define APC_SBM_VIEWS_AND_OCC 3522 #define APC_SNR_VIEWS_AND_OCC 3523 #define APC_RPA_VIEWS_AND_OCC 3524 #define USC_APC_MIGRATION_ERROR_OCCURED 4000 #define USC_APC_REM_VEW_INFO_ERROR_OCCURED 4001

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 17/34

#define USC_INVALID_DOMAIN 5501 #define USC_NO_FED_ID_DEFINED 5502 #define IDS_INVALID_INPUT_LIST 9001 #define IDS_INVALID_OBJECT_IN_LIST 9002 #define IDS_MULTIPLE_OBJ_BASED_ON_INPUT 9003 #define IDS_NO_OBJ_BASED_ON_INPUT 9004 #define IDS_DUPLICATE_PARTNUMBER 9005 #define IDS_VALIDATION_REFUSED_WITH_EXT_SYS 9006 #define IDS_ITEM_NOT_REGISTERED 9007 #define IDS_CHKIN_NOT_ALLOWED 9008 #define IDS_CANNOT_CREATE_CAD_MODEL 9010 #define IDS_INVALID_FOR_CKO 9011 #define IDS_NO_PRIMARY_KEY_FOR_CLASS 9012 #define IDS_NO_ITEMS_FROM_EXPAND 9013 #define IDS_ATTACHES_MNDOC 9014 #define IDS_ATTACHES_FEMODEL 9015 #define IDS_ACID_IN_USE 9016 #define IDS_CADACRST_NOT_UPTODATE 9017 #define IDS_NO_VALID_TEAM_LOC_FOR_TEAM 9018 #define IDS_NO_PARTMSTR_FOR_GENENTY 9019 #define IDS_NO_CAD_FILE_FOUND 9020 #define IDS_NO_CAD_DOC_FOUND 9021 #define IDS_CADOCCR_NOT_UPTODATE 9022 #define IDS_CADCWAST_NOT_UPTODATE 9023 #define IDS_ALREADY_CHECKED_OUT 9024 #define IDS_VAULT_IS_NULL 9025 #define IDS_NO_VAULT_OR_VAULT_LOC 9026 #define IDS_INVALID_GUID 9027 #define IDS_INVALID_INPUT_ARGUMENTS 9028 #define IDS_INST_NOT_UPTO_DATE 9029 #define INPUT_OBJ_SUPERSEDED 9030 #define IDS_CADCNTXT_NOT_AVAILABLE 9031 #define IDS_INVALID_PDM_PRIVATEDATA 9032 #define IDS_NULL_PART_NUMBER 9033 #define IDS_MORE_THAN_ONE_CADDOC_FOUND 9034 #define IDS_MORE_THAN_ONE_CADFILE_FOUND 9035 #define IDS_GEOMSYNC_NOT_UPTODATE 9036 #define IDS_ORNTSYNC_NOT_UPTODATE 9037 #define IDS_NO_ADMIN_OBJ_FOUND 9038 #define IDS_MORE_THAN_ONE_ADMIN_OBJ_FOUND 9039 #define IDS_INVALID_QUERY 9040 #define IDS_INPUT_ATTR_NOT_COMPLETE 9041 #define IDS_CANNOT_GET_DEST_FULLPATH 9042 #define IDS_ISCOMPONENT_ATTR_NOT_SET 9043 #define IDS_CANNOT_GET_SRC_FULLPATH 9044 #define IDS_CANNOT_GET_DEST_HOSTNAME 9045 #define IDS_CANNOT_GET_SRC_HOSTNAME 9046 #define IDS_CANNOT_FIND_DEST_TEAM 9047 #define IDS_MAX_RANGE_REACHED 9048 #define IDS_VALUE_EXCEEDS_INT_RANGE 9049 #define IDS_PARENT_NOT_CHECKED_OUT 9050 #define IDS_INVALID_RETRIEVAL_OPTION 9051 #define IDS_NO_OBJECT_FOUND_WITH_THIS_GUID 9052 #define IDS_CANNOT_COPY_THIS_ENTITY 9053 #define IDS_CANNOT_ADD_INSTANCE_TO_ENTITY 9054 #define IDS_CANNOT_FIND_INSTANCE_WITH_RIGHT_ATT 9055 #define IDS_PARENT_IS_NOT_AN_ASSY 9056 #define IDS_ERROR_IN_COPYCWARELATIONS 9057 #define IDS_NOT_FIRST_LEVEL_ENTITY 9058 #define IDS_CANNOT_DELETE_THIS_INSTANCE 9059 #define IDS_CANNOT_MOVE_THIS_INSTANCE 9060 #define IDS_CANNOT_REPLACE_THIS_INSTANCE 9061 #define IDS_UNABLE_TO_GEN_REQD_PRTNUMBERS 9062 #define IDS_DEFAULT_DIALOG_FOR_INST_NOT_SET 9063 #define IDS_UNABLE_TO_LOCK_IDGENADM 9064 #define IDS_UNABLE_TO_LOCK_IDGENPRY 9065 #define IDS_NOT_MNFILE_SUBCLASS 9068 #define IDS_NOT_CADFILE_SUBCLASS 9069 #define IDS_NO_FE_FILE_FOUND 9070 #define IDS_NO_MN_FILE_FOUND 9071 #define IDS_CANNOT_ADD_ASM 9072 #define IDS_CANNOT_ADD_DESIGN_PART 9073

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 18/34

#define IDS_CANNOT_ADD_COMPONENT_FEM 9074 #define IDS_INCOMPLETE_DATA 9075 #define IDS_CANNOT_CREATE_CADMNR 9076 #define IDS_CANNOT_DELETE_FEM 9077 #define IDS_CANNOT_DELETE_DRAWING 9078 #define IDS_NO_ITEM_FOUND_FROM_THE_GUID 9080 #define IDS_MORETHAN_ONE_ITEMS_FOUND_FROM_GUID 9081 #define IDS_NO_ELIGIBLE_VERSION_TO_REFER 9082 #define IDS_PART_HAS_PARENT 9083 #define IDS_INCONSISTENT_PRODUCT_STRUCTURE 9084 #define IDS_INCONSISTENT_CONFIG_DATA 9085 #define IDS_NO_CAD_NEUTRAL_VIS_FILE_FOUND 9086 #define IDS_UNABLE_TO_OPEN_TEMPLATE_CPD 9096 #define IDS_UNABLE_TO_READ_TEMPLATE_CPD 9097 #define APC_MISSING_IMPLOBJ_FOR_DIALOG 9098 #define APC_MISSING_IMPLOBJ_FOR_BUSITEM 9099 #define IDS_NONE_OR_MULT_CWA_CONTEXT_FOUND 9100 #define IDS_NONE_OR_MULT_CWA_SOURCE_FOUND 9101 #define IDS_NONE_OR_MULT_CWA_TARGET_FOUND 9102 #define IDS_MULTIPLE_MASTER_FOR_THAT_ENTITY 9103 #define IDS_NO_MASTER_FOR_THAT_ENTITY 9104 #define IDS_MORE_THAN_ONE_INST_FOR_TMTID 9105 #define IDS_CONTEXT_ENTITY_NOT_COPIED 9106 #define IDS_CWA_PROPAGATION_INCONSISTENCY 9107 #define IDS_INCONSISTENCY_RELATION_EXPAND 9108 #define IDS_OBJECT_NOT_GENENTY_OR_CADOCCR 9109 #define IDS_CANNOT_GENERATE_PARTNUMBER 9110 #define IDS_CWA_UNIQUENESS_VIOLATED 9111 #define IDS_INST_UNIQUENESS_VIOLATED 9112 #define IDS_NOT_FIRST_LEVEL_INSTANCE 9113 #define IDS_ERROR_IN_INPUT_TYPE 9114 #define IDS_NO_INSTANCES_FOUND_FOR_THIS_PART 9115 #define IDS_INVALID_CUSTOM_ATTRIBUTE 9120 #define IDS_INVALID_CLASS_ATTRIBUTE 9121 #define IDS_INVALID_ATTRIBUTE_TYPE 9122 #define IDS_INVALID_ATTRIBUTE_VALUE 9123 #define IDS_OPERATION_CANCELLED 9295 #define IDS_FLDR_NOT_FOUND_FOR_ITEM 9296 #define IDS_NO_NEWITEM_FOUND_FOR_GUID 9297 #define IDS_NO_OBJECT_FOUND_FOR_GUID_OWNER 9298 #define IDS_NO_OBJECT_FOUND_FOR_GUID 9299 #define IDS_ZERO_SET_SIZE 9303 #define IDS_CANNOT_GET_OBJECT 9304 #define IDS_CANNOT_GET_STRING 9305 #define IDS_NOOP 9306 #define TEMPLATE_COLLECTION_ALREADY_EXISTS 9310 #define IDS_DUPLICATE_DOCUMENTNAME 9505 #define IDS_MN_INVALID_ACTION 9506 #define IDS_ITEM_NOT_IN_TEAM_OR_VAULT 9700 #define IDS_PART_HAS_EXTERNAL_CWA_RELS 9701 #define IDS_PBI_RESERVE_OWNER 9702 #define IDS_PBI_SUPERSEDED 9703 #define IDS_PBI_FROZEN 9704 #define IDS_PBI_IMMUTABLE 9705 #define IDS_UNABLE_TO_LOCK_REMOTE_OBJS 9706 #define IDS_UNABLE_TO_LOCK_LOCAL_OBJS 9707 #define IDS_NO_PARTMASTER_FOUND_FROM_KEY 9800 #define IDS_MORETHAN_ONE_PARTMASTER_FOUND_FROM_KEY 9801 #define TDS_FATAL_STRUCT_ERROR 9804 #define tdsATTR_PROG_ERR 9809 #define TDS_XFER_TO_FOLDER 9814 #define tdsPIM_GETNEXT_ATTR_ERROR 9816 #define tdsPIM_RESET_ATTR_ERROR 9817 #define TDS_ATTR_MAP_ERR 9820 #define TDS_DS_EXPORT_CUST_ERR 9821 #define TDS_DS_IMPORT_CUST_ERR 9822 #define tdsPIM_DMAP_ERROR 9855 #define tdsERROR_GET_ATTRIBUTE 9856 #define tdsERROR_PIM_GET_TDM_CONFIG 9857 #define tdsERROR_PIM_TRIM_CHAR 9858 #define tdsDSEX_PKG_FILE_EEXIST 9861 #define tdsDSEX_PKG_FILE_EACCES 9862 #define tdsDSEX_PKG_FILE_ENOENT 9863

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 19/34

#define tdsDSEX_PKG_FILE_UNKNOWN 9864 #define tdsINVALID_CLASS_DS_EX_OBJ 9865 #define tdsINVALID_STATE_DS_EX_OBJ 9866 #define tdsINVALID_DS_EX_OBJS 9867 #define tdsNO_MSG_ACCESS_DS_EX_OBJ 9870 #define tdsINVALID_DS_EX_DIALG_OBJS 9871 #define tdsDSEX_SERVER_FAILURE 9872 #define tdsDSEX_RELEASE_ERROR 9873 #define tdsDSEX_PUT_OBJ_ERROR 9874 #define tdsDSEX_FT_COPY 9875 #define tdsSET_ITEM_TYPE_ERROR 9876 #define tdsDSEX_FLUSH_OBJS_ERROR 9877 #define tdsDSEX_PUT_INSTANCE_ERROR 9878 #define tdsDSEX_PKG_INCOMPLETE 9879 #define tdsDSEX_INVALID_NUM_FILES 9880 #define tdsDSEX_PATH_PKG_MISMATCH 9881 #define tdsDSEX_INVALID_FILE_EXT 9882 #define tdsDSEX_PKG_FILE_MAXLENGTH 9883 #define tdsDSEX_INVALID_EXTENSION 9884 #define tdsDSEX_INVALID_CONFIG 9885 #define tdsDSEX_NO_EXPORT_FOR_MOD 9886 #define tdsDSEX_ACR_RIGHT_MISSING 9887 #define tdsWORKSDIR_ERROR 9888 #define tdsPIM_GET_FIXED_ATTR_ERROR 9901 #define tdsPIM_INIT_ATTR_ERROR 9905 #define tdsERROR_PIM_TRIMMING_ATTRIBUTE 9916 #define tdsERROR_PIM_FREE_MEMORY 9917 #define tdsERROR_PIM_GET_USER_ATTRIBUTE 9918 #define tdsERROR_PIM_FREE_CHARACTER 9919 #define tdsCREATE_HANDLE_ERROR 9924 #define tdsRESET_OBJ_LIST_ERROR 9931 #define tdsSET_ITEM_ATTR_ERROR 9938 #define tdsTLOG_WRITE_ERROR 9939 #define tdsCONNECTION_FAILED 9940 #define tdsDISCONNECTION_FAILED 9941 #define tdsTLOG_DIR_ACCESS_ERROR 9943 #define tdsCANNOT_CREATE_STAGING_LOC 9944 #define tdsCLEANUP_STAGING_AREA_ERROR 9945 #define tdsTLOG_CONSTURCT_ERROR 9947 #define tdsTLOG_TEXT 9948 #define tdsSET_REL_ATTR_ERROR 9964 #define TDS_MIGRATION_INCOMPLETE 9991 #define TDS_MIGRATION_STOPPED 9992 #define TDS_FILE_TRANSFER_ERROR 9993 #define DB_LOCK_NOWAIT_ERROR 9996 #define tdsUNKNOWN_CLASS 9996 #define DB_LINK_FAILURE 9997 #define DB_DISTRIBUTED_TIMEOUT_ER 9998 #define DB_UNQ_CONSTRAINT_ERROR 9999 #define tdsUNKNOWN_ATTR 9999 #define SMM_ERROR_CODE 11001 #define OBU_SET_CREATE_FAILED 11300 #define OBU_SET_ADD_FAILED 11301 #define OBU_SET_EMPTY 11304 #define OBU_SET_UNKNOWN_ERROR 11307 #define OBU_SET_GET_ERROR 11309 #define OBU_ENV_VAR_NOT_SET 11351 #define RST_DUPLICATE_OBID 11381 #define RST_NO_VALID_DATA_FOR_COPY 11382 #define RST_NO_ARC_ITEMS_FOR_OBJECT 11383 #define RST_TOO_MANY_DDSC_OBJS 11384 #define OBU_OSACCESS_ERROR 11408 #define OBU_MRST_DISPATCH_FAILED 11460 #define OBU_QRY_RESULT_ERROR 11461 #define OBU_INVALID_PATH 11471 #define OBU_RST_NO_ADMIN_GROUP 11472 #define OBU_RST_ADMIN_GROUP_FAILURE 11473 #define OBU_INVALID_NULL_VALUE 11477 #define OBU_LEFT_OBJECT_NOT_FOUND 11478 #define OBU_RIGHT_OBJECT_NOT_FOUND 11479 #define OBU_ERROR_CODE 11700 #define OBU_CONNECTION_FAILED 11701

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 20/34

#define OBU_BACKUP_FAILED 11702 #define OBU_RESTORE_FAILED 11703 #define OBU_META_BACKUP_SKIPPED 11800 #define OBU_BULK_BACKUP_SKIPPED 11801 #define OBU_META_RESTORE_SKIPPED 11802 #define OBU_BULK_RESTORE_SKIPPED 11803 #define OBU_SPOOLINGDIR_CORRUPTED 11804 #define OBU_MEDIA_POOL_NOT_FOUND 11805 #define OBU_RESTORE_SKIPPED 11806 #define OBU_BACKUP_SET_EMPTY 11807 #define OBU_OBJ_NOT_FOUND 11808 #define OBU_NB_INTERFACE_FAILURE 11809 #define DMM_CANT_START_SERVICE 12001 #define DMM_CANT_START_OS_OPEN 12002 #define DMM_CANT_START_OS_SYSTEM 12003 #define DMM_CANT_IDX_PDF_ERROR 12004 #define DMM_CANT_IDX_FILE_ERROR 12005 #define DMM_CANT_DISTILL_SHADOW_ERROR 12006 #define DMM_PS_MISSING_ERROR 12007 #define DMM_FORMAT_NOT_DISTILLABLE 12008 #define DMM_PDF_FILE_EXISTS_ERROR 12009 #define DMM_PS_IS_OLDER_ERROR 12010 #define DMM_PS_EMPTY_ERROR 12011 #define DMM_VDK_HOME_NOTFOUND 12012 #define DMM_VDK_COLL_PATH_NOTFOUND 12013 #define DMM_NO_INDEXABLEFILE 12014 #define DMM_TRANS_FAIL 12015 #define DMM_SEARCH_ERROR 12016 #define DMM_VDK_ERROR 12017 #define DMM_INFO_USEFILEN 12018 #define DMM_INFO_NO_DDC 12019 #define DMM_SOME_ITEMS_NOT_VIEWED 12021 #define DMM_CANCEL 12022 #define DMM_SERVICE_NOT_CONFIGURED 12023 #define DMM_VDK_QPARSE_ERROR 12024 #define DMM_VDK_LOCALE_NOTFOUND 12025 #define DMM_VDK_CHARMAP_NOTFOUND 12026 #define DMM_FILE_NOT_FOUND 12027 #define DMM_FILE_NOT_TRANSFERED 12028 #define DMM_MKP_NO_FILE 12031 #define DMM_MKP_NO_OBID 12032 #define DMM_NO_ATTACHED_FILES 12033 #define DMM_NO_MANAGED_FILES 12034 #define DMM_NO_FILES_ACCESSABLE 12035 #define DMM_VIEW_MARKUP_CONFIG_ERR 12036 #define DMM_NO_FILES_PRINTABLE 12037 #define DMM_NO_FROZEN_TEMPLATES 12040 #define DMM_NOT_IN_VALID_APP_LIST 12041 #define DMM_CANT_CREATE_TEMPLATE_CLASS 12042 #define DMM_AE_NO_EXCHPROCESS 12045 #define DMM_NO_FED_CKO 12050 #define DMM_UCL_ERROR 12065 #define DMM_NO_CFG_OBJECT 12080 #define DMM_NO_ATTACHMENTS 12081 #define USC_TMS_TEAMROLE_NULL 12501 #define USC_TMS_RESERVE_NOT_ALLOWED 12502 #define USC_TMS_MERGE_NOT_ALLOWED 12503 #define USC_TMS_TRANSFER_NOT_ALLOWED 12504 #define MFAIL_INSVER_VALIDATION_ERROR 12505 #define USC_TMS_NO_CONTROLLING_TEAM_FOLDER 12506 #define MFAIL_MRGVER_NO_CREATE_CLASS 12507 #define MFAIL_MRGVER_NO_TEAM_OWNER 12508 #define MFAIL_MRGVER_UNKNOWN_CLASS 12509 #define MFAIL_INSVER_BAD_OWNER_CLASS 12510 #define MFAIL_TMS_SUCCESSOR_NOT_FOUND 12511 #define USC_TMS_RESERVE_NOT_ALLOWED_IMM 12512 #define USC_TMS_RESERVE_NOT_ALLOWED_RSV 12513 #define USC_TMS_RESERVE_NOT_ALLOWED_SUP 12514 #define MFAIL_INSVER_PRED_RESERVED 12515 #define MFAIL_MRGVER_INVALID_TEAMLOC 12516 #define TMS_INVALID_INPUT_ARGUMENTS 12517 #define TMS_PURGE_SET_EMPTY 12518 #define MFAIL_MRGVER_NO_PRED_NO_NAME 12519

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 21/34

#define USC_TMS_RESERVE_NO_FLDR 12520 #define USC_TMS_RSVVRS_BAD_OWNER_CLASS 12521 #define MFAIL_MULTIPLE_PREDECESSORS 12522 #define MFAIL_PURGE_ITEM_NOT_IN_TEAM 12524 #define MFAIL_RELEASE_ITEM_NOT_IN_TEAM 12525 #define MFAIL_CKITOTM_ITEM_NOT_IN_TEAM 12526 #define MFAIL_RSV_UNKNOWN_MRG_TO_OWNER 12700 #define MFAIL_RSV_UNKNOWN_MRG_TO_FOLDER 12701 #define MFAIL_RSV_UNKNOWN_RSV_OWNER 12702 #define MFAIL_RSV_UNKNOWN_RSV_FOLDER 12703 #define MFAIL_RSV_ITEM_NOT_RESERVED 12704 #define MFAIL_CANCEL_RESERVE_SET 12705 #define MFAIL_RSV_ALREADY_RESERVED 12706 #define MFAIL_RSV_CREATE_ARGS_ERR 12707 #define MFAIL_MRG_TO_OWNER_UNKOWN 12708 #define MFAIL_MRG_TO_FOLDER_UNKOWN 12709 #define MFAIL_MRG_NOT_RSV_OWNER 12710 #define MRG_CONSISTENCY_CHECK_ERR 12711 #define MRG_CREATE_DIALOG_EXPECTED 12712 #define MFAIL_MRG_DIALOG_ERR 12713 #define MFAIL_RSV_NOT_ALLOWED 12714 #define MFAIL_ALREADY_CKO_TO_TEAM 12715 #define USC_TMS_NO_TEAM_FOLDER 12716 #define DMM_XLATE_NOT_ON_PLATFORM 12800 #define CCF_PRDPLNIT_NO_ROOT 14000 #define CCF_MFAIL_CHILD_INCORP_NOT_IN_PARENTS_RANGE 14100 #define CCF_MFAIL_BOTH_INCORP_DATES_MUST_BE_SPECIFIED 14101 #define CCF_MFAIL_END_INCORP_DATE_MUST_BE_GE_START_DATE 14102 #define CCF_MFAIL_CHILD_INCORP_UNITS_NOT_IN_PARENTS_RANGE 14103 #define CCF_MFAIL_BOTH_INCORP_UNITS_MUST_BE_SPECIFIED 14104 #define CCF_MFAIL_END_INCORP_UNIT_MUST_BE_GE_START_UNIT 14105 #define CCF_NO_INCORP_PNT_EXISTS 14106 #define CCF_NO_COMMITTED_INCORP_PNT_EXISTS 14107 #define CCF_MFAIL_EQ_END_DATE_MUST_BE_GE_EQ_START_DATE 14108 #define CCF_MFAIL_CHILD_EQ_DATES_NOT_IN_PARENTS_RANGE 14109 #define CCF_INVALID_CLOSURE_VALUE 14111 #define CCF_CLOSURE_DEPENDENCIES_NOT_SATISFIED 14112 #define CCF_INVALID_CLOSURE_ACTION 14113 #define CCF_NO_ORIGINATING_OBJECT_FOUND 14114 #define CCF_TASK_NOT_IN_CORRECT_STATE_FOR_CLOSE 14115 #define CCF_CUR_USER_NOT_ANALYST 14116 #define CCF_TASK_IS_IN_A_LIFE_CYCLE 14117 #define CCF_ASSIGN_TO_PROJECT_NOT_ALLOWED_FOR_CHGINFO 14121 #define CCF_COPY_NOT_ALLOWED_FOR_CHGINFO 14122 #define CCF_DELETE_NOT_ALLOWED_FOR_CHGINFO 14123 #define CCF_REVISE_NOT_ALLOWED_FOR_CHGINFO 14124 #define CCF_SUBMIT_NOT_ALLOWED_FOR_CHGINFO 14125 #define CCF_AFFECTS_REL_NOT_ALLOWED_WITH_CHGINFO 14126 #define CCF_REFERENCE_REL_NOT_ALLOWED_WITH_CHGINFO 14127 #define CCF_RESULTS_REL_NOT_ALLOWED_WITH_CHGINFO 14128 #define CCF_INCORRECT_BUSINESS_ITEM_FOR_REVISE 14131 #define CCF_ITEM_ALREADY_RESULTS_FROM_PRDPLNIT 14141 #define CCF_AFFECTS_REL_NOT_ALLOWED_WITH_PRDPLNMR 14151 #define CCF_AFFECTS_REL_NOT_ALLOWED_WITH_INCPNTMR 14152 #define CCF_JAVA_TASK_NO_ROOT 15000 #define EDT_INACTIVE_RESPPARTY_ERROR 15001 #define CCF_MFAIL_DATABASE_SCOPE_IS_NULL 15100 #define CCF_MFAIL_USER_LIST_IS_NULL 15101 #define VPD_DOWNLOAD_TSL_FILES_FAILED 16000 #define VPD_TSL_TOOL_NOT_FOUND 16001 #define VPD_TSL_SCRIPT_NOT_FOUND 16002 #define VPD_TSL_SCRIPT_PERMISSIONS_NOT_RIGHT 16003 #define VPD_TSL_SUB_DIR_CREATION_FAILURE 16004 #define VPD_TSL_LAUNCH_SCRIPT_FAILURE 16005 #define VPD_INVALID_DIRECTORY_PATH 16006 #define VPD_CANNOT_OPEN_MAP_FILE 16007 #define VPD_CANNOT_FIND_VIS_FILE 16008 #define VPD_CANNOT_DELETE_TSL_SUB_DIR 16009 #define VPD_CANNOT_GET_PATH_FORMAT 16010 #define VPD_CANNOT_FIND_VISUAL_OBJECTS 16011 #define VPD_FAILED_TO_LOAD_VIS_FILE 16012 #define MFAIL_VIS_FILE_DOES_NOT_EXIST 16100

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 22/34

#define MFAIL_VIS_COULD_NOT_FIND_SHATTERED_FILE 16101 #define MFAIL_VIS_PARENT_IDS_REQUIRED 16102 #define MFAIL_VIS_ACCESS_VAULT_DENIED 16103 #define MFAIL_VIS_INVALID_SAVE_TYPE 16104 #define OCC_ACTION_NOT_IN_FACTORY_CONTEXT 17000 #define OCC_INVALID_INPUT_ARGUMENTS 17001 #define OCC_OCCURRENCES_NOT_SUPPORTED 17002 #define OCC_MULTIPLE_FACTORIES 17003 #define OCC_FINDS_NO_REL_CLASS 17004 #define OCC_ID_MISSING 17005 #define CDS_INPUT_ATTR_NOT_COMPLETE 17500 #define CDS_NOOP 17501 #define CDS_NO_OBJ_BASED_ON_INPUT 17502 #define CDS_MULTIPLE_OBJ_BASED_ON_INPUT 17503 #define CDS_VALIDATION_REFUSED_WITH_EXT_SYS 17504 #define CDS_ITEM_NOT_REGISTERED 17505 #define CDS_CHKIN_NOT_ALLOWED 17506 #define CDS_DUPLICATE_PARTNUMBER 17507 #define CDS_NO_PRIMARY_KEY_FOR_CLASS 17508 #define CDS_INVALID_OBJECT_IN_LIST 17509 #define CDS_NO_CAD_FILE_FOUND 17510 #define CDS_CANNOT_DELETE_CADDOC 17511 #define CDS_CANNOT_DELETE_THIS_INSTANCE 17512 #define CDS_VAL_RLT_CRE_FAILED 17513 #define CDS_NO_CAD_DOC_FOUND 17514 #define CDS_MORE_THAN_ONE_CADDOC_FOUND 17515 #define CDS_CADESDOC_ACT_NOT_ALLOWED 17516 #define CDS_DOC_CHECKED_OUT 17517 #define CDS_NO_VALID_TEAM_LOCK_FOR_TEAM 17518 #define CDS_CHECKOUT_NOT_ALLOWED 17519 #define CDS_RESERVE_NOT_ALLOWED 17520 #define CDS_CLRRSV_NOT_ALLOWED 17521 #define CDS_RELEASE_NOT_ALLOWED 17522 #define CDS_MERGE_NOT_ALLOWED 17523 #define CDS_PRTDOC_FOR_TRNDOC_NOT_ALLOWED 17524 #define CDS_CANNOT_GET_STRING 17525 #define CDS_CANNOT_GET_OBJECT 17526 #define CDS_ASSOC_TRK_REL_CLASS_NULL 17527 #define CDS_ASSOC_TRK_REL_CLASS_INVALID 17528 #define CDS_TEMPLATE_COLLECTION_ALREADY_EXISTS 17529 #define CDS_TRKDESR_DEL_RHSOBJ_NOT_ALLOWED 17530 #define CDS_GET_DEP_DOCS_INVALID_OBJ 17531 #define CDS_INCONSISTENT_PRODUCT_STRUCTURE 17532 #define CDS_READ_FAILURE_ERR 17533 #define CDS_XML_ERROR 17534 #define CDS_ASSOC_REPL_RELOCC_CLASS_NULL 17535 #define CDS_LEFT_MEMBER_OBJECT_NOT_FOUND 17536 #define CDS_OBJECT_CLASS_NOT_GNCADOC 17537 #define CDS_INVALID_INPUT_ARGUMENTS 17538 #define CDS_MORE_THAN_ONE_PRTDOC_FOUND 17539 #define CDS_MORE_THAN_ONE_CADFIL_FOUND 17540 #define CDS_ITEM_NOT_IN_TEAM_OR_VAULT 17541 #define CDS_UNPACK_INTARGS_EMPTY 17542 #define CDS_OWNERSHIP_BOTH_SITES 17543 #define CDS_OWNERSHIP_FROZEN_CONFLICT 17544 #define CDS_NO_IDGENTOR_OBJ_FOUND 17545 #define CDS_CANNOT_DELETE_MEMBER 17546 #define CDS_NO_MASTER_FOR_THAT_ENTITY 17547 #define CDS_MULTIPLE_MASTER_FOR_THAT_ENTITY 17548 #define CDS_MORE_THAN_ONE_INST_FOR_TMTID 17549 #define CDS_CONTEXT_ENTITY_NOT_COPIED 17550 #define CDS_CWA_PROPAGATION_INCONSISTENCY 17551 #define CDS_INCONSISTENCY_RELATION_EXPAND 17552 #define CDS_NO_ITEM_FOUND_FROM_THE_UUID 17553 #define CDS_INVALID_RETRIEVAL_OPTION 17554 #define CDS_CANNOT_FIND_INSTANCE_WITH_RIGHT_ATT 17555 #define CDS_CANNOT_ADD_INSTANCE_TO_ENTITY 17556 #define CDS_CANNOT_GENERATE_PARTNUMBER 17557 #define CDS_NOT_FIRST_LEVEL_INSTANCE 17558 #define CDS_PARENT_IS_NOT_AN_ASSY 17559 #define CDS_PARENT_NOT_CHECKED_OUT 17560 #define CDS_CANNOT_COPY_THIS_ENTITY 17561 #define CDS_OBJECT_NOT_GNPRELEM_OR_AsRelOcc 17562

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 23/34

#define CDS_CWA_UNIQUENESS_VIOLATED 17563 #define CDS_CANNOT_RESERVE_MEMBER 17564 #define CDS_OCCURRENCES_NOT_SUPPORTED 17565 #define CDS_MULTIPLE_FACTORIES 17566 #define CDS_ACID_IN_USE 17567 #define CDS_NO_ITEM_FOUND_FROM_THE_GUID 17568 #define CDS_DSEX_NO_BASLIN_FOR_EXPORT_MOD 17569 #define CDS_DSEX_NO_FORZEN__FOR_EXPORT_MOD 17570 #define CDS_CDSPTPKG_OBJSET_IS_NULL 17571 #define CDS_INVALID_OWNERSHIP_CADDATA_COMBO 17572 #define CDS_DEL_RHSOBJ_NOT_ALLOWED 17573 #define CDS_GNCADOC_ACT_NOT_ALLOWED 17574 #define CDS_CANNOT_RESERVE_CACMMDOC 17575 #define CDS_PURGE_NOT_ALLOWED 17576 #define CDS_MEMBR_MRG_WITHOUT_TEMPL_NOT_ALLOWD 17577 #define CDS_CANNOT_CHECKIN_MEMBER 17578 #define CDS_COULD_NOT_GET_ROOT_TEMPL 17579 #define CDS_REF_PFM_DOC_DEL_NOT_ALLOWED 17580 #define CDS_CANNOT_RELEASE_PART_FAMILY_ITEM 17581 #define CDS_CNV_ITEM_IS_RESERVED 17582 #define CDS_INVALID_TRANSFORM_MATRIX 17583 #define ECS_PRTDOC_FOR_TRNDOC_NOT_ALLOWED 18500 #define MFAIL_NO_DEF_TRANSF_METHOD 18500 #define ECS_VAL_RLT_CRE_FAILED 18501 #define MFAIL_NO_DEF_TEMPLATE_LOC 18501 #define ECS_BOM_LOAD_NO_PARENT_PART 18502 #define MFAIL_BASE_OBJ_CLS_DIFF 18502 #define ECS_BOM_LOAD_BAD_CLASS 18503 #define ECS_BOM_LOAD_INCONSISTENT_PARENT 18504 #define ECS_GDI_NO_DOC_FOUND 18505 #define ECS_GDI_ONE_DOC_ONLY 18506 #define ECS_BOM_LOAD_HAS_MCAD_DATA 18507 #define ECS_BAD_INTENT_OPT_VALUE 18508 #define EMG_NO_MIGPARMS_OBJ_ERR 18900 #define EMG_NO_NEXTLINK_OBJ_ERR 18901 #define EMG_NO_DMIGUMIG_ATTR_VALUE_ERR 18902 #define EMG_INVALID_INPUT_ERR 18903 #define EMG_READ_FAILURE_ERR 18904 #define EMG_SQL_WHERE_ERR 18905 #define EMG_XML_ERR 18906 #define EMG_FILE_TRANSFER_ERROR 18907 #define EMG_NULL_ORIGFILEPARAM_ATTR 18908 #define EMG_SRC_OS_FILE_NOT_EXIST 18909 #define EMG_NO_MAP_OBJ_ERR 18910 #define EMG_NO_MIG_SRC_MAP_OBJ_ERR 18911 #define EMG_CONSTRUCT_MAP_OBJ_ERR 18912 #define EMG_NO_RELATION_MAP_OBJ_ERR 18913 #define EMG_NO_TARGET_OBJ_IN_MAP_ERR 18914 #define EMG_INVALID_TARGET_CLASS 18915 #define EMG_NO_TARGET_ATTR_IN_ATTR_MAP 18916 #define EMG_BAD_SRC_ATTR_IN_ATTR_MAP 18917 #define EMG_BAD_TARGET_ATTR_IN_ATTR_MAP 18918 #define EMG_TRGT_N_SRC_ATTR_TYPE_MISMATCH 18919 #define EMG_TRGT_N_TRGT_VAL_TYPE_MISMATCH 18920 #define EMG_MAPPING_ERR 18921 #define EMG_BAD_ROW_IN_ATTR_MAP 18922 #define EMG_BAD_VALUE_MAP_TABLE 18923 #define EMG_TRGT_VAL_NOT_FOUND_IN_VAL_MAP 18924 #define EMG_FLDR_OBJ_NOT_FOUND 18925 #define EMG_ERROR_IN_LOAD_PROCESSING 18926 #define EMG_GNCNTRLFIL_INVALID_INPUT_ERR 18927 #define EMG_INVALID_INPUT_AUDIT_PROCESS 18928 #define EMG_INVALID_MISSING_FILE_CLASS 18929 #define EMG_INVALID_AUDIT_CTRL_FILE_HOST 18930 #define EMG_INVALID_AUDIT_CTRL_FILE_PATH 18931 #define USC_XML_MFAIL_NO_CLASS_SPECIFIED 20000 #define USC_XML_MFAIL_ABSTRACT_CLASS 20001 #define USC_XML_MFAIL_NO_TYPE_SPECIFIED 20002 #define USC_XML_MFAIL_BAD_OUTPUT_HANDLER 20003 #define USC_XML_MFAIL_BAD_CONTENT_HANDLER 20004 #define USC_XML_MFAIL_BAD_SOURCE_HANDLER 20005 #define USC_XML_MFAIL_PARSER_FAILURE 20006

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 24/34

#define USC_XML_MFAIL_NOT_SUPPORTED_FAILURE 20007 #define USC_XSLT_BAD_STYLESHEET_CLASS 20008 #define USC_XSLT_BAD_INPUT_CLASS 20009 #define USC_XSLT_BAD_OUTPUT_CLASS 20010 #define USC_XSLT_FAILURE 20011 #define USC_XML_MFAIL_BAD_ENTITY_RESOLVER_HANDLER 20012 #define USC_XML_MFAIL_BAD_ERROR_HANDLER 20013 #define USC_XML_MFAIL_XALAN_NOT_AVAILABLE 20014 #define USC_XML_MFAIL_INPUT_FILE_FAILURE 20015 #define USC_XML_MFAIL_BAD_PROBLEM_LISTENER 20016 #define MDV_EXPRESSION_UNDEFINED 20101 #define MDV_OPT_VALUE_CONFLICT 20130 #define MDV_ITEM_NOT_IN_TEAM_OR_VAULT 20131 #define MDV_UNPACK_INTARGS_EMPTY 20132 #define IDC_INVALID_INPUT_ERR 20700 #define IDC_DATA_MAP_VAL_ERR 20702 #define IDC_BAD_CLS_MAP_HOST_OPT_ERR 20704 #define IDC_BAD_CLS_MAP_PATH_OPT_ERR 20705 #define IDC_NO_PSMAP_OBJS_ERR 20708 #define IDC_NO_DEFAULT_RLT_CLS_FOUND 20710 #define IDC_NO_CDS_OBJECTS_TO_CREATE 20711 #define IDC_NO_DEFAULT_TGT_CLS_LST 20712 #define IDC_CADESDOC_NULL_VERSIONUUID 20713 #define IDC_PART_NULL_MATCHOBID 20714 #define IDC_NO_PART_NAME_FOUND 20715 #define IDC_XML_ERR 20717 #define IDC_READ_FAILURE_ERR 20718 #define IDC_INVALID_CLASS 20719 #define NO_ATTR_MAP_FOUND_FOR_TGT_CLS 20720 #define RELATION_MAP_NOT_FOUND 20721 #define NO_DESTOBJS_FOUND_FOR_IDCVER 20722 #define NO_VERSIONGUID_FOR_IDEAS_VERSION 20723 #define NO_PKG_FILE_TO_PROCESS 20724 #define IDC_NO_ORBIX_HOST 20725 #define IDC_NO_ORBIX_SERVER 20726 #define IDC_NO_OCC_DATA_STREAM 20727 #define IDC_NO_CAXMLFil_OBJS_ERR 20728 #define IDC_NO_DATA_MAP_OBJ_ERR 20729 #define IDC_NO_SOURCE_ATT_OBJ_ERR 20730 #define IDC_NO_DFLT_VALUE_ERR 20731 #define IDC_DEST_VAL_NOT_FOUND 20732 #define IDC_NO_VALUE_MAP 20733 #define IDC_DATA_MAP_PARSE_ERR 20734 #define IDC_DATA_MAP_NO_FOLDERS_EXIST 20735 #define IDC_DATA_MAP_INVALID_FOLDER 20736 #define IDC_NO_OWNER_FOUND 20737 #define IDC_DATA_MAP_INV_LOCATION 20738 #define ORB_AND_EXCHANGE_HOST_NOT_SAME 20739 #define IDC_GENERATE_GUID_ERR 20740 #define IDC_TRANS_IDCVERS_CDS_ERR 20741 #define IDC_PROCESS_REL_ERR 20742 #define IDC_NO_IDEAS_VER_OBJ 20743 #define IDC_NO_IDC_VER_OBJ 20744 #define IDC_INV_ASSM_STRUCTURE 20745 #define IDC_PSMAP_PARSE_ERROR 20746 #define IDC_NO_STAGEING_LOCATION 20747 #define IDC_NO_PSMAP_FOUND 20748 #define IDC_FILE_WRITE_ERROR 20749 #define IDC_NO_OWNERDIR_FOUND 20750 #define IDC_INVALID_SRC_ATTR 20751 #define IDC_NO_OWNER_MAP_IN_VALUE_MAP 20752 #define IDC_WORKSDIR_ERROR 20753 #define CDS_DSEX_PKG_FILE_EACCES 20754 #define CDS_DSEX_PATH_PKG_MISMATCH 20755 #define CDS_DSEX_PKG_FILE_UNKNOWN 20756 #define IMP_INVALID_INPUT_ERR 20757 #define CDS_IMP_VALIDATION_ERROR 20758 #define CDS_DS_EXPORT_ERROR 20759 #define IDC_INVALID_DS_MAP 20760 #define IDC_NO_TARGET_CLASS_FOUND 20761 #define IDC_NO_TARGETMAP_FOUND 20762 #define IDC_INVALID_ATTR_MAP 20763 #define IDC_EXPORT_MAPFILE_NOT_SET 20764

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 25/34

#define IDC_EXPORT_MAPFILE_HOST_NOT_SET 20765 #define IDC_INVALID_TARGET_CLASS 20766 #define IDC_PRIFILENAME_NOT_FOUND 20767 #define IDC_LOAD_ERR 20768 #define IDC_DSEX_NO_EXPORT_FOR_MOD 20769 #define IDC_NV_MISMATCH 20770 #define PRED_OBJECT_NOT_FOUND 20771 #define IMPORT_CONFLICT_FOUND 20772 #define NO_IDC_ITEM_FOUND_FOR_VERGUID 20773 #define RESERVE_CONFLICT_FOUND 20774 #define MATCH_CONFLICT_FOUND 20775 #define FIRST_LVL_CHILD_NOT_FOUND 20776 #define IDC_CUR_PART_NAME_NULL 20777 #define IDC_NEW_PART_NUM_NULL 20778 #define IDC_NEW_DOC_NAME_NULL 20779 #define IDC_PART_NO_CONFLICT_ERROR 20780 #define IES_ERR_BASE 21000 #define IES_NOT_YET_IMPLEMENTED 21000 #define IES_INVALID_OPERATION 21001 #define IES_VALIDATION_FAILURE 21002 #define IES_IDEAS_PASSPORT_TO_UUID_FAILED 21010 #define IES_IDEAS_CONNECTION_FAILED 21012 #define IES_IDEAS_INCOMPATIBLE_PCLSVR 21013 #define IES_IDEAS_DISCONNECT_FAILED 21014 #define IES_IDEAS_DESTROY_OPERATION_FAILED 21015 #define IES_CANNOT_WRITE_TO_IDEAS_LOG 21016 #define IES_IDEAS_LOG_WRITE_FAILED 21017 #define IES_RELEASE_IDEAS_OBJECTS_FAILED 21018 #define IES_MIGRATION_GUID_QUERY_FAILED 21020 #define IES_MIGRATION_QUERY_RETURNED_ZERO_GUIDS 21021 #define IES_MIGRATION_EXTRACT_FAILED 21022 #define IES_MIGRATION_EXTRACT_PRODUCED_NO_ITEMS 21023 #define IES_CREATE_STAGING_LOC_FAILED 21024 #define IES_EMPTY_STAGING_LOCATION_FAILED 21025 #define IES_DELETE_STAGING_LOCATION_FAILED 21026 #define IES_GET_IDEAS_CONFIGURATION_FAILED 21027 #define IES_MIGRATION_INVALID_GUID 21028 #define IES_IMPORT_PACKAGE_FAILED 21030 #define IES_IMPORT_PACKAGE_PRODUCED_NO_ITEMS 21031 #define IES_IMPORT_GET_IDEAS_VERSION_FAILED 21032 #define IES_COLLECTION_IS_FINALIZED 21033 #define IES_EXPORT_TO_PACKAGE_FAILED 21034 #define IES_EXPORT_PUTOBJ_FAILED 21035 #define IES_SET_ATTR_ERROR 21036 #define IES_SET_USER_ATTR_ERROR 21037 #define IES_INVALID_ATTR_ERROR 21038 #define IES_EXPORT_PACKAGE_FAILED 21039 #define IES_INVALID_INVALID_ITEMTYPE 21040 #define IES_EXPORT_FLUSHOBJ_FAILED 21041 #define IES_ATTR_NULL 21042 #define IES_EXPORT_SET_REL_ATTR_FAILED 21043 #define IES_EXPORT_RESET_ATTR_FAILED 21044 #define IES_INVALID_REL_TYPE 21045 #define IES_DSEX_PKG_FILE_MAXLENGTH 21046 #define IES_CREATE_PKG_FILE_FAILED 21047 #define IES_INVALID_CONFIG_PARAM 21048 #define IES_DS_EXP_FT_ERROR 21049 #define IES_GET_IDEAS_PROJECTSLIBS_FAILED 21050 #define IES_NO_MSG_ACCESS_DS_EX_OBJ 21051 #define IES_DSEX_PKG_FILE_EACCES 21052 #define IES_DSEX_PATH_PKG_MISMATCH 21053 #define IES_DSEX_INVALID_FILE_EXT 21054 #define IES_DSEX_PKG_FILE_EEXIST 21055 #define IES_DSEX_PKG_FILE_ENOENT 21056 #define IES_DSEX_PKG_FILE_UNKNOWN 21057 #define IES_ACR_VALIDATION_FAILED 21058 #define CTLFL_INVALID_INPUT_ERR 21201 #define OCCID_PRC_INVALID_INPUT_ERR 21202 #define ieeIDSEXT_ACR_RIGHT_MISSING 21500 #define ieeUNKNOWN_CLASS 21501 #define IEE_NO_DEFAULT_TGT_CLS_LST 21502 #define IEE_MULTIPLE_TGT_CLS_LST 21503 #define ieeIDSEXT_INVALID_NUM_FILES 21504

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 26/34

#define IEE_NO_ATTR_MAP_IN_MIGSRCOBJ 21505 #define ieeUNKNOWN_IDEAS_ITEM_TYPE 21506 #define IEE_TGT_CLS_NOT_MATCH 21507 #define IEE_NO_REL_CLS_LST 21508 #define ieeUNKNOWN_IDEAS_REL_TYPE 21510 #define IEE_NO_OWNER_MAP_IN_VALUE_MAP 21511 #define IEE_INVALID_SRC_ATTR 21512 #define IEE_INVALID_INPUT_ERR 21513 #define IEE_INVALID_SITE_ATTRIBUTE 21514 #define IEE_INVALID_CLASS_ATTRIBUTE 21515 #define CNTRLFIL_INVALID_INPUT_ERR 21516 #define REP_HOST_REP_PATH_NULL 21517 #define AUD_INVALID_REP_HOST 21518 #define AUD_INVALID_REP_FILE_PATH 21519 #define INVALID_AUD_PARAM_OBJ 21520 #define CNTRL_HOST_CNTRL_PATH_NULL 21521 #define AUD_INVALID_CLASS_OR_GUID 21522 #define NPD_PROC_INST_NUM_NULL 21700 #define NPD_INVALID_OWNER_NAME 21701 #define NPD_INVALID_LC_NAME 21702 #define NPD_INVALID_PHASE_GATE_USAGE 21703 #define CPG_CAN_ATTACH_ONE_DOC 21801 #define CPG_CANNOT_ATTACH_SAME_DOC 21802 #define CPG_CANNOT_ATTACH_SAME_PKG 21803 #define CPG_PROC_INST_NUM_NULL 21804 #define WSM_COPY_NOT_ALLOWED_FOR_ENTTSK 22000 #define MFAIL_ZIPDATA_FAILED 22500 #define XRF_INVALID_STYSTDOC_OUTPUT_TYPE 22901 #define XRF_MFAIL_DATABASE_SCOPE_IS_NULL 22902 #define ICM_INVALID_INPUT_IN_CNTRFL_PROCESS 23100 #define ICM_AUD_CNTRL_HOST_OR_PATH_NULL 23101 #define ICM_AUD_REP_HOST_OR_PATH_NULL 23102 #define ICM_INVALID_INPUT 23103 #define ICM_PKG_HAS_NO_OBJS 23104 #define ICM_IMIPNUM_UPD_FAILED 23105 #define ICM_INVALID_SRC_CLASS 23106 #define ICM_INVALID_TGT_CLASS 23107 #define PIP_TOO_MANY_WOLF_LINKS_FOUND 23200 #define PIP_PARAM_OBJECT_IS_NULL 23201 #define NO_LIFECYC_TO_SUBMIT 23300 /* No life cycle found to accept to submit*/ #define ERI_COPY_NOT_ALLOWED_FOR_REQITEM 23345 #define ERI_OBJECT_ALREADY_CREATED 23346 #define ERI_REVISE_NOT_ALLOWED_FOR_REQITEM 23347 #define ERI_REL_ALREADY_CREATED 23348 (Custom reserved:) #define tx0_26001_FIRST_MFAIL_DEFINE 26001 #define HTE_ITEM_ALREADY_RESULTS_FROM_PARTREQUEST 201000 #define HTE_RESULTS_REL_NOT_ALLOWED 201001 Level Values: ------------ #define USC_MTI_2_0 "MTI_2_0" #define USC_MTI_2_2 "MTI_2_2" #define USC_MTI_3_0 "MTI_3_0" #define USC_MTI_3_1 "MTI_3_1" #define USC_MTI_3_2 "MTI_3_2" #define USC_MTI_321 "MTI_321" #define USC_MTI_3_3 "MTI_3_3" #define USC_CF_3_0 "CF_3_0" #define USC_TCE_3_1 "TCE_3_1" ==== RULES according manual ===== mfail codes Reserved for: 1-999 System 1000-1049 General OMF 1050-1074 OMF Transfer

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 27/34

1070-1099 OMF Drop on Window 1100-1124 OMF Edit 1125-1149 OMF Relate 1150-1175 OMF TrnCtrl 2000-2999 General LCM 3000-4999 General APC 6000-6999 ISC 7000-7999 Pro/ENGINEER 8000-8999 Mentor Graphics 9000-9999 Integrator Toolkit 25000-... Customization

5.3.3 Reporting „Database Integrity Error“ When you get an attention box with the message of “Database Integrity Error” then most probably there is

nothing wrong in the database. But you might detect a bad programming style.

This message occurs when Teamcenter Enterprise tries to do an update of an object in the database, but the attribute “LastUpdate” on the database is younger than in the memory copy of the object.

This happens, when you have your customized method, which does directly or indirectly update the object on the database, while another message has prepared the object in memory to be updated in the database.

The direct case is easy to find. The indirect case may be a construction similar to one seen in the field: In a customized ‘DoUpdatePre’ you handle some relationship of ‘thisObj’. In the relative message to the relation class you do an ‘UpdateDbObject’ on left or right object, thus do explicitly an update in the database onto an object, that is in preparation. There is an easy way out: in your customized ‘DoUpdatePre’ you need after the call to relationship handling a ‘RefreshDbObjQuiet’ to ‘thisObj’.

6 User Interface

6.1 Multipel Locales Language dependent files are defined in model code (xxx.met files) through ‘display’ and ‘translate’

statements. The language dependent texts are spread among all sources files (xxx.met and xxx.mth). They are written as comment. If you are using multiple locales, then I recommend for your customization a local convention (caution: not standard!), that allows to define two (or more) locale’s texts to be defined next to each other. In a compilation you the may separate them with an AWK script.

This probably is the only way of keeping the locales in sync.

6.1.1 Sample text definition: Text in xxx.met // //.TXT TextIdent //.This is the english text with //.#PRODVER# text substitution field. //.HLP //.This is the english help text part. //.CMT //.Questo è lo stesso testo in italiano //.con #PRODVER# campo di sostituzione. //.HL2 //.Questo è il testo di aiuto in //.italiano. //.CM2 //.any comment //.TextIdent //

Text in xxx.mth /* *.TXT TextIdent *.This is the english text with *.#PRODVER# text substitution field. *.HLP *.This is the english help text part. *.CMT *.Questo è lo stesso testo in italiano *.con #PRODVER# campo di sostituzione. *.HL2 *.Questo è il testo di aiuto in *.italiano. *.CM2 *.any comment *.TextIdent */

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 28/34

6.1.2 AWK script sample “generate.second.locale” #!/usr/bin/awk –f # awk script for extracting 2nd locale BEGIN { SkipFlg = "No" } /^TXT / { print $0 SkipFlg = "Yes" next } /^CMT/ { if ( SkipFlg == "Yes" ) { SkipFlg = "No" next } } /^HL2/ { print "HLP" next } /^CM2/ { print "CMT" next } { if ( SkipFlg == "No" ) { print $0 } }

Call it as “generate.second.locale cusen_us.txt > cusxx_xx.txt”.

6.2 Dialog Editor It is strongly forbidden to edit xxx.frm files with a text editor, even they look much like a text file. A transfer

between different platforms must strictly be done in binary mode for both form and icon files.

Edit dialog boxes:

The dialog editor utility “dwe” may crash somtimes on some platforms. Therefore the following rules are recommended:

1. A dialog may only be edited after a full compilation and having the new data dictionary (tmti.prd) active (mux and dispatcher running), since dialog classes first must be defined in a xxx.met file and “dwe” is using the data dictionary through run time routines.

2. Before starting the editor utility, copy the accumulated form file “From.frm” onto “form.bak”.

3. Whenever the dialog editor utility crashes, recover earlier work by copying the file “form.bak” back over “From.frm”. (Often after a crash “dwe” corrupts the accumulated form file so badly, that all (custom and standard) dialogs may be completely ruined.

4. When the dialog editor is running, you may edit ONE dialog at a time. To start a dialog you can either open it from the previous installations information (option OPEN in file menu), or – if you did already edit it – load it from last save (option LOAD from file menu, select <dialog>.frm, where dialog is the classname of your dialog in all lower case). The second option is faster and allows recovering edited dialogs lost in last dwe-crash.

5. Editing a dialog means: moving fields around, hide/unhide fields, change visible length and visible field length.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 29/34

6. After editing a dialog, you must save it. Then you should verify your work through the TEST option in file menu. This is the only way, to see the real appearance of your new dialog; in the editor itself some filed may appear in a very strange fashion. Then you need to close the dialog (not the dialog editor), before you can edit the next dialog. The first save in an edit session is normally very slow; subsequent ones are faster.

7. Do not run parallel edit sessions using the same accumulated file. This is giving a corrupted “Form.frm”.

8. When editing dialogs, respect the class hierarchy of dialogs. If you strongly follow the rule to edit parent dialog class before child dialogs, you will have much less manual work. What ever you edit in a parent dialog, will automatically be inherited by child dialogs, as long as the respective fields have not been touched in the local editing of the child class. Once you have edited a dialog, the touched fields will no more inherit from changes at parent in terms of position, hidden and visual length.

It is possible to mention the accumulated form file “Form.frm” in the “srccusmk.def” rather than all the single form files. Otherwise you edit the “srccusmk.def” file after each new dialog you edit. This often is not updated and you wonder why the system will not show up the newly edited dialog.

7 Query Scopes For all query API’s you need to specify a SCOPE, either “SC_SCOPE_OF_SESSION” or “SC_SCOPE_WHERE_NEEDED”. In a mono base system this is not relevant at all. But in a distributed envi-ronment this can have major influence on the performance.

a) SC_SCOPE_OF_SESSION: The query runs against the data bases actually in users scope. This should be the correct case for most situations. Exception are queries for classes in a replica set: here the system knows exactly, in which to find it, and it will search only there.

b) SC_SCOPE_WHERE_NEEDED: The Query runs against ALL data bases: This means eventually over all continents; and even over data bases which must not be used (like the KeyDB). This option should really carefully be used. Only some few messages react as we would interpret the word “where needed”.

There are a few API’s, which do not care about the scope, even some need it in input, since the input objects are relations, which exactly define the residence of left and right object:

• QueryDbRelationsItems3

• GetBothItemObjOfRel

• GetRelatedObjects3

Thus the scope “SC_SCOPE_WHERE_NEEDED” should be avoided wherever possible. If you need a specific scope, you better change the scope of the session temporarily through “smSetSessionDbScope”.

Be careful if you want to restore after the action the original scope: “smGetSessionDbScope” gives you back a pointer to a SetOfStrings. But it points into the session object. Thus if you change later the scope through “smSetSessionDbScope”, your pointer points to a memory location that has been unallocated.

A correct sample is: SetOfStrings origScope = NULL; SetOfStrings loclScope = NULL; SetOfStrings strSet = NULL; …… if (dstat = smGetSessionDbScope(&strSet)) goto EXIT; low_set_cpy_str(origScope,strSet); if ( origScope == NULL ) { dstat = uiOutOfMemory();

3 ) May give back „Out of Scope“ objects. A refresh brings the real object.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 30/34

goto EXIT; } …… loclScope = low_set_create_str(2); i = low_set_add_str(loclScope,DB1); if ( i < 0 ) { dstat = uiOutOfMemory(); goto EXIT; } if (nlsStrCmp(DB1,DB2)) { i = low_set_add_str(loclScope,DB2); if ( i < 0 ) { dstat = uiOutOfMemory(); goto EXIT; } } if (dstat = smSetSessionDbScope(loclScope)) goto EXIT; /* Process here your Query */ …… if (dstat = smSetSessionDbScope(origScope)) goto EXIT;

There is no need to set a specific scope for objects being assigned to a replica set. This is handled automatically by Teamcenter Enterprise.

8 Some sample codes Sort a set of object according your own rule

This sample is from Willi Engemann and shows how to sort a set of objects in alphabetical order relative to the attribute “MyAttrib”:

a) define a static function like this: static status sortObject ( ObjectPtr Obj1, ObjectPtr Obj2 ) { string myatt1 = NULL; string myatt2 = NULL; status dstat = OKAY; status statn = 0; if (dstat = objGetAttrbute(Obj1,MyAttribAttr,&myatt1)) goto EXIT; if (dstat = objGetAttrbute(Obj2,MyAttribAttr,&myatt2)) goto EXIT; statn = nlsStrCmp(myatt1,myatt2); EXIT: /* cannot react here on bad "dstat " */ return(statn); }

b) within your method call “low_set_gsort”: low_set_gsort (MyObjSet,sortObject);

String pointer into an object This illustrates the behavior of strings got through “objGetAttribute” (see 2.4.1 objGetAttribute, page 4) ... string myatt = NULL; ... if (dstat = objGetAttribute(thisObj,MyAttribAttr,&myatt)) goto EXIT; if ((nlsIsStrNull(myatt)==0) && (nlsStrLen(myatt) > 4)) { myatt[3] = 'A'; if (dstat = UpdateDbObject(thisObj,mfail)) goto EXIT; if (*mfail) goto CLEANUP; } ...

If at this moment all system attributes of “thisObj” correspond exactly (i.e. mainly the LastUpdate attribute) to what is stored in the database, then the fourth character in attribute “MyAttrib” is changed to an “A”, both in memory and on the database. Otherwise “UpdateDbObject” will report a ‘database integrity error’.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 31/34

9 Miscallaneous

9.1 Custom Servers Generally it is recommended to design a customization as one custom server in terminology of Team-

center Enterprise.

For performance reasons it is recommended to use “Dynamic Unified Server” option, thus include all your code as a dynamic linked library to the standard object server (objserv).

[Under Metaphase 2.2 we used “Unified Server” instead (uniserv)]

The only services, which must by distinct by force are services that communicate to other programs, which are available on specific hosts only and services which are called as a “batch” or event trigger in the background like advancerserv through triggers or expireserv through scheduleserv.

Methods intercepting the interactive message flow should be in the objserv whenever possible. This is very performance sensitive: “A message resolves to a method in omfserv, call at parent resolves to customserv, call at parent resolves to omfserv” should not invoke two server hops (switch process, passing argument as portions of managed memory).

If one of your methods then connects to a non Teamcenter Enterprise application through another method than arbitrary RPC calls, then this method is a candidate to be included in a separate Teamcenter Enterprise service, which runs only on a host running that specific application. If your method only eventually calls the external system, then divide it in two messages:

1. one to be called interactively, which does all the checks and local actions, but not the real connection to the external system.

2. one performing only the real external system call, and will be called only if all conditions are met.

Only the second method resides in the separate Teamcenter Enterprise service running on the relative host only.

9.2 Subclassing and Methods For similar behavior of several classes use abstract classes inserted into the class hierarchy and attach

the relative messages to that abstract class.

To override messages at class “BusItem” insert “j0BI” class direct under “BusItem” and attach the overriding method to it. If you just add additional processing, use the “xxxAtParent(j0BIClass,…” at correct place within your code; if you want to skip the standard at “BusItem”, use “xxxAtParent(BusItemClass,…”. (But this may be dangerous, if additional standard modules use similar inserts with methods you should not skip.)

Main difference between a message and a function: functions are class independent, while messages resolve to different methods depending on class without any difference on calling mechanism (thus I can send a message to any class with one single statement, but it resolves to different methods depending on the class of the object(s) to which the message is sent). Functions generally (except the standard C functions and the ones described in Teamcenter Enterprise API manual) are available only throughout the actual module, but not cross modules.

Lots of persistent sub-classes and Queries over super-classes may result in lots of DB query requests, one per class table.

Too many classes may reduce performance behavior. Thus do define subclasses only, if it is really necessary.

Prefer to override methods of standard messages than creating new messages (i.e. override “Open” rather than define “myOpen”). This will reduce resolving time and complexity of the application, including rules.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 32/34

10 Upgrade: Obsolete / deprecated messages and objects Upon a system upgrade of Teamcenter Enterprise it may happen that classes, attributes or messages are

no longer valid or supported.

The utility ‘vfysourc’ can be used to identify in all source codes (model and methods) any of these out of date items. Each release includes therefore the required input data files “obsolete.txt” and “deprectd.txt” in the directory “$MTI_ROOT/install/upgrade” (Windows: “%MTI_ROOT%\install\upgrade”).

10.1 Obsolete Items Obsolete items are no longer valid / supported. You need to correct the source and replace these items

by their relative replacement items. They are illegal in this release. You cannot compile your customization, or it will not run correctly.

10.2 Deprecated Items Deprecated items will be obsolete in the next release. In this release both the old and new item are

supported. This allows you to carefully change your customization, so that you are ready for next release, when it will be available.

It may happen, that deprecated messages are less performing than their replacement (new) ones.

In some cases you need to change a special condition to take full advantage of the new messages. This is documented in the “Release Bulletin” or the “Upgrade Manual”.

10.3 Usage of ‘vfysourc’ ‘vfysourc’ checks all model and method source files within a directory. It checks all occurrences, whether

they are code, comments or display strings. Thus not all reported cases must be relevant.

Here the arguments of ‘vfysourc’: vfysourc -h *** The purpose of vfysourc is to search a specified directory structure for specified files which makeup your Teamcenter customization. Once these files are found, they are searched for items such as API's, that will be obsolete in a future version of Teamcenter. Simply cd to location of where you want to search and run vfysourc. The file that contains the items that will be obsolete is automatically read and the results are put to the screen (default) or a file. usage: vfysourc [-d dir] [-i input_file] [-o out_file] [-c] [-C] [-v] [-h] options: d - Optional: Start searching at this directory. i - Optional: Input file containing names of API's, Classes and Attributes that will are to be obsolete and/or replaced. When set, this option will override the automatic reading of the obsolete.txt file. o - Optional: Output file. c - Optional: Only check C, C++, and Java files. C - Optional: Check C, C++, and Java files in addtion to Method, Model, and data files. v - Optional: Verbose mode. Print names of directories to stdout as they are processed. H - Optional: Print this help.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 33/34

Here an extract from a vfysourc-output sample (with comments): Search for: Create Replace with: CreateItemDP In file: b_ccm.met At line 20: // Create in Relation Browser

This is just a comment; thus the reported item is not relevant. It is more important, that such comments are useful documentations to the code than that they reflect exact message names.

Search for: Create Replace with: CreateItemDP In file: b_ccm.met At line 21: // *** Create Option for Efficiency Test Start Instruction *** ///

This is just a comment; thus the reported item is not relevant. It is more important, that such comments are useful documentations to the code than that they reflect exact message names.

Search for: CreateItemAndRel Replace with: CreateItemItemAndRelDP In file: b_ccm.met At line 22: define hidden option lugCcmCreEckIROpt using message CreateItemAndRel with class l0ECkIns;

This is a message called by our custom menu option. It must be changed to call the new message name. This is a required model change.

Search for: ExpandInWindow Replace with: ExpandObjectInWindowDP In file: b_pcadb.met At line 90: using message ExpandInWindow

This is a message called by our custom menu option. It must be changed to call the new message name. This is a required model change.

Search for: DoPromotePost Replace with: DoChangeStatePost In file: c_ccmx.met At line 29: attach message DoPromotePost to WrkOrder in server lugsvr;

This is the model “attach” statement of an overridden standard message. As the standard message has changed its name, we need to change the name of our custom method accordingly.

Search for: Create Replace with: CreateItemDP In file: c_countr.met At line 147: display Dl0ctCre as "Create #CLASS_ID#" in en_us;

This is just a display statement, which the user sees as a window title. The user is not interested in seeing the internal message names here. The action, he is performing, is still “CREATE”, even so the relative message/method is named “CreateItemDP”.

Search for: ExpSetGetRelObjsCri Replace with: ExpSetGetRelObjsCtxt In file: e9cmprel.mth At line 151: message e9relcat:ExpSetGetRelObjsCri (

This is a method code definition statement of an overridden standard message. It has to comply with the new replacement message.

Search for: ExpSetGetRelObjsCri Replace with: ExpSetGetRelObjsCtxt In file: e9cmprel.mth At line 161: MODNAME("e9relcat:ExpSetGetRelObjsCri");

This is the definition of trace back information for an overridden standard message. It has to comply with the method definition, even it is only a text shown in trace backs.

Search for: ExpSetGetRelObjsCri Replace with: ExpSetGetRelObjsCtxt In file: e9cmprel.mth At line 322: if (dstat = ExpSetGetRelObjsCri ( classname1, srcObjs,

This sends a standard message to an object or class, which has changed name. This must comply with the new message name and signature.

Teamcenter Enterprise: Guidelines for Customizing 2. March 2008 (V9.12) / Erich Brauchli

Erich Brauchli – PLM-ConsultingErich Brauchli – PLM-Consulting

D:\Dokument\Metaphase\Programming Guide\ITIMTI-D_TCE-Custom.doc ITI-MTI-D page 34/34

Search for: ExpSetGetRelObjsCri Replace with: ExpSetGetRelObjsCtxt In file: e9cmprel.mth At line 422: if (dstat = ExpSetGetRelObjsCriAtParent (classname, classname1,

This sends a standard message to an object or class, which has changed name. This must comply with the new message name and signature. Do not forget the “AtParents”.