T4S4  18.1 C7177 A20283
Teamcenter Gateway for SAP S/4HANA API Reference
BATCH pool and job handling

Functions

 compressB64String clearString
 Compresses a string from clear string format to base64 string format. More...
 
 connect ip port ?transportType? ?ipProtocol?
 Opens a connection with the batch server. More...
 
 connectTo ?connectionID?
 Opens a connection to the given server. More...
 
 createJob createJobObjectRef
 Creates a batch job. More...
 
 createJobByCloning jobDataObjectRef
 Creates a batch job by copying the settings of another job. More...
 
 createObject type args
 Creates an object. More...
 
 deleteJob jobId
 Deletes a batch job. More...
 
 disableJobServerBackend
 disable the job server backend, if already disabled it does nothing More...
 
 disableJobServerFrontend
 disable the job server frontend, if already disabled it does nothing More...
 
 disconnect args
 Closes a connection with the batch server. More...
 
 enableJobServerBackend
 enable the job server backend, if already enabled it does nothing More...
 
 enableJobServerFrontend
 enable the job server frontend, if already enabled it does nothing More...
 
 exportXml logicalFilePath ?statusFilter? ?creationDateFilter?
 Exports the information about the batch jobs in the batch server queue to one or more xml files. More...
 
 getAllDependencies jobId
 Retrieves all dependencies of a job identified by its jobId. More...
 
 getAttributeFromRawAttributeString rawAttributeStringRef rawAttributeName
 Retrieves the value of an attribute of the "raw attribute string" of a batch job. More...
 
 getDependencyHeadDictionary tailJobIdList
 Retrieves the "head dictionary" of a list of "tail jobs". More...
 
 getDependencyHeadList tailJobId
 Retrieves a list of pairs of head job ids and tail job ids that the head job depends on the tail job. More...
 
 getDependencyStatus headJobId
 Gets the status of the batch jobs the head id depends on. More...
 
 getDependencyTailDictionary headJobIdList
 Retrieves the "tail dictionary" of a list of "head jobs". More...
 
 getDependencyTailList headJobId
 Retrieves a list of pairs of head job ids and tail jobs that the head job depends on. More...
 
 getExtendedAttributeCharacter
 Retrieves the current extended attribute character. More...
 
 getJobAttachment jobId fileName
 Retrieves an attachment of a batch job. More...
 
 getJobAttachment2 jobId fileName
 Retrieves an attachment of a batch job This function is invers to setJobAttachmentByFile2 and setJobAttachmentByStream2. More...
 
 getJobAttachmentNameList jobId
 Retrieves a list of attachment names of a batch job. More...
 
 getJobAttribute jobId attributeName
 Retrieves the value of a batch job attribute. More...
 
 getJobCode jobId
 Retrieves the code of a batch job. More...
 
 getJobLogChannel jobId
 provide the log channel of job More...
 
 getJobMessage jobId
 Retrieves the message value of a batch job. More...
 
 getJobRawAttributeString jobId
 Retrieves the "raw attribute string" of a batch job. More...
 
 getJobServerBackendStatus
 get the status of job server backend if the job server backend is enabled. ON returned, else OFF More...
 
 getJobServerFrontendStatus
 get the status of job server frontend if the job server frontend is enabled. ON returned, else OFF More...
 
 getObjectAttribute objectRef attributeName
 Retrieves the value of an object attribute. More...
 
 getObjectAttribute2 objectRef attributeName
 Retrieves the value of an object attribute for retrieveJobList2 objects. More...
 
 getObjectAttributeNameList objectRef
 Retrieves a list with the attribute names of an object. More...
 
 getObjectAttributeValueList objectRef
 Retrieves a list with the attribute values of an object. More...
 
 getObjectBaseAttributeList objectRef
 Retrieves a list with the base attributes of an object. More...
 
 getObjectExtendedAttributeList objectRef
 Retrieves a list with the extended attributes of an object. More...
 
 getObjectString objectRef
 Retrieves a string representation of an object. More...
 
 getXmlEncoding
 Retrieves the current xml encoding. More...
 
 importXml logicalFilePath ?statusFilter? ?creationDateFilter?
 Imports the information about the batch jobs in the batch server queue from one or more xml files. More...
 
 isDependencySatisfied headJobId
 Tells, if a dependency for a head job is satisfied. More...
 
 isInBatchContext
 Tells, if the context is a batch context. More...
 
 isJob jobId
 Tells, if a job id corresponds to a job. More...
 
 isValidAttributeName attributeName
 Tells, if an item is suitable as attribute name. More...
 
 retrieveClientList
 Retrieves the list of batch clients connected to the batch server. More...
 
 retrieveJobList retrieveJobListObjectRef
 Retrieves a list of batch jobs satisfying certain search criteria. More...
 
 retrieveJobList2 object
 Retrieves a list of batch jobs satisfying certain search criteria using the searchJobs2 function, this function have mutch more search possibilities. More...
 
 retrieveServerInfo
 Retrieves information about the batch server. More...
 
 setAttributeToRawAttributeString rawAttributeStringRef rawAttributeName rawAttributeValue
 Changes the value of an attribute of the "raw attribute string" of a batch job. More...
 
 setDependency headJobId tailJobIdList ?timeout?
 Sets a dependency between a "head job" and a list of "tail jobs". More...
 
 setHardDependency headJobId tailJobIdList
 Sets a dependency between a "head job" and a list of "tail jobs". More...
 
 setJobAttachmentByFile jobId attachmentPath
 Adds an attachment to a batch job, where the attachment is given as a file. More...
 
 setJobAttachmentByFile2 jobId attachmentPath
 Adds an attachment to a batch job, where the attachment is given as a file. This function is inverse to getJobAttachment2. More...
 
 setJobAttachmentByStream jobId attachmentName attachmentStream
 Adds an attachment to a batch job, where the attachment is given as a stream (content) More...
 
 setJobAttachmentByStream2 jobId attachmentName attachmentStream
 Adds an attachment to a batch job, where the attachment is given as a stream (content). No compressing is necessary. This function is inverse to getJobAttachment2. More...
 
 setJobAttribute jobId attributeName attributeValue
 Changes the value of a batch job attribute or adds a new batch job attribute. More...
 
 setJobMessage jobId messageValue
 Changes the message value of a batch job. More...
 
 setJobRawAttributeString jobId rawAttributeStringRef
 Changes the "raw attribute string" of a batch job. More...
 
 setObjectAttribute objectRef attributeName attributeValue
 Changes the value of an object attribute or adds a new object attribute. More...
 
 setSoftDependency headJobId tailJobIdList
 Sets a dependency between a "head job" and a list of "tail jobs". More...
 
 setXmlEncoding externXmlEncoding internXmlEncoding
 Changes the current xml encoding. More...
 
 splitRawAttributeItemToDictionary rawAttributeItem
 Splits an item of the "raw attribute string" of a batch job to its name and to its value and packs them into a dictionary. More...
 
 uncompressB64String base64String
 Uncompresses a string from base64 string format to clear string format. More...
 
 unsetDependency headJobId tailJobIdList
 Unsets a dependency between a "head job" and a list of "tail jobs". More...
 
 unsetObjectAttribute objectRef attributeName
 Removes an object attribute. More...
 

