Establishing Distribution Target Assignment Classes
Distribution target assignments are established by creating an ESITargetAssignmentLink object and persisting that object in the database. Windchill ESI services class, StandardESIService, provides a public method, assignTarget(), that creates and saves the appropriate object.
Class ESITargetUtility
The distribution target package is intended to be self-contained and private, except for the classes, ESITarget, ESITargetAssociation, ESIQueryTargetAssociation, and ESITargetUtility. ESITargetUtility is the public interface to the package. The services of the package should be invoked via the public methods of the ESITargetUtility class. The methods of the class are not thread-safe. Each thread is responsible for creating a new instance of the distribution target utility.
Refer to the Windchill release specific Java documentation for more details on available attributes and methods in the class.
* 
The getDestinationId() and getPlantName() APIs attempt to invoke an identically named API defined on a class whose name is provided by the Windchill ESI preference Distribution Target Information Finder. Since this preference is set to the name of an interface (com.ptc.windchill.esi.tgt.ESITargetInfoFinder) by default, an exception is thrown upon invoking the API for an ERP Connector target. The exception handler ensures that either the number attribute of the target (for getDestinationId()) or a null (for getPlantName()) is returned. However, in order for the preference to work for custom targets, the preference should be set to the name of a concrete implementation of the said interface.
ERP Connector now provides configurable capability instead of customizing ESITargetInfoFinder class and overriding adjustTarget. The existing customization code will continue to work, but it is recommended to use the new configuration method. For more information, see Configure ESI for Setting Destination ID and Target ID in ESI Response.
Was this helpful?