T4EA  18.1 C7177 A20283
Teamcenter Gateway for Enterprise Applications API Reference
T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT Namespace Reference

Functions

 cleanUp Function ObjectId BatchJobStatus AdditionalInfo args
 Customer specific function to start an additional customer specific cleanup after the normal update. More...
 
 createTC_Object Function ObjectId AdditionalInfo args
 Customer specific function for the creation of a Tc item based on an object. More...
 
 GenObjMapping2TC_Object Function ItemType ItemRevisionType ObjectId AdditionalInfo args
 Customer specific Mapping function for the import/update of a generic object. More...
 
 getObjectInfo ObjectId AdditionalInfo args
 Customer specific Mapping function for retrieving the object information. More...
 
 getTargetRevisionFromList ItemRevisionTagList args
 Customer specific Mapping function for the selection of the correct item revision from a given list of item revisions. More...
 
 getXmlData ObjectId KeyName
 Helper function to savely retrieve a value from ERPOutputDat, even if the key does not exist. More...
 
 initImportInfo args
 Initializes the namespace variable "ImportInfo". More...
 
 selectTC_Object Function ObjectId AdditionalInfo args
 Customer specific select function to identify the corresponding target item revision. More...
 
 Set_ZPTC_Status ZPTC_Id Status ?Error_Msg1? ?Error_Msg2? ?Error_Msg3? args
 Customer specific function to set a status including error messages for an entry in the z-table. More...
 
 updateTC_Object Function ItemTag ItemRevisionTag ItemType ItemRevisionType ObjectId AdditionalInfo args
 Customer specific function to start an additional customer specific post-action after the normal update. More...
 
 verifyZTableIdStatus LogChannelName FunctionName ZTabId args
 Customer specific function to verify the status of an entry in the z-table. More...
 

Variables

 ERPOutputDat
 Variable to store data to be imported. More...
 
 ImportInfo
 This variable stores the input from the EA system. More...
 

Function Documentation

◆ cleanUp()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::cleanUp   Function ObjectId BatchJobStatus AdditionalInfo args  

Customer specific function to start an additional customer specific cleanup after the normal update.

Parameters
Functionfunction name
ObjectIdobject id
BatchJobStatusbatch job status
AdditionalInfoadditional info
argsadditional arguments
Returns
"OK" or "ERROR"

References T4X::CORE::getSessionLogChannel(), and tpwrite().

◆ createTC_Object()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::createTC_Object   Function ObjectId AdditionalInfo args  

Customer specific function for the creation of a Tc item based on an object.

Parameters
Functionfunction name
ObjectIdobject id
AdditionalInfoadditional parameters given to the import job
argsadditional arguments
Returns
list of "OK" and Tc item or list of "ERROR" and error message

References T4X::CUSTOM::MAPPING::TOOLBOX::createTC_Object(), T4X::CORE::getSessionLogChannel(), getXmlData(), and tpwrite().

◆ GenObjMapping2TC_Object()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::GenObjMapping2TC_Object   Function ItemType ItemRevisionType ObjectId AdditionalInfo args  

Customer specific Mapping function for the import/update of a generic object.

Parameters
Functionfunction name
ItemTypeitem type
ItemRevisionTypeitem revision type
ObjectIdobject id
AdditionalInfoadditional info
argsadditional arguments

References T4X::CORE::getSessionLogChannel(), getXmlData(), T4X::TC::MAPPING::storeReverseMappingAttribute(), and tpwrite().

◆ getObjectInfo()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::getObjectInfo   ObjectId AdditionalInfo args  

Customer specific Mapping function for retrieving the object information.

Parameters
ObjectIdobject id
AdditionalInfoadditional info
argsadditional arguments
Returns
list of "OK" and "ObjectId" or list of "ERROR" and error message

References T4X::CORE::getSessionLogChannel(), T4EA::CUSTOM::SERVICES::ofBIZservice(), and tpwrite().

◆ getTargetRevisionFromList()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::getTargetRevisionFromList   ItemRevisionTagList args  

Customer specific Mapping function for the selection of the correct item revision from a given list of item revisions.