Detailed Description

Function Documentation

◆ compressB64String()

API::Core::Batch::compressB64String   clearString  

Compresses a string from clear string format to base64 string format.

Deprecated:
Please use the function tpco_compressString2B64 instead of compressB64String.
Parameters
clearString: string to compress
Returns
base64 string=ok ""=error

References tpco_compressString2B64().

Referenced by T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), and API::Core::Batch::setJobAttachmentByStream2().

◆ connect()

API::Core::Batch::connect   ip port ?transportType? ?ipProtocol?  

Opens a connection with the batch server.

Deprecated:
Please use the function connectTo instead of connect.

A batch server connection is needed in order to use any of the batch server functions

References API::Core::Batch::connectTo(), and tpwrite().

◆ connectTo()

API::Core::Batch::connectTo   ?connectionID?  

Opens a connection to the given server.

A job server connection is needed in order to use any of the job server functions

Parameters
connectionIDconnection id of the job server
noerrdefault "", throws an exception for double connection or connection is not possible
Returns
1 on success, "" if not successful

References API::Core::Batch::disconnect(), and tpwrite().

Referenced by API::Core::Batch::connect(), T4X::BATCHJOB::EXPORT::createBatchjob(), T4X::BATCHJOB::IMPORT::createBatchjob(), T4X::TEST::WORKFLOW::createBatchJob4Workflow(), T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), T4X::BATCHJOB::EXPORT::handleBatchJob(), and T4X::BATCHJOB::IMPORT::handleBatchJob().

◆ createJob()

API::Core::Batch::createJob   createJobObjectRef  

Creates a batch job.

For infos on objects of type "createJob" see function "createObject" for more details

Parameters
createJobObjectRef: a reference to an object (object name) of type "createJob"
Returns
job id=ok ""=error

References API::Core::Batch::getObjectAttribute(), and API::Core::Batch::getObjectExtendedAttributeList().

Referenced by T4X::BATCHJOB::EXPORT::createBatchjob(), T4X::BATCHJOB::IMPORT::createBatchjob(), T4X::TEST::WORKFLOW::createBatchJob4Workflow(), T4X::BATCHJOB::EXPORT::createJob(), and T4X::BATCHJOB::IMPORT::createJob().

◆ createJobByCloning()

API::Core::Batch::createJobByCloning   jobDataObjectRef  

Creates a batch job by copying the settings of another job.

Deprecated:
This function is only used internally in the importXml function. The interface to import or export jobs is provided through web services.

For infos on objects of type "jobData" see function "createObject" for more details

Parameters
jobDataObjectRef: a reference to an object (object name) of type "jobData"
Returns
job id=ok ""=error

References API::Core::Batch::getObjectAttribute(), API::Core::Batch::getObjectBaseAttributeList(), API::Core::Batch::getObjectExtendedAttributeList(), API::Core::Batch::setJobAttachmentByStream(), API::Core::Batch::setJobAttribute(), and API::Core::Batch::uncompressB64String().

Referenced by API::Core::Batch::importXml().

◆ createObject()

API::Core::Batch::createObject   type args  

Creates an object.

