Creating, Editing, and Deleting Distribution Targets
To create, edit, and manage distribution targets using
Windchill UI, see
Managing Distribution Targets.
Another approach to creating or updating distribution targets is to use the Windchill loader. This method allows you to create or update multiple distribution targets in the database.
|
• To create, edit, or delete ERP Connector targets, you need to be part of the ESI Administrators group as well as be a member of the Site Administrator’s group.
• This approach can only be used to create or update distribution targets. You cannot use the Windchill loader to delete a distribution target.
|
Create or Update Distribution Targets Using Windchill Loader
Perform the following steps to create or update distribution targets using Windchill loader.
1. Create an XML file using the example given below:
<?xml version="1.0" ?>
<!DOCTYPE NmLoader SYSTEM "standard13_0.dtd">
<!-- Please refer to the Javadoc for more details about the load method for distribution targets -->
<!-- Creating or Updating File DT -->
<NmLoader>
<csvBeginESITarget handler="com.ptc.windchill.esi.load.LoadESI.beginCreateUpdateESITarget">
<csvtypedef>com.ptc.windchill.esi.tgt.ESITarget|com.ptc.windchill.esi.tgt.ESIFileTarget</csvtypedef>
<csvnumber>TEST_FILEDT</csvnumber>
<csvname>TEST_FILEDT</csvname>
<csvdescription>TEST_FILEDT</csvdescription>
<csvtaskURI>com/ptc/windchill/esi/export/ExportToFile_01.xml</csvtaskURI>
<csvdefaultForContext>True</csvdefaultForContext>
<csvstatus>ACTIVE</csvstatus>
<csvresponseMetaInfoPath>$CODEBASE$/com/ptc/windchill/esi/ESIResponseMetaInfo_copy1.xml</csvresponseMetaInfoPath>
<csvmoveToParentContext>True</csvmoveToParentContext>
</csvBeginESITarget>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>ESITargetStorageType</csvdefinition>
<csvvalue1>ESI_NFS_STORAGE_TYPE</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>Path</csvdefinition>
<csvvalue1>$WT_HOME$/FileDTResponse200</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvEndESITarget handler="com.ptc.windchill.esi.load.LoadESI.endCreateUpdateESITarget" />
<!-- Creating or Updating FTP DT -->
<csvBeginESITarget handler="com.ptc.windchill.esi.load.LoadESI.beginCreateUpdateESITarget">
<csvtypedef>com.ptc.windchill.esi.tgt.ESITarget|com.ptc.windchill.esi.tgt.ESIFTPTarget</csvtypedef>
<csvnumber>TEST_FTPDT</csvnumber>
<csvname>FTPDT</csvname>
<csvdescription>FTPDT</csvdescription>
<csvtaskURI>com/ptc/windchill/esi/export/ExportToFTP_02.xml</csvtaskURI>
<csvdefaultForContext>False</csvdefaultForContext>
<csvstatus>ACTIVE</csvstatus>
<csvresponseMetaInfoPath>$CODEBASE$/com/ptc/windchill/esi/ESIResponseMetaInfo_copy.xml</csvresponseMetaInfoPath>
<csvmoveToParentContext></csvmoveToParentContext>
<csvmoveToSiteContext>True</csvmoveToSiteContext>
</csvBeginESITarget>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>FTP_Host</csvdefinition>
<csvvalue1>ptcsupport.com</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>FTP_Path</csvdefinition>
<csvvalue1>D:\Response</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>FTP_Port</csvdefinition>
<csvvalue1>21</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvEndESITarget handler="com.ptc.windchill.esi.load.LoadESI.endCreateUpdateESITarget" />
<!-- Creating File DT -->
<csvBeginESITarget handler="com.ptc.windchill.esi.load.LoadESI.beginCreateUpdateESITarget">
<csvtypedef>com.ptc.windchill.esi.tgt.ESITarget|com.ptc.windchill.esi.tgt.ESIFileTarget</csvtypedef>
<csvnumber>TEST_FILEDT_02</csvnumber>
<csvname>TEST_FILEDT_02</csvname>
<csvdescription>TEST_FILEDT_02</csvdescription>
<csvtaskURI>com/ptc/windchill/esi/export/ExportToFile_01.xml</csvtaskURI>
<csvdefaultForContext>True</csvdefaultForContext>
<csvstatus>ACTIVE</csvstatus>
<csvresponseMetaInfoPath>$CODEBASE$/com/ptc/windchill/esi/ESIResponseMetaInfo_copy1.xml</csvresponseMetaInfoPath>
<csvmoveToParentContext></csvmoveToParentContext>
<csvmoveToSiteContext></csvmoveToSiteContext>
</csvBeginESITarget>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>ESITargetStorageType</csvdefinition>
<csvvalue1>ESI_NFS_STORAGE_TYPE</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>Path</csvdefinition>
<csvvalue1>$WT_HOME$/FileDTResponse200</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvEndESITarget handler="com.ptc.windchill.esi.load.LoadESI.endCreateUpdateESITarget" />
</NmLoader>
2. Update <csvtypedef> based on the distribution targets you want to update.
3. Add the required distribution target attributes you want to update under <csvIBAValue> and update the <csvdefinition> based on the attribute you want to update.
|
The <csvnumber> is the unique identification number of a distribution target. Updating <csvnumber> is not supported.
|
4. To move a distribution target to the parent context, set <csvmoveToParentContext> as True.
5. To move a distribution target to the Site context, set <csvmoveToSiteContext> as True.
6. Copy the XML file to a folder on your installation, for example, <Windchill>/loadFiles/esi/esiCust/<XMLfile>.
7. Open Windchill shell and execute the following command:
windchill wt.load.LoadFromFile -d <Windchill>/loadFiles/esi/esiCust/<XMLfile> -u adminUsername -p adminPassword
The following loaders, which were previously used to create or update distribution targets, are also available.
Create Distribution Targets Using Windchill Loader
Perform the following steps to create distribution targets using Windchill loader.
1. Edit the file <Windchill>/loadFiles/esi/esiCust/DistributionTargets.xml on your installation by following the comments in the file.
2. Open Windchill shell and execute the following command:
java wt.load.LoadFromFile -d %WT_HOME%\loadfiles\esi\esiCust\DistributionTargets.xml
Update Distribution Targets Using Windchill Loader
Perform the following steps to update distribution targets using Windchill loader.
1. Create an XML file using the example given below:
<?xml version="1.0" ?>
<!DOCTYPE NmLoader SYSTEM "standard13_0.dtd">
<!-- Please refer to the Javadoc for more details about the load method for distribution targets -->
<!-- Updating File DT -->
<NmLoader>
<csvBeginESITarget handler="com.ptc.windchill.esi.load.LoadESI.beginUpdateESITarget">
<csvtypedef>com.ptc.windchill.esi.tgt.ESITarget|com.ptc.windchill.esi.tgt.ESIFileTarget</csvtypedef>
<csvnumber>TEST_FILEDT_200</csvnumber>
<csvname>TEST_FILEDT_700</csvname>
<csvdescription>Updating File DT200</csvdescription>
<csvtaskURI>com/ptc/windchill/esi/export/ExportToFile_01.xml</csvtaskURI>
<csvdefaultForContext>True</csvdefaultForContext>
<csvstatus>ACTIVE</csvstatus>
<csvresponseMetaInfoPath>$CODEBASE$/com/ptc/windchill/esi/ESIResponseMetaInfo_copy1.xml</csvresponseMetaInfoPath>
<csvmoveToParentContext>True</csvmoveToParentContext>
</csvBeginESITarget>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>ESITargetStorageType</csvdefinition>
<csvvalue1>ESI_NFS_STORAGE_TYPE</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>Path</csvdefinition>
<csvvalue1>$WT_HOME$/FileDTResponse200</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvEndESITarget handler="com.ptc.windchill.esi.load.LoadESI.endUpdateESITarget" />
<!-- Updating FTP DT -->
<csvBeginESITarget handler="com.ptc.windchill.esi.load.LoadESI.beginUpdateESITarget">
<csvtypedef>com.ptc.windchill.esi.tgt.ESITarget|com.ptc.windchill.esi.tgt.ESIFTPTarget</csvtypedef>
<csvnumber>TEST_FTPDT_100</csvnumber>
<csvname>FTPDT_2000</csvname>
<csvdescription>Updating FTP DT123</csvdescription>
<csvtaskURI>com/ptc/windchill/esi/export/ExportToFTP_02.xml</csvtaskURI>
<csvdefaultForContext>False</csvdefaultForContext>
<csvstatus>ACTIVE</csvstatus>
<csvresponseMetaInfoPath>$CODEBASE$/com/ptc/windchill/esi/ESIResponseMetaInfo_copy.xml</csvresponseMetaInfoPath>
<csvmoveToParentContext>False</csvmoveToParentContext>
<csvmoveToSiteContext>False</csvmoveToSiteContext>
</csvBeginESITarget>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>FTP_Host</csvdefinition>
<csvvalue1>ptcsupport.com</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>FTP_Path</csvdefinition>
<csvvalue1>D:\Response</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createOrUpdateIBAValue">
<csvdefinition>FTP_Port</csvdefinition>
<csvvalue1>21</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvEndESITarget handler="com.ptc.windchill.esi.load.LoadESI.endUpdateESITarget" />
</NmLoader>
2. Update <csvtypedef> based on the distribution targets you want to update.
3. Add the required distribution target attributes you want to update under <csvIBAValue> and update the <csvdefinition> based on the attribute you want to update.
|
The <csvnumber> is the unique identification number of a distribution target. Updating <csvnumber> is not supported.
|
4. To move a distribution target to the parent context, set <csvmoveToParentContext> as True.
5. To move a distribution target to the Site context, set <csvmoveToSiteContext> as True.
6. Copy the XML file to a folder on your installation, for example, <Windchill>/loadFiles/esi/esiCust/<XMLfile>.
7. Open Windchill shell and execute the following command:
windchill wt.load.LoadFromFile -d <Windchill>/loadFiles/esi/esiCust/<XMLfile> -u adminUsername -p adminPassword
|
• <csvmoveToSiteContext> and <csvmoveToParentContext> are optional attributes and can be set individually for each distribution target.
• <csvmoveToParentContext> and <csvmoveToParentContext> are not supported when creating distribution targets.
• When you set the <csvmoveToSiteContext> as True, the context of an existing distribution target is updated to the Site context.
• When you set the <csvmoveToParentContext> as True, the context of an existing distribution target is updated to its parent context.
• If the values of <csvmoveToParentContext> and <csvmoveToSiteContext> are both set as True for a distribution target, then <csvmoveToSiteContext> takes precedence.
|