Parameters
ItemRevisionTagListlist of item revision tags
argsadditional arguments (unsued)
Returns
list of "OK" and item revision or list of "ERROR" and error message

References ITK::getObjectMetaData(), T4X::CORE::getSessionLogChannel(), and tpwrite().

Referenced by selectTC_Object().

◆ getXmlData()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::getXmlData   ObjectId KeyName  

Helper function to savely retrieve a value from ERPOutputDat, even if the key does not exist.

Parameters
ObjectIdobject id
KeyNamekey name
Returns
the value for the key KeyName in ERPOutputDat or {} if the key does not exist

References T4X::CORE::getSessionLogChannel(), and tpwrite().

Referenced by createTC_Object(), and GenObjMapping2TC_Object().

◆ initImportInfo()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::initImportInfo   args  

Initializes the namespace variable "ImportInfo".

Parameters
argsadditional arguments (unused)

◆ selectTC_Object()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::selectTC_Object   Function ObjectId AdditionalInfo args  

Customer specific select function to identify the corresponding target item revision.

Parameters
Functionfunction name
ObjectIdobject id
AdditionalInfoadditional parameters given to the import job
argsadditional arguments
Returns
Return code used by the following import function. The following values are valid:
FOUND $ItemRevisionTag -> T4X will continue the import execution with proc GenObjMapping2TC_Object

OK $ItemRevisionTag -> T4X will continue the import execution with proc GenObjMapping2TC_Object
NOT_FOUND $ErrorMessage -> T4X will continue the import execution with proc createTC_Object (using search query)
ITEMID_DOESNT_EXIST $ErrorMessage -> T4X will continue the import execution with proc createTC_Object (using ITK::ITEM_exists)
SKIPPED -> T4X will stop the import execution successfully without an error
any other return value -> T4X treats it as an error, there by customised error returns with info when/why the error occured are supported

References ITK::executeQuery(), T4X::CORE::getSessionLogChannel(), getTargetRevisionFromList(), ITK::ITEM_exists(), T4X::CUSTOM::MAPPING::TOOLBOX::selectTC_Object(), and tpwrite().

◆ Set_ZPTC_Status()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::Set_ZPTC_Status   ZPTC_Id Status ?Error_Msg1? ?Error_Msg2? ?Error_Msg3? args  

Customer specific function to set a status including error messages for an entry in the z-table.

Parameters
ZPTC_Idz-table entry id
Statusstatus to set
Error_Msg1error message 1
Error_Msg2error message 2
Error_Msg3error message 3
argsadditional arguments
Returns
"OK"

◆ updateTC_Object()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::updateTC_Object   Function ItemTag ItemRevisionTag ItemType ItemRevisionType ObjectId AdditionalInfo args  

Customer specific function to start an additional customer specific post-action after the normal update.

Parameters
Functionfunction name
ItemTagitem tag
ItemRevisionTagitem revision tag
ItemTypeitem type
ItemRevisionTypeitem revision type
ObjectIdobject id
AdditionalInfoadditional parameters given to the import job
argsadditional arguments
Returns
"OK" or "ERROR"

References ITK::AOM_refresh_lock(), T4X::CORE::getSessionLogChannel(), T4X::CUSTOM::MAPPING::TOOLBOX::saveItemWithUnlock(), and tpwrite().

◆ verifyZTableIdStatus()

T4EA::GENOBJ::CUSTOM::OBJECT::IMPORT::verifyZTableIdStatus   LogChannelName FunctionName ZTabId args  

Customer specific function to verify the status of an entry in the z-table.

Parameters
LogChannelName
FunctionName
ZTabIdz-table entry id
argsadditional arguments
Returns
"OK"

Variable Documentation

◆ ERPOutputDat

ERPOutputDat
static

Variable to store data to be imported.

This is just a proposal from the BOM demo. The variable can be named as required. Use of such a variable is not required but recommended.

◆ ImportInfo

ImportInfo
static

This variable stores the input from the EA system.

This variable is just a proposal from the BOM demo. The variable can be named as required. Use of such a variable is not required but recommended.