The following object types are supported:

  • "createJob", "retrieveJobList", "jobData", "clientData", "serverData"

An object of type "createJob"

  • describes the properties of a "job object" used as input data when creating a job An object of type "retrieveJobList"
  • describes the properties of a "retrieve job list object" used as input data when retrieving job infos An object of type "jobData"
  • describes the properties of a "job data object" used as output data when retrieving job infos An object of type "clientData"
  • describes the properties of a "client data object" used as output data when retrieving batch client infos An object of type "serverData"
  • describes the properties of a "server data object" used as output data when retrieving batch server infos

Attributes for an object of type "createJob":

  • id : job id
  • code : job code
  • description : job description
  • priority : job priority
  • timeout : job timeout
  • timeWindowStart : job time window start
  • timeWindowEnd : job time window end
  • attachmentFileList : list of job attachment files Other attributes are possible and are considered as "user defined" job attributes

Attributes for an object of type "retrieveJobList":

  • state : job state
  • priority : job priority
  • lock : job lock status
  • creationTime : job creation time
  • modificationTime : job modification time
  • searchPattern : job search pattern
  • minResults : start index of the result set to retrieve
  • maxResults : end index of the result set to retrieve

Attributes for an object of type "retrieveJobList2": All attributes are lists with following structure: [list <key parameter>=""> [list

]] We have cases fore one value in value parameter list like returnType, sortOrder, ... maximal two values for time intervals at example like creationTime, modificationTime, ..., or complete key value lists like searchPattern "[list searchPattern [list DESC OTTO* STATE 45]]" for example search all jobs with description like OTTO* which have runtime or application error.

  • state : state of jobs : example [list state [list 4 5]] for application or runtime error
  • lock : lock (0 free, 1 locked) : example [list lock [list 0]] for free jobs
  • creationTime : job creation time : example [list creationTime [list [expr {[clock seconds]-3600}]]] filters all jobs which are newer than 1 hour
  • modificationTime : like creation time but job modification time : example [list modificationTime [list [expr {[clock seconds]-86400}] [expr {[clock seconds]-3600}]]]
  • executionTime : the execution time in seconds : example [list executionTime [list 3600]] : all jobs which runs longer than 1 hour
  • searchPattern : the searchPattern : see above
  • searchPattern2 : search global through all attributes of job with OR : example [list searchPattern2 [list OTTO WILLI]] mean all jobs where the attributes contains WILLI or OTTO
  • timeWindow : job time intervall
  • priority : one priority : example [list priority [list 10]]
  • sortBy : sort by the field : example [list sortBy [list DESC]]
  • sortDirection : sort direction can be ASC or DESC : example [list sortDirection [list ASC]]
  • caseSensity : 0 for no, 1 for yes : example [list caseSensity [list 1]] for case sensitive search
  • returnType : can be LIST or DICT : example [list returnType [list DICT]], default is LIST
  • resultRange : the min and max result range : example [list resultRange [list 0 100]], default is [list 0 100000]

Attributes for an object of type "jobData":

  • id : job id
  • description : job description
  • message : job message
  • log : content of job log file
  • code : job code
  • attachmentStreamList : contents of job attachment files
  • priority : job priority
  • timeout : job timeout
  • timeWindowStart : job time window start
  • timeWindowEnd : job time window end
  • state : job state
  • lock : job lock status
  • creationTime : job creation time
  • modificationTime : job modification time
  • clientName : identifier string of batch client (if job execution has started)
  • user : user who created the job
  • host : host where the job was created
  • shell : process that created the job ("tps" or "tpapps")
  • ip : ip address of batch client (if job execution has started)
  • port : ip address of batch client (if job execution has started)
  • retryCounter : job retry counter
  • runTime : job run time (if job execution has started) Other attributes are possible and are considered as "user defined" job attributes

Attributes for an object of type "clientData":

  • name : batch client name
  • type : batch client type ("tps" or "tpapps")
  • pattern : batch client pattern
  • mode : batch client mode
  • user : batch client user
  • host : batch client host
  • pid : batch client process id
  • lastMessageTime : last message time
  • jobCounter : number of jobs processed
  • jobWorking : job currently processed (if not idle)

Attributes for an object of type "serverData":

  • ready : number of jobs in "ready" state
  • running : number of jobs in "running" state
  • waiting : number of jobs in "waiting" state
  • applicationError : number of jobs in "applicationError" state
  • runtimeError : number of jobs in "runtimeError" state
  • finished : number of jobs in "finished" state
  • poolSize : number of jobs in the batch pool
Parameters
type: the object type to create
args: (optional) attributes to set or to add
Returns
created object=ok an empty list ([list]) =error

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

Referenced by T4X::BATCHJOB::EXPORT::createBatchjob(), T4X::BATCHJOB::IMPORT::createBatchjob(), T4X::TEST::WORKFLOW::createBatchJob4Workflow(), T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), API::Core::Batch::exportXml(), API::Core::Batch::retrieveClientList(), and API::Core::Batch::retrieveServerInfo().

◆ deleteJob()

API::Core::Batch::deleteJob   jobId  

Deletes a batch job.

Parameters
jobId: the job id
Returns
1=ok 0=error

