T4S4  18.1 C7177 A20283
Teamcenter Gateway for SAP S/4HANA API Reference
T4X::BATCHJOB::TOOLBOX Namespace Reference

Functions

 getDictValue BatchJobDict ParameterName ?Optional? ?DefaultValue?
 This function gets the input parameters for a batch job from a dict in case the parameter is optional = YES the given default value will be set, otherwise dict needs to contain a value which is not empty string. More...
 
 getTimeWindow args
 This function gets the time window for execution of the batch job. More...
 
 logStatusInfo JobId
 This function writes the StatusInfo into the log file. More...
 
 setAttribute4TeamcenterSYSLOG TcSysLogFileName
 adds the Teamcenter syslog file information as an user attribute to the job More...
 
 setBatchjobDefaults Mode FunctionName T4Target args
 sets the batch job defaults More...
 
 setBatchjobStatus RunMode JobStatus ExecuteFunction Mode ?IgnoreRetryCounter? ?UserState? args
 sets the state of Batch job to APPERR or RETRY depending on the number of retries. More...
 
 setJobMessage JobId MsgTxt
 if code executed in batch job set the message More...
 
 translateBatchjobAttr2WorkflowArgs args
 translates the batch job arguments starting with a "-" sign into workflow arguments More...
 
 writeTcUser2LogIndex LogChannel
 writes the Tc user to our LogfileIndex More...
 

Function Documentation

◆ getDictValue()

T4X::BATCHJOB::TOOLBOX::getDictValue   BatchJobDict ParameterName ?Optional? ?DefaultValue?  

This function gets the input parameters for a batch job from a dict in case the parameter is optional = YES the given default value will be set, otherwise dict needs to contain a value which is not empty string.

Parameters
BatchJobDict- dict
ParameterName- JOBID FUNCTION OBJECTTAG OBJECTCLASS OBJECTTYPE OBJECTID OBJECTREV USERSERVICES TRANSFER SESSIONID CLIENT FILTER DEPENDENCIES ADDITIONALINFO
Optional- YES / NO - default set to NO
DefaultValue- default set to NONE
Returns
found value

References tpwrite().

Referenced by T4X::BATCHJOB::EXPORT::createBatchjob2(), T4X::BATCHJOB::IMPORT::createBatchjob2(), T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), T4X::BATCHJOB::EXPORT::executeExportJob2(), and T4X::BATCHJOB::IMPORT::executeImportJob2().

◆ getTimeWindow()

T4X::BATCHJOB::TOOLBOX::getTimeWindow   args  

This function gets the time window for execution of the batch job.

Returns
timeWindow

Referenced by T4X::BATCHJOB::EXPORT::createBatchjob(), and T4X::BATCHJOB::IMPORT::createBatchjob().

◆ logStatusInfo()

T4X::BATCHJOB::TOOLBOX::logStatusInfo   JobId  

This function writes the StatusInfo into the log file.

Parameters
JobId- unique batch job id
Returns
no return

References tpwrite().

Referenced by T4X::BATCHJOB::EXPORT::handleBatchJob(), and T4X::BATCHJOB::IMPORT::handleBatchJob().

◆ setAttribute4TeamcenterSYSLOG()

T4X::BATCHJOB::TOOLBOX::setAttribute4TeamcenterSYSLOG   TcSysLogFileName  

adds the Teamcenter syslog file information as an user attribute to the job

Parameters
TcSysLogFileName
Returns
none

Referenced by T4X::BATCHJOB::EXPORT::executeExportJob(), and T4X::BATCHJOB::IMPORT::executeImportJob().

◆ setBatchjobDefaults()

T4X::BATCHJOB::TOOLBOX::setBatchjobDefaults   Mode FunctionName T4Target args  

◆ setBatchjobStatus()

T4X::BATCHJOB::TOOLBOX::setBatchjobStatus   RunMode JobStatus ExecuteFunction Mode ?IgnoreRetryCounter? ?UserState? args  

sets the state of Batch job to APPERR or RETRY depending on the number of retries.

Parameters
RunMode- for Batch job mode has to be set to "BatchJob"
JobStatus- OK / SKIPPED / ERROR / RETRY
ExecuteFunction- function name for the batch job settings
Mode- EXPORT / IMPORT
IgnoreRetryCounter- OFF / ON initialised with "OFF" if not given and the following parameter are not set
UserState- job state given as a parameter, initialised with "" if not given
Returns
none

References tpwrite().

Referenced by T4X::BATCHJOB::EXPORT::handleBatchJob(), and T4X::BATCHJOB::IMPORT::handleBatchJob().

◆ setJobMessage()

T4X::BATCHJOB::TOOLBOX::setJobMessage   JobId MsgTxt  

if code executed in batch job set the message

Parameters
JobId- in direct mode TEST_BATCHJOB else the BatchJobId
MsgTxt- message to be set
Returns
none

References API::Core::Batch::setJobMessage().

Referenced by T4X::BATCHJOB::EXPORT::executeExportJob(), T4X::BATCHJOB::IMPORT::executeImportJob(), T4X::BATCHJOB::EXPORT::handleBatchJob(), and T4X::BATCHJOB::IMPORT::handleBatchJob().

◆ translateBatchjobAttr2WorkflowArgs()

T4X::BATCHJOB::TOOLBOX::translateBatchjobAttr2WorkflowArgs   args  

translates the batch job arguments starting with a "-" sign into workflow arguments

Parameters
argsnot yet used
Returns
none

References tpco_scanHEX16().

◆ writeTcUser2LogIndex()

T4X::BATCHJOB::TOOLBOX::writeTcUser2LogIndex   LogChannel  

writes the Tc user to our LogfileIndex

Parameters
LogChannel
Returns
none

References T4X::CORE::getSessionLogChannel(), ITK::POM_get_user(), tpco_formatHEX16(), tpco_setLogIndex(), and tpwrite().

Referenced by T4X::BATCHJOB::EXPORT::executeExportJob(), and T4X::BATCHJOB::IMPORT::executeImportJob().