Delivering a .csv file to a file type distribution target
This requires carrying out the steps outlined in the following sections.
Create a custom I*E task for delivering a .csv file
Create a copy of the file
<Windchill>/tasks/com/ptc/windchill/esi/export/ExportToFile.xml in
<Windchill>/tasks/com/ptc/windchill/esi/export/ExportToCSVFile.xml.
◦ Open the file in your preferred editor and change the value of the FILE_NAME parameter of the Write-To-File webject used by modifying the following line to change the extension of file name responseFileName = ESIUtility.getResponseFileName(primaryBusinessObject, transactionID, "xml");to responseFileName = ESIUtility.getResponseFileName(primaryBusinessObject, transactionID, "csv");
◦ Create an XSL stylesheet that converts the ESI response data (in XML) to csv.
|
Customizer should create their own XSLT to create a csv file that details the ESIResponse in CSV as required.
|
Define a file type distribution target to deliver a .csv file to
◦ Use the Manage Distribution UI to create a distribution target.
▪ Select File as the type of target.
▪ Specify values for the Number, Name, Description and other required attributes of the target.
▪ Change the value of the taskURI attribute to com/ptc/windchill/esi/export/ExportToCSVFile.xml.
▪ Set the XSL URL attribute to point to the XSL stylesheet created in the previous section.
Example:
file://C:/XSLS/ESIResponseToCSV.xsl
http://www.myorg.com/XSLS/ESIResponseToCSV.xsl
▪ Click Finish to save the target.
◦ Associate the above created distribution target to a business object (such as a part) and release it. This will result in a .csv file being delivered to the location specified by the Path attribute.