Referenced by API::Core::Batch::importXml().

◆ disableJobServerBackend()

API::Core::Batch::disableJobServerBackend

disable the job server backend, if already disabled it does nothing

◆ disableJobServerFrontend()

API::Core::Batch::disableJobServerFrontend

disable the job server frontend, if already disabled it does nothing

◆ disconnect()

API::Core::Batch::disconnect   args  

Closes a connection with the batch server.

A batch server connection is needed in order to use any of the batch server functions

Parameters
argsunused
Returns
1=ok 0=error

Referenced by API::Core::Batch::connectTo(), T4X::BATCHJOB::EXPORT::createBatchjob(), T4X::BATCHJOB::IMPORT::createBatchjob(), T4X::TEST::WORKFLOW::createBatchJob4Workflow(), T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), T4X::BATCHJOB::EXPORT::handleBatchJob(), and T4X::BATCHJOB::IMPORT::handleBatchJob().

◆ enableJobServerBackend()

API::Core::Batch::enableJobServerBackend

enable the job server backend, if already enabled it does nothing

◆ enableJobServerFrontend()

API::Core::Batch::enableJobServerFrontend

enable the job server frontend, if already enabled it does nothing

◆ exportXml()

API::Core::Batch::exportXml   logicalFilePath ?statusFilter? ?creationDateFilter?  

Exports the information about the batch jobs in the batch server queue to one or more xml files.

Deprecated:
The interface to import or export jobs is provided through web services.

The filter parameters specify which jobs to export

Parameters
logicalFilePath: file path of the xml file or of the folder containing the xml files
statusFilter: the status of the jobs to export
creationDateFilter: the creation date of the jobs to export
Returns
1=ok 0=error

References API::Core::Batch::createObject(), API::Core::Batch::getDependencyTailList(), API::Core::Batch::getObjectAttribute(), API::Core::Batch::retrieveJobList(), API::Core::Batch::setObjectAttribute(), and tpco_shmget().

◆ getAllDependencies()

API::Core::Batch::getAllDependencies   jobId  

Retrieves all dependencies of a job identified by its jobId.

This function retrieves the full dependency structure of the job identified by its jobId. It returns a dict with two elements DEPN and REQY. These elements are dicts too, containing two more dicts soft and hard. Soft and hard each contain a lists of job ids.

Parameters
jobid
Returns
A dictionary of two elements REQY and DEPN, which contain dictionaries themselves.

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

Referenced by API::Core::Batch::getDependencyHeadDictionary(), API::Core::Batch::getDependencyHeadList(), API::Core::Batch::getDependencyStatus(), API::Core::Batch::getDependencyTailDictionary(), and API::Core::Batch::getDependencyTailList().

◆ getAttributeFromRawAttributeString()

API::Core::Batch::getAttributeFromRawAttributeString   rawAttributeStringRef rawAttributeName  

Retrieves the value of an attribute of the "raw attribute string" of a batch job.

The "raw attribute string" is a string representation of the attributes of a batch job using the "inner" attribute names

Parameters
rawAttributeStringRef: a reference to an attribute string (attribute string name)
rawAttributeName: the name of the attribute
Returns
attribute value=ok ""=error

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

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

◆ getDependencyHeadDictionary()

API::Core::Batch::getDependencyHeadDictionary   tailJobIdList  

Retrieves the "head dictionary" of a list of "tail jobs".

Deprecated:
Please use the function getAllDependencies.

"Tail jobs" are jobs other jobs depend on. The "head dictionary" has the following key-value structure:

  • key: the job id of a tail job
  • value: the list of job ids having the job of the key as "head job" in some dependency.
    Parameters
    tailJobIdList: the list of tail job ids.
    Returns
    the head dictionary of the tail job ids=ok, an empty dict=error.

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

◆ getDependencyHeadList()

API::Core::Batch::getDependencyHeadList   tailJobId  

Retrieves a list of pairs of head job ids and tail job ids that the head job depends on the tail job.

Deprecated:
To get the list of the head job ids you can use the API::Core::Batch::getAllDependencies function and go over the returned dictionary. For example: To get a list of all jobs which expect the (tail) job to be finished, you can call [dict get [API::Core::Batch::getAllDependencies $tailJobId] REQY] hard].
Parameters
tailJobId: the id of the tail job
Returns
a list of pairs of head job ids and tail job ids, an empty list if the job has no dependencies

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

◆ getDependencyStatus()

API::Core::Batch::getDependencyStatus   headJobId  

Gets the status of the batch jobs the head id depends on.

Deprecated:
This function only exists for compatibility, the result is not processable.
Parameters
headJobId: the id of the head job
Returns
dict CHECKRESULT OK / WAIT / ERROR plus STATUS_1/2/3/4/5/6 [list of batchjobids in this state], or an empty dict if the job not has dependencies

References API::Core::Batch::getAllDependencies(), and API::Core::Batch::getJobAttribute().

Referenced by T4X::BATCHJOB::DEPENDENCIES::checkBatchJobDependencies().

◆ getDependencyTailDictionary()

API::Core::Batch::getDependencyTailDictionary   headJobIdList  

Retrieves the "tail dictionary" of a list of "head jobs".

