ITK Function Reference

(V10000.1.0.60_20160308.00)
Modules | Functions
Substance Compliance

Modules

 SUBSCMPL Errors
 

Functions

SCP0SUBSCMPL_API int SUBSCMPL_ask_all_results (tag_t input_tag, int *n_items, tag_t **items, int *n_regulations, tag_t **regulations, int *n_results, tag_t **results)
 
SCP0SUBSCMPL_API int SUBSCMPL_ask_exemption (tag_t result_tag, int *n_relations, tag_t **p_relations, int *n_exemptions, tag_t **p_exemptions)
 
SCP0SUBSCMPL_API int SUBSCMPL_ask_failed_data (tag_t input_result_tag, tag_t *failed_item, char **failure_reason)
 
SCP0SUBSCMPL_API int SUBSCMPL_ask_latest_result (tag_t input_tag, tag_t regulation, tag_t *latest_result)
 
SCP0SUBSCMPL_API int SUBSCMPL_ask_regulations (int *n_regulations, tag_t **regulations)
 
SCP0SUBSCMPL_API int SUBSCMPL_ask_result (tag_t input_tag, int *n_results, tag_t **results)
 
SCP0SUBSCMPL_API int SUBSCMPL_ask_status (tag_t input_tag, int status, tag_t regulation, int *n_parts, char **status_desc)
 
SCP0SUBSCMPL_API int SUBSCMPL_import_declarations (const char *decl_type, const char *xsl_file_fmsticket, const char *transfer_mode, const char *option_set_name, int num_input_file_fms_tickets, const char **input_file_fms_tickets, const char *mode, int *num_output_data, SUBSCMPL_import_out_t **output_data)
 
SCP0SUBSCMPL_API int SUBSCMPL_msd_import (const char *ipc_file_name, const char *xsl_file_name, const char *transfer_mode, const char *option_set_name, int master_site, const char *directory_path, const char *mode, int *imported_files_count, MSD_import_errors_t **output_data)
 
SCP0SUBSCMPL_API int SUBSCMPL_validate_declarations (const char *declaration_type, const char *xsl_file_fmsticket, int num_input_file_fms_tickets, const char **input_file_fms_tickets, const char *mode, tag_t *session_digest_object)
 

Detailed Description

The Substance Compliance Module.

Function Documentation

SCP0SUBSCMPL_API int SUBSCMPL_ask_all_results ( tag_t  input_tag,
int *  n_items,
tag_t **  items,
int *  n_regulations,
tag_t **  regulations,
int *  n_results,
tag_t **  results 
)


Retrieves all latest Result objects with an item revision or a vendor part In case of BOM this ITK will return latest result objects for every item in a BOM Return value example-

Item1 Regulation1 Result1
Item1 Regulation2 Result2
Item2 Regulation1 Result3
Item1 Regulation3 Result4
Item3 Regulation2 Result5
Item3 Regulation3 Result6
Returns
Parameters
input_tag(I) tag of item for all results are asked
n_items(O) count of items
items(OF) n_items Array of items
n_regulations(O) count of regulations
regulations(OF) n_regulations Array of regulations
n_results(O) count of results
results(OF) n_results Array of results
SCP0SUBSCMPL_API int SUBSCMPL_ask_exemption ( tag_t  result_tag,
int *  n_relations,
tag_t **  p_relations,
int *  n_exemptions,
tag_t **  p_exemptions 
)

Retrieves the relations and exemptions associated with one result object Relation objects are returned only for those results which have atleast one exemption with them

Returns
Parameters
result_tag(I) tag of result object
n_relations(O) count of relations found with exemptions
p_relations(OF) n_relations Array of relations
n_exemptions(O) count of exemptions
p_exemptions(OF) n_exemptions Array of exemptions
SCP0SUBSCMPL_API int SUBSCMPL_ask_failed_data ( tag_t  input_result_tag,
tag_t failed_item,
char **  failure_reason 
)

Retrieves failed item tag and failure reason for any compliance result object

Returns
Parameters
input_result_tag(I) result tag for which failed data is asked
failed_item(O) tag of item failed
failure_reason(OF) failure reason for the item failed
SCP0SUBSCMPL_API int SUBSCMPL_ask_latest_result ( tag_t  input_tag,
tag_t  regulation,
tag_t latest_result 
)

Retrieves latest result for any item for a particular regulation

Returns
Parameters
input_tag(I) tag of item for which status is asked
regulation(I) regulation tag for which latest result is asked
latest_result(O) latest result for input_tag for regulation
SCP0SUBSCMPL_API int SUBSCMPL_ask_regulations ( int *  n_regulations,
tag_t **  regulations 
)

Retrieves all the active regulations

Returns
  • ITK_ok on success
  • Possibly other errors
Parameters
n_regulations(O) count of regulations
regulations(OF) n_regulations Array of regulations
SCP0SUBSCMPL_API int SUBSCMPL_ask_result ( tag_t  input_tag,
int *  n_results,
tag_t **  results 
)

Retrieves the latest Result objects for each regulation for an item revision or a vendor part

Returns
Parameters
input_tag(I) tag of item for which complaince results are required
n_results(O) count of results found
results(OF) n_results Array of results
SCP0SUBSCMPL_API int SUBSCMPL_ask_status ( tag_t  input_tag,
int  status,
tag_t  regulation,
int *  n_parts,
char **  status_desc 
)

