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 attributes and 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 attributes and 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 attributes and methods in the class.
* 
The term groups collection in each of the descriptions above refers to the values collection in a Linked HashMap named groups. Each key in the Linked HashMap 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 attributes and methods in the class.
VdbElement
Manages the contents of an Info*Engine element. Refer to the Windchill release specific Java documentation for more details on available attributes and 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:
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 figure Using a Windchill ESI Renderer, 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 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 representing the given destination. 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 destination, thereby resulting in as many ESI response messages as there are destinations 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 attributes and 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 the number attribute of the ERP Connector distribution target in Windchill.
* 
The ESI response message that is generated during a given ESI transaction is applicable to a given destination. The destination ID is added to the 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?