Deprecated:
Please use the function getAllDependencies.

"Head jobs" are jobs that depend on other jobs. The "tail dictionary" has the following key-value structure:

  • key: the job id of a head job
  • value: the list of job ids having the job of the key as "tail job" in some dependency.
    Parameters
    headJobIdList: the list of head job ids
    Returns
    the tail dictionary of the head job ids=ok, an empty dict=error.

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

◆ getDependencyTailList()

API::Core::Batch::getDependencyTailList   headJobId  

Retrieves a list of pairs of head job ids and tail jobs that the head job depends on.

Deprecated:
To get the list of the tail job ids you can use the API::Core::Batch::getAllDependencies function and go over the returned dictionary. For example: To get a list of all hard dependencies, you can call [dict get [API::Core::Batch::getAllDependencies $headJobId] DEPN] hard].
Parameters
headJobId: the id of the head job
Returns
a list of pairs of head job ids and tail job ids, an empty list if the job has no dependencies

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

Referenced by API::Core::Batch::exportXml().

◆ getExtendedAttributeCharacter()

API::Core::Batch::getExtendedAttributeCharacter

Retrieves the current extended attribute character.

Returns
return extended attribute character for example (default) "_" character

◆ getJobAttachment()

API::Core::Batch::getJobAttachment   jobId fileName  

Retrieves an attachment of a batch job.

Parameters
jobId: the job id
fileName: the name of the attachment
Returns
the job attachment as base64 string=ok ""=error

References tpco_formatHEX16().

◆ getJobAttachment2()

API::Core::Batch::getJobAttachment2   jobId fileName  

Retrieves an attachment of a batch job This function is invers to setJobAttachmentByFile2 and setJobAttachmentByStream2.

Parameters
jobId: the job id
fileName: the name of the attachment
Returns
the job attachment string=ok, ""=error

References tpco_formatHEX16(), and API::Core::Batch::uncompressB64String().

◆ getJobAttachmentNameList()

API::Core::Batch::getJobAttachmentNameList   jobId  

Retrieves a list of attachment names of a batch job.

Parameters
jobId: the job id
Returns
the list of attachment names=ok, an empty list([list]) on error

Referenced by API::Core::Batch::setJobAttachmentByFile(), API::Core::Batch::setJobAttachmentByStream(), and API::Core::Batch::setJobAttachmentByStream2().

◆ getJobAttribute()

API::Core::Batch::getJobAttribute   jobId attributeName  

Retrieves the value of a batch job attribute.

Parameters
jobId: the job id
attributeName: the name of the attribute
Returns
the value of the attribute=ok ""=error
1 set jobStatus [::API::Core::Batch::getJobAttribute $jobId STAT]
2 # Get the job status as a digit between 1 and 6 described below.

Job attributes correspond to attributes of objects of type "jobData". See function "createObject" for more details. On the example code you will get a digit from 1 to 6 with following meaning

digit status comment
1 READY job is ready for execution
2 RUNNING job is being processed
3 WAITING job is waiting
4 APPLICATION ERROR job has an application error
5 RUNTIME ERROR job has a runtime error
6 FINISHED job has finished successfully

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

Referenced by API::Core::Batch::getAllDependencies(), API::Core::Batch::getDependencyStatus(), and API::Core::Batch::isDependencySatisfied().

◆ getJobCode()

API::Core::Batch::getJobCode   jobId  

Retrieves the code of a batch job.

Parameters
jobId: the job id
Returns
the job code as clear string=ok ""=error

References tpco_uncompressB64Str().

Referenced by API::Core::Batch::retrieveJobList().

◆ getJobLogChannel()

API::Core::Batch::getJobLogChannel   jobId  

provide the log channel of job

Parameters
job_id
Returns
log channel for Batch Job, dependend on the job_id

◆ getJobMessage()

API::Core::Batch::getJobMessage   jobId  

Retrieves the message value of a batch job.

Parameters
jobId: the job id
Returns
the value of the "message" attribute=ok ""=error

◆ getJobRawAttributeString()

API::Core::Batch::getJobRawAttributeString   jobId  

Retrieves the "raw attribute string" of a batch job.

The "raw attribute string" is a string representation of the attributes of a batch job using the "inner" attribute names

Parameters
jobId: the job id
Returns
raw attribute string=ok ""=error

◆ getJobServerBackendStatus()

API::Core::Batch::getJobServerBackendStatus

get the status of job server backend if the job server backend is enabled. ON returned, else OFF

Returns
ON/OFF

◆ getJobServerFrontendStatus()

API::Core::Batch::getJobServerFrontendStatus

get the status of job server frontend if the job server frontend is enabled. ON returned, else OFF

Returns
ON/OFF

◆ getObjectAttribute()

API::Core::Batch::getObjectAttribute   objectRef attributeName  

Retrieves the value of an object attribute.

Parameters
objectRef: a reference to an object (object name)
attributeName: the name of the attribute
Returns
the value of the attribute=ok ""=error

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

Referenced by API::Core::Batch::createJob(), API::Core::Batch::createJobByCloning(), API::Core::Batch::exportXml(), API::Core::Batch::importXml(), and API::Core::Batch::retrieveJobList().

◆ getObjectAttribute2()

API::Core::Batch::getObjectAttribute2   objectRef attributeName  

Retrieves the value of an object attribute for retrieveJobList2 objects.

Parameters
objectRef: a reference to an object (object name), must be created by retrieveJobList2 with DICT. Please look in the example.
attributeName: the name of the attribute
Returns
the value of the attribute=ok ""=error
1 set object [API::Core::Batch::createObject retrieveJobList2]
2 API::Core::Batch::setObjectAttribute object state [list 45]
3 API::Core::Batch::setObjectAttribute object creationTime [list $creationStartTime $creationEndTime]
4 API::Core::Batch::setObjectAttribute object returnType [list DICT]
5 foreach data [dict values [::API::Core::Batch::retrieveJobList2 object]] {
6  set state [::API::Core::Batch::getObjectAttribute2 data state]
7  set time [::API::Core::Batch::getObjectAttribute2 data runTime]
8  ... ... ...
9 }

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

◆ getObjectAttributeNameList()

API::Core::Batch::getObjectAttributeNameList   objectRef  

Retrieves a list with the attribute names of an object.

Parameters
objectRef: a reference to an object (object name)
Returns
a list with the names of the attributes=ok, an empty list([list]) on error

◆ getObjectAttributeValueList()

API::Core::Batch::getObjectAttributeValueList   objectRef  

Retrieves a list with the attribute values of an object.

Parameters
objectRef: a reference to an object (object name)
Returns
a list with the values of the attributes=ok, an empty list ([list])=error

◆ getObjectBaseAttributeList()

API::Core::Batch::getObjectBaseAttributeList   objectRef  

Retrieves a list with the base attributes of an object.

Each list element is a list having an attribute name as first element and an attribute value as second element

Parameters
objectRef: a reference to an object (object name)
Returns
a list with the base attributes=ok, an empty list([list]) on error

Referenced by API::Core::Batch::createJobByCloning().

◆ getObjectExtendedAttributeList()

API::Core::Batch::getObjectExtendedAttributeList   objectRef  

Retrieves a list with the extended attributes of an object.

Each list element is a list having an attribute name as first element and an attribute value as second element

Parameters
objectRef: a reference to an object (object name)
Returns
a list with the extended attributes=ok, an empty list([list]) on error

Referenced by API::Core::Batch::createJob(), and API::Core::Batch::createJobByCloning().

◆ getObjectString()

API::Core::Batch::getObjectString   objectRef  

Retrieves a string representation of an object.

Parameters
objectRef: a reference to an object (object name)
Returns
a string representation=ok ""=error

◆ getXmlEncoding()

API::Core::Batch::getXmlEncoding

Retrieves the current xml encoding.

Deprecated:
This function is only used for the XML interface. The interface to import or export jobs is provided through web services.
Returns
a list having the extern xml encoding as first element and the intern xml encoding as second element=ok ""=error

◆ importXml()

API::Core::Batch::importXml   logicalFilePath ?statusFilter? ?creationDateFilter?  

Imports the information about the batch jobs in the batch server queue from one or more xml files.

Deprecated:
The interface to import or export jobs is provided through web services.

The filter parameters specify which jobs to export

Parameters
logicalFilePath: file path of the xml file or of the folder containing the xml files
statusFilter: the status of the jobs to import
creationDateFilter: the creation date of the jobs to import
Returns
1=ok 0=error

References API::Core::Batch::createJobByCloning(), API::Core::Batch::deleteJob(), API::Core::Batch::getObjectAttribute(), API::Core::Batch::isJob(), and API::Core::Batch::setDependency().

◆ isDependencySatisfied()

API::Core::Batch::isDependencySatisfied   headJobId  

Tells, if a dependency for a head job is satisfied.

Deprecated:
This function is deprecated because the job server decides if the head job can run.

The "head job" is the job that depends on some "tail jobs". The hard dependency is satisfied if and only if the corresponding tail job is in the following state:

  • FINISH, The soft dependency is satisfied if and only if the corresponding tail job job is in one the following state:
  • FINISH,
  • ERROR,
  • APPERROR.
    Returns
    1=yes 0=no

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

Referenced by T4X::BATCHJOB::DEPENDENCIES::checkBatchJobDependencies().

◆ isInBatchContext()

API::Core::Batch::isInBatchContext

Tells, if the context is a batch context.

Returns
1=yes 0=no or error

◆ isJob()

API::Core::Batch::isJob   jobId  

Tells, if a job id corresponds to a job.

Parameters
jobId: the job id to check
Returns
1=yes 0=no or error

Referenced by API::Core::Batch::importXml().

◆ isValidAttributeName()

◆ retrieveClientList()

API::Core::Batch::retrieveClientList

Retrieves the list of batch clients connected to the batch server.

For infos on objects of type "clientData" see function "createObject" for more details

Returns
list of objects of type "clientData"=ok ""=error

References API::Core::Batch::createObject(), and API::Core::Batch::setObjectAttribute().

◆ retrieveJobList()

API::Core::Batch::retrieveJobList   retrieveJobListObjectRef  

Retrieves a list of batch jobs satisfying certain search criteria.

