Classes
Windchill ESI VDB Builder support is a set of classes that build Info*Engine VDB with a defined structure: These are the classes:
VDB Builder Classes
VdbBuilder
This interface declares the methods that all VDB builders must implement. Refer to the Windchill release specific Java documentation for more details on available methods in the class.
VdbBuilderFactory
Creates an instance of the correct implementation of the VdbBuilder interface Refer to the Windchill release specific Java documentation for more details on available methods in the class
VdbBuilderImpl
This class is the default Windchill ESI VdbBuilder implementation. It is extendable. Refer to the Windchill release specific Java documentation for more details on available methods in the class.
* 
The lookup on mapInfos is terminated upon encountering the first matching key and fetching the associated value.
Additional VDB Builder Classes
VdbContainer
Manages a collection of VdbGroup objects and renders them as an Info*Engine IeCollection. This class is not intended to be extended by customizers. Refer to the Windchill release specific Java documentation for more details on available methods in the class.
* 
The term groups collection in each of the descriptions above refers to the values collection in a LinkedHashMap named groups. Each key in the LinkedHashMap is a logical group name, and each value is a HashMap of VdbGroups and collections of distribution targets.
VdbGroup
Manages a collection of VdbElements and renders the contents as an Info*Engine group. This class is not intended to be extended. Refer to the Windchill release specific Java documentation for more details on available methods in the class.
VdbElement
Manages the contents of Info*Engine element. Refer to the Windchill release specific Java documentation for more details on available methods in the class.
Windchill ESI services invoke the VDB builder using classes called renderers. The renderers are described in the following sections of this document:
Publishing CNs
Publishing BOMs
Publishing Parts
Publishing Documents
Publishing Process Plans
Publishing Resources
Publishing Promotion Requests
Publishing Option Sets
The following UML sequence diagram shows the message flow involved in the use of a Windchill ESI services renderer:
Using a Windchill ESI Renderer
As seen in the above figure, the client creates an ESIRendererFactory instance and invokes getRenderer() on it to fetch the renderer of the required type. It then invokes getXXX() on the fetched renderer for a given ERP instance or destination (for example, when rendering a CN, it invokes getECN()). The getXXX() method then creates a VdbBuilder instance and invokes an overloaded version of getXXX() for every target belonging to the given instance. The overloaded version calls update() on the VdbBuilder instance (which sets the currentTarget attribute to the currently processed distribution target), and then the setData() and render() methods on the renderer. The render() method calls setBuilder(), validate() and buildGroups(). The response is then built using a call to addElement() on the VdbBuilder instance. The I*E Collection that represents the response is then fetched through a call to asVDB(), which is then returned to the client.
* 
The above described flow occurs as part of an ESI transaction, and will be repeated for every ERP instance (or destination), thereby resulting in as many ESI response messages as there are instances in the release.
Windchill ESI services provide an abstract class and an interface that define common capabilities of all Windchill ESI services renderers (see above). These are the methods provided:
ESIRenderer
This interface is implemented by all Windchill ESI renderers and the only method it provides is public void render(VdbBuilder), which is described below.
render(builder : VdbBuilder)
This method populates the passed VdbBuilder instance with appropriate content. It throws the ESIRendererException if the data used to initialize the renderer is found to be invalid or if some error occurs while building the output.
ESIRendererException
Subclass of ESIException (and therefore of WTException) which allows clients to determine that the exception was thrown by an ESIRenderer.
BasicESIRenderer
This is an abstract base class containing generally useful behavior for all Windchill ESI XML response renderers. The class is abstract and therefore must be extended.
Refer to the Windchill release specific Java documentation for more details on available methods in the class. adjustTargets(element : Element, targets : Collection)
For each ESITarget entry in the targets argument, the method creates a new Info*Engine Att object and adds it to the element argument. The Att object is named “TargetID” and is assigned the value returned by the getTargetId() API of class ESITargetUtility.
* 
The getTargetId() API of ESITargetUtility returns a value of the form Number: Plant Name, where Number and Plant Name are the unique ID of the distribution target in Windchill and the name of the plant represented by the target in SAP respectively.
* 
The ESI response message that is generated during a given ESI transaction is applicable to distribution targets that belong in a given SAP instance. Thus, rather than adding instance specific information (viz., Client and System ID) to every <TargetID> element in the response message, it is added to just one element (named “Destination”), that occurs within the element named “Transaction”. Besides instance specific information, the <Transaction> element provides useful information such as the transaction number, the release number, the UFID of the primary business object that was released, the name of the Windchill user that initiated the transaction etc.
Was this helpful?