Retrieves the number of parts and status description for a particular status for any item

Returns
Parameters
input_tag(I) tag of item for which status is asked
status(I) integer value of status
regulation(I) regulation tag for which status is asked
n_parts(O) number of parts for regulation at status
status_desc(OF) description of the status asked
SCP0SUBSCMPL_API int SUBSCMPL_import_declarations ( const char *  decl_type,
const char *  xsl_file_fmsticket,
const char *  transfer_mode,
const char *  option_set_name,
int  num_input_file_fms_tickets,
const char **  input_file_fms_tickets,
const char *  mode,
int *  num_output_data,
SUBSCMPL_import_out_t **  output_data 
)

Performs import of the declarations provided by suppliers.
It processes the inputs in the form of declaration type, transfer mode, optionset, list of input file fms tickets, and input xsl file fms ticket.
The ITK will return a structure containing import status for the given files.
The corresponding log files will contain warnings and errors in detail.

Returns
Parameters
decl_type(I) Type of the declaration, MSD (Conflict mineral declaration) or CMD(Material Substance declaration)
xsl_file_fmsticket(I) XML stylesheet file fmsticket that needs to be applied on the input declaration XML file
transfer_mode(I) Name of the transfer mode or NULL
option_set_name(I) Name of the transferOptionSet or NULL. The option set should be either MSDImportOptionSetDefault or derived from it.
The flags forceUpdate,msdImport,uncondForceUpdate and opt_skip_infer_delete are mandatory
num_input_file_fms_tickets(I) Number of input file FMS tickets.
If it is zero, the ITK will read the files from unprocessed Email Response Objects
input_file_fms_tickets(I) List of input file FMS tickets or NULL
mode(I) Mode specifies if the import is managed. Valid values are "managed"
num_output_data(O) Number of returned data structures.
output_data(OF) num_output_data Data structures for given set of files during import processing. It includes the final file fms ticket, verdict, list of warnings and errors if there are any, fms ticket of the log files per input document.
SCP0SUBSCMPL_API int SUBSCMPL_msd_import ( const char *  ipc_file_name,
const char *  xsl_file_name,
const char *  transfer_mode,
const char *  option_set_name,
int  master_site,
const char *  directory_path,
const char *  mode,
int *  imported_files_count,
MSD_import_errors_t **  output_data 
)

Imports the material and substance information defined in Material Substance Declaration (MSD) file in XML format into Teamcenter.
This operation reads a set of MSD files and their supporting documents, imports the files and creates the dataset called MSD to which the input MSD and supporting files are attached. Function will return only the generic errors. Errors encountered while processing individual files will be returned through error data structure described.

Returns
Parameters
ipc_file_name(I) Absolute file name of IPC xml or NULL
xsl_file_name(I) Absolute file name of xsl file
transfer_mode(I) Name of TransferMode or NULL. Any Tie Import Transfer mode is allowed.
option_set_name(I) Name of TransferOptionSet or NULL. Any TransferOptionSet derived from MSDImportOptionSetDefault is allowed.
master_site(I) The master site ID or NULL
directory_path(I) Directory path of ipc xml file and the supporting files or NULL
mode(I) Mode specifies if the import is managed or managed. Valid values are "managed" and "unmanaged"
imported_files_count(O) Count of files imported
output_data(OF) imported_files_count Array of Structure MSD_import_errors_t which consists of input file name and the corresponding errors that may have arisen during import. Errors specific to the processing of input files will be reported through this structure only.
SCP0SUBSCMPL_API int SUBSCMPL_validate_declarations ( const char *  declaration_type,
const char *  xsl_file_fmsticket,
int  num_input_file_fms_tickets,
const char **  input_file_fms_tickets,
const char *  mode,
tag_t session_digest_object 
)

Performs validation for substance compliance related declarations provided by suppliers.
It processes the inputs in the form of declaration type, list of input file fms tickets, and input xsl file fms ticket. The ITK will return a tag containing all the information for individual verdicts of the files as well as the log files generated.
The corresponding log files will contain warnings and errors in detail.

Returns
  • ITK_ok on success.
  • #SUBSCMPL_invalid_supplier_declaration_error if supplier declaration provided is invalid.
  • #SUBSCMPL_XML_stylesheet_not_found_error if XML stylesheet cannot be found. The stylesheet path provided is invalid.
  • #SUBSCMPL_validation_cannot_be_performed_error if validation cannot be performed for the given supplier declaration information.
  • Possibly other errors.
Parameters
declaration_type(I) Type of the declaration, MSD(Conflict mineral declaration) or CMD(Material Substance declaration)
xsl_file_fmsticket(I) XML stylesheet file FMS ticket that needs to be applied on the input declaration XML file
num_input_file_fms_tickets(I) Number of input file FMS tickets.
It is zero, the ITK will read the files from unprocessed Email Response Objects
input_file_fms_tickets(I) List of input file FMS tickets or NULL
mode(I) Mode for validation. Valid values are managed and unmanaged
session_digest_object(O) Output tag of the session digest object Scp0DeclValidationDigest.
Please refer the BMIDE metamodel to know about how to retrieve the output information from this object for individual files.