Deprecated:
Function retrieveJobList does not work correctly for some parameters, like creationTime. Please use the retrieveJobList2 function. web services.

For infos on objects of types "retrieveJobList" or "jobData" see function "createObject" for more details

Parameters
retrieveJobListObjectRef: a reference to an object (object name) of type "retrieveJobList" specifying the search criteria
Returns
list of objects of type "jobData"=ok ""=error

References API::Core::Batch::getJobCode(), and API::Core::Batch::getObjectAttribute().

Referenced by API::Core::Batch::exportXml().

◆ retrieveJobList2()

API::Core::Batch::retrieveJobList2   object  

Retrieves a list of batch jobs satisfying certain search criteria using the searchJobs2 function, this function have mutch more search possibilities.

For infos on objects of types "retrieveJobList2" or "jobData" see function "createObject" for more details all parameters are lists, please look in the example code sequence. The appoach is following: 1) creating an empty retrieveJobList2 object, 2) setting all the search filters using the setObjectAttribute function, ... n) call the retrieveJobList2 function.

1 set object [API::Core::Batch::createObject retrieveJobList2]
2 API::Core::Batch::setObjectAttribute object state [list 123456]
3 API::Core::Batch::setObjectAttribute object creationTime [list $creationStartTime $creationEndTime]
4 API::Core::Batch::setObjectAttribute object returnType [list LIST]
5 set jobResultList [::API::Core::Batch::retrieveJobList2 object]

or 1) create a object with the filter criteria 2) call the retrieveJobList2 function for example

1 set object [API::Core::Batch::createObject retrieveJobList2 [list state [list 123456]] [list creationTime [list $creationStartTime $creationEndTime]] [list returnType [list LIST]]]
2 set jobResultList [::API::Core::Batch::retrieveJobList2 object]
Parameters
object: a reference to an object (object name) of type "retrieveJobList2" specifying the search criteria
optionala list with search patterns (Please look in the description of createObject
Returns
list of objects of type "jobData"=ok ""=error

◆ retrieveServerInfo()

API::Core::Batch::retrieveServerInfo

Retrieves information about the batch server.

For infos on objects of type "serverData" see function "createObject" for more details

Returns
object of type "serverData"=ok ""=error

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

◆ setAttributeToRawAttributeString()

API::Core::Batch::setAttributeToRawAttributeString   rawAttributeStringRef rawAttributeName rawAttributeValue  

Changes the value of an attribute of the "raw attribute string" of a batch job.

The "raw attribute string" is a string representation of the attributes of a batch job using the "inner" attribute names

Parameters
rawAttributeStringRef: a reference to an attribute string (attribute string name)
rawAttributeName: the name of the attribute
rawAttributeValue: the value of the attribute
Returns
1=ok 0=error

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

◆ setDependency()

API::Core::Batch::setDependency   headJobId tailJobIdList ?timeout?  

Sets a dependency between a "head job" and a list of "tail jobs".

The "head job" is the job that depends on the "tail jobs". A dependency is satisfied if and only if all tail jobs are in finished state. Dependencies have an expiration date depending on their timeout

Parameters
headJobId: the id of the head job
tailJobIdList: the list of ids of the tail jobs
timeout: the timeout in seconds of a dependency (unused)
Returns
1=ok 0=error

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

Referenced by T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), API::Core::Batch::importXml(), and T4X::BATCHJOB::DEPENDENCIES::setBatchJobDependencies().

◆ setHardDependency()

API::Core::Batch::setHardDependency   headJobId tailJobIdList  

Sets a dependency between a "head job" and a list of "tail jobs".

The "head job" is the job that depends on the "tail jobs". A dependency is satisfied if and only if all tail jobs are in finished state.

Parameters
headJobId: the id of the head job
tailJobIdList: the list of ids of the tail jobs
Returns
1=ok 0=error

Referenced by T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), and API::Core::Batch::setDependency().

◆ setJobAttachmentByFile()

API::Core::Batch::setJobAttachmentByFile   jobId attachmentPath  

Adds an attachment to a batch job, where the attachment is given as a file.

Parameters
jobId: the job id
attachmentPath: the file path of the attachment. The length of one file name is limited to 31 characters.
Returns
1=ok 0=error

References API::Core::Batch::getJobAttachmentNameList(), and tpco_compressFile2B64().

Referenced by API::Core::Batch::setJobAttachmentByFile2().

◆ setJobAttachmentByFile2()

API::Core::Batch::setJobAttachmentByFile2   jobId attachmentPath  

Adds an attachment to a batch job, where the attachment is given as a file. This function is inverse to getJobAttachment2.

Parameters
jobId: the job id
attachmentPath: the file path of the attachment. The length of one file name is limited to 31 characters.
Returns
1=ok 0=error

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

◆ setJobAttachmentByStream()

API::Core::Batch::setJobAttachmentByStream   jobId attachmentName attachmentStream  

Adds an attachment to a batch job, where the attachment is given as a stream (content)

Parameters
jobId: the job id
attachmentName: the name of the attachment. The length of one attachment name is limited to 31 characters.
attachmentStream: the stream (content) of the attachment as base64 string
Returns
1=ok 0=error

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

Referenced by T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), and API::Core::Batch::createJobByCloning().

