PLMBatchDataAccessInterfaces CATPLMBatch

Usage: you must use this class as is. You should never derive it.


public class CATPLMBatch

Class to provide services to generate input parameters used for instantiation and processing of batch application.
BatchMonitor tool (CATIA->Tools->Utility).
Role: This class mainly Serves following purposes.


Constructor and Destructor Index


o CATPLMBatch(CATString&)
Constructs a CATPLMBatch object from batch application name.
o ~CATPLMBatch()
Destructs CATPLMBatch object.

Method Index


o FillXmlFile(CATUnicodeString&,CATUnicodeString&)
Valuates the PLMBatch xml parameter file that is to be used by Batch application for processsing.
o GetApplicativeOptions(CATListOfCATUnicodeString&)
Gets Applicative options.
o GetReportName(CATUnicodeString&)
Retrieves the PLMBatch main report complete path (without extension).
o SetApplicativeParameters(CATString&,CATListOfCATUnicodeString&)
Sets Applicative parameters.
o SetReportParameters(CATString&,CATUnicodeString&)
Sets Report parameters.
o SetSelectedObjects(CATListOfCATUnicodeString&)
Communicates the list of V5 documents that are to be processed by batch applications.
o SetSelectedObjects(CATLISTP(CATIAdpPLMIdentificator)&)
Communicates the list of PLM Components to be processed by the batch application.

Constructor and Destructor


o CATPLMBatch
public CATPLMBatch( const iBatchName)
Constructs a CATPLMBatch object from batch application name.
Parameters:
iBatchName
The name of batch application. It must be same name that is defined in the batchdesc resource. This batchdesc xml file for each batch could be found in the resources->batchdesc folder of the runtime view .
o ~CATPLMBatch
public virtual ~CATPLMBatch()
Destructs CATPLMBatch object.

Methods


o FillXmlFile
public FillXmlFile( const LicenceFile,
iXMLFile)
Valuates the PLMBatch xml parameter file that is to be used by Batch application for processsing.

Role: This method prepares an XML file that is passed on to the batch application as input. Batch application uses this paramters provided in the xml file for its processing requirements. Even if this method is mainly used in a multi process environment it is also possible to create an xml parameters file in mono process mode. This xml file is compatible with the standard Batch environment (i.e it can be used as input of the standard CATBatchStarter exe).
Parameters:
LicenceFile
full path of a file containing the licensing information for this batch.
Each line of this file must be formatted as follows (no blank allowed between the strings and the '|' separator!):
    batch_name|product.slt
where product.slt is the name of the configuration/product used by the licensing when running the batch.
DLName and environment variables are supported.
    For instance a LicenceFile=$CATTemp/${UID}.txt defintion will search licence in a YWE.txt file (when UID variable is set to YWE) in the CATTemp directory.
If LicenceFile is null, default licence defined in the Settings will be taken for the batch.
iXMLFile
The complete path of the xml parameter file to be created.
  • in case of a null string, the CATPLMBatch object creates a iBatchName.xml file in the $PLMBATCH_Default_ReportDir directory.
  • no replace capability: if the file already exists, it will be automatically overwritten.
  • DLName and environment variables are supported.
    • For instance iXMLFile=$CATTemp/${UID}.xml defintion will create a YWE.xml file (when UID variable is set to YWE) in the CATTemp directory.
    When null, the valid iXMLFile path is returned (.i.e $PLMBATCH_Default_ReportDir\iBatchName.xml).
Returns:
E_FAIL
if the directory does not exist, or no write access on iXMLFile.
Use CATError object to retrieve the complete information regarding the failure.
S_OK
if the file is successfully created. Then iXMLFile is set to the exact xml file name.
o GetApplicativeOptions
public GetApplicativeOptions( oOptionName)
Gets Applicative options.

Role: This method allows you to get applicative options for the current batch application.
Parameters:
oOptionName
The option list
Returns:
The return value:
  • S_OK The list of option has been successfully valuated.
  • E_FAIL The list of possible option can not be valuated: You can use object to retrieve the complete information regarding the failure.
o GetReportName
public GetReportName( oReportFile)
Retrieves the PLMBatch main report complete path (without extension).

Role: This method retrieves the complete path of the main report file, without its extension. Then,
o SetApplicativeParameters
public SetApplicativeParameters( const iOptionName,
const iOptionValueList)
Sets Applicative parameters.

Role: This method allows you to set applicative parameters for the current batch application and a given option. The list of possible options for an application are displayed in the CAA Encyclopedia; Refer to the CAA V5 PLM Batch section within Enterprise PLM SOA.

Incase the possible values for the Option Name is a multilist, then multiple calls to this API for the same Option Name will concatenate the input list, Otherwise only the value with the last call will be set.

Parameters:
iOptionName
The option name
iOptionValueList
The value list to be set for the option
Returns:
The return value:
  • S_OK The option has been successfully valuated.
  • E_INVALIDARG: iOptionName is empty or iOptionValueList is an empty list
  • E_FAIL This option can not be valuated: You can use object to retrieve the complete information regarding the failure.
    • iOptionName is not a valid option of the current bach application, or
    • iOptionValueList contains invalid values for the iOptionName option.
o SetReportParameters
public SetReportParameters( const iOptionName,
const iOptionValue)
Sets Report parameters.

Role: This method allows you to define Report section values for the current batch application. PLMBatch official documentation have to publish the list of possible options for an application.
Parameters:
iOptionName
The Report option that is valuated. The list of possible option is documented in the PLMBatch Data Access CAA documentation.
iOptionValue
Value attached to the option 'iOptionName'. The list of possible values of every iOptionName is documented in the PLMBatch Data Access CAA documentation.
Returns:
The return value:
  • S_OK The option has been successfully valuated.
  • E_INVALIDARG: Invalid input iOptionName is not a valid option of the application or iOptionValue contains invalid value for the iOptionName option.
  • E_FAIL This option can not be valuated: You can use object to retrieve the complete information regarding the failure.
    • iOptionName is not a valid option of the current bach application, or
    • iOptionValue contains invalid values for the iOptionName option.
o SetSelectedObjects
public SetSelectedObjects( const iListofPath)
Communicates the list of V5 documents that are to be processed by batch applications.

Role: In a more global view, this service is dedicated to the setting of V5 documents for batch processing.
Parameters:
iListofPath
The List of complete path of the V5 documents to process within the batch process. Selected objects are added to previously set objects in case of several call. Empty list resets all previously set list.
Returns:
E_FAIL
if all the documents can not be added. Almost one document does not exist, or does not have read access, or has a type (extension) that is not correct or not supported by the batch application.
Use CATError object to retrieve the complete information regarding the failure.
S_OK
if the list of documents have been successfully set.
o SetSelectedObjects
public SetSelectedObjects( const iListofObjects)
Communicates the list of PLM Components to be processed by the batch application.

Role: In a more global view, this service is dedicated to setting of PLM Components for batch processing.
Parameters:
iListofObjects
The list of PLM Components to be processed by the batch application. Selected objects are added to previously set objects in case of several calls. Empty list resets all previously set list.
Returns:
E_FAIL
if almost one object can not be added. Almost one object does not exist, or does not have read access, or does not have a type (latetype) correct /supported by the batch application.
Use CATError object to retrieve the complete information regarding the failure.
S_OK
if the list of objects has been successfully set.

This object is included in the file: CATPLMBatch.h
If needed, your Imakefile.mk should include the module: CATPLMBatch

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.