◆ setJobAttachmentByStream2()

API::Core::Batch::setJobAttachmentByStream2   jobId attachmentName attachmentStream  

Adds an attachment to a batch job, where the attachment is given as a stream (content). No compressing is necessary. This function is inverse to getJobAttachment2.

Parameters
jobId: the job id
attachmentName: the name of the attachment. The length of one attachment name is limited to 31 characters.
attachmentStream: the stream (content)
Returns
1=ok 0=error

References API::Core::Batch::compressB64String(), and API::Core::Batch::getJobAttachmentNameList().

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

◆ setJobAttribute()

API::Core::Batch::setJobAttribute   jobId attributeName attributeValue  

Changes the value of a batch job attribute or adds a new batch job attribute.

If the attribute exists, the attribute value is changed. If the attribute does not exist, a new attribute is added. Job attributes correspond to attributes of objects of type "jobData", except "code". The job code cannot be edited. See function "createObject" for more details.

Parameters
jobId: the job id
attributeName: the name of the attribute
attributeValue: the value of the attribute
Returns
1=ok 0=error

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

Referenced by T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), API::Core::Batch::createJobByCloning(), and T4X::BATCHJOB::DEPENDENCIES::setBatchJobDependencies().

◆ setJobMessage()

API::Core::Batch::setJobMessage   jobId messageValue  

Changes the message value of a batch job.

Parameters
jobId: the job id
messageValue: the value of the "message" attribute
Returns
1=ok 0=error

Referenced by T4X::BATCHJOB::TOOLBOX::setJobMessage().

◆ setJobRawAttributeString()

API::Core::Batch::setJobRawAttributeString   jobId rawAttributeStringRef  

Changes the "raw attribute string" of a batch job.

The "raw attribute string" is a string representation of the attributes of a batch job using the "inner" attribute names

Parameters
jobId: the job id
rawAttributeStringRef: a reference to an attribute string (attribute string name)
Returns
1=ok 0=error

◆ setObjectAttribute()

API::Core::Batch::setObjectAttribute   objectRef attributeName attributeValue  

Changes the value of an object attribute or adds a new object attribute.

If the attribute exists, the attribute value is changed. If the attribute does not exist, a new attribute is added

Parameters
objectRef: a reference to an object (object name)
attributeName: the name of the attribute
attributeValue: the value of the attribute
Returns
1=ok 0=error

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

Referenced by T4X::BATCHJOB::EXPORT::createBatchjob(), T4X::BATCHJOB::IMPORT::createBatchjob(), T4X::TEST::WORKFLOW::createBatchJob4Workflow(), T4X::BATCHJOB::EXPORT::createJob(), T4X::BATCHJOB::IMPORT::createJob(), API::Core::Batch::exportXml(), and API::Core::Batch::retrieveClientList().

◆ setSoftDependency()

API::Core::Batch::setSoftDependency   headJobId tailJobIdList  

Sets a dependency between a "head job" and a list of "tail jobs".

The "head job" is the job that depends on the "tail jobs". A dependency is satisfied if and only if all tail jobs are not running any more, i.e. they have finished with an application or runtime error or successfully.

Parameters
headJobId: the id of the head job
tailJobIdList: the list of ids of the tail jobs
Returns
1=ok 0=error

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

◆ setXmlEncoding()

API::Core::Batch::setXmlEncoding   externXmlEncoding internXmlEncoding  

Changes the current xml encoding.

Deprecated:
This function is only used for the XML interface. The interface to import or export jobs is provided through web services.
Parameters
externXmlEncoding: the extern xml encoding to set
internXmlEncoding: the intern xml encoding to set
Returns
1 (always)

◆ splitRawAttributeItemToDictionary()

API::Core::Batch::splitRawAttributeItemToDictionary   rawAttributeItem  

Splits an item of the "raw attribute string" of a batch job to its name and to its value and packs them into a dictionary.

The "raw attribute string" is a string representation of the attributes of a batch job using the "inner" attribute names

Parameters
rawAttributeItem: an item of the raw attribute string
Returns
dictionary containing the name and the value of the item=ok ""=error

◆ uncompressB64String()

API::Core::Batch::uncompressB64String   base64String  

Uncompresses a string from base64 string format to clear string format.

Deprecated:
Please use tpco_uncompressB64Str instead of uncompressB64String.
Parameters
base64String: string to uncompress
Returns
clear string=ok ""=error

References tpco_uncompressB64Str().

Referenced by API::Core::Batch::createJobByCloning(), and API::Core::Batch::getJobAttachment2().

◆ unsetDependency()

API::Core::Batch::unsetDependency   headJobId tailJobIdList  

Unsets a dependency between a "head job" and a list of "tail jobs".

The "head job" is the job that depends on the "tail jobs". Removes the dependencies between a "head job" and a list of "tail jobs".

Parameters
headJobId: the id of the head job
tailJobIdList: the list of ids of the tail jobs
Returns
1=ok 0=error

◆ unsetObjectAttribute()

API::Core::Batch::unsetObjectAttribute   objectRef attributeName  

Removes an object attribute.

Parameters
objectRef: a reference to an object (object name)
attributeName: the name of the attribute
Returns
1=ok 0=error

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