|
WDK iTrace tool for Documentum
| January 2008 | |
| Contributed by - Kunal Gaba, Accenture |
Abstract
WDK iTrace will help WDK developers customize existing WDK components. With this tool WDK developers get complete WDK component tracing information in real time after the form is rendered. Component trace includes id, behavior class, configuration file path, nls bundle, page, url, init args etc. Although this information can be obtained in various ways (i.e. by turning on WDK tracing) the information can be displayed instantly in one place by just pressing a key with WDK iTrace.
Editor's note: As of this writing the tool has been tested extensively with WDK 5.3 but has had minimal testing with version 6.0
Need for the Tool
The tool was developed to ease the WDK customization process. The WDK framework is a component based framework based on the principle of reusability. WDK components are present in various layers of the framework, and the first step of customizations would be to find out the component you have to customize, and from which layer you have to extend it..
WDK iTrace eases this process by looking up complete component information and displaying the information in a single window. WDK iTrace also assists with debugging components because tracing information includes current component context and init arguments passed to it.
How does it work?
WDK iTrace relies on WDK framework for its functioning. As the form is rendered WDK, iTrace caches the form tracing information in internal cache. You can configure the timeout period of an entry in the cache. It uses AJAX to get the information of the currently rendered component asynchronously without refreshing the page from the cache and displays that information in a popup.
What can you do with it?
- Using WDK iTrace you can get the following tracing information through a keystroke (shortcut ctrl + shift G):
- Component id
- Config File Path
- NLS bundle
- Component Context
- Page
- Url
- Init Args
If Container component is traced then additional information will be displayed:
- Contained component Id
- Contained component config file path
- Contained component args
- You can trace out all the components which have been loaded in the current session in same sequence as they are loaded. (shortcut ctrl + shift K)
Screen Shots
Click on photos for larger images
The graphics that follow show the component info of Documentum Webtop TaskManager component which is used for showing the content of an Inbox Item. You just need to focus on the form and press ctrl + shift + g and you will get this information:
Additional information:
To see tracing information of all components which were rendered in the current session just press ctrl + shift + k and this is displayed:
Deployment
- Extract wdk_itrace_tool_1.0.zip file in a local directory
- Copy iTrace.jar to
WEB-INF/lib folder of WDK webapp context
- Copy the
include and itrace folders and place them, as is, in the target folder of webapp context (<webapp-context>/custom)
- Place the following tags inside web.xml file found in WEB-INF folder
<servlet>
<servlet-name>FormInfoServlet</servlet-name>
<servlet-class>org.wdk.itrace.FormInfoServlet</servlet-class>
<init-param>
<param-name>cache-timeout</param-name>
<param-value>5</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>FormInfoServlet</servlet-name>
<url-pattern>/instalookup/*</url-pattern>
</servlet-mapping>
|
Note: Cache-timeout parameter signifies the time in minutes, information of single form will persist in the cache.
- Copy and place the following tag inside <
formrender-listeners> tag found in app.xml file of app layer immediately below the custom layer in application layer heirarchy
<listener>
<class>org.wdk.itrace.FormListener</class>
</listener>
For example:
For Webtop place the tag in <webapp-context>/webtop/app.xml
For WP place the tag in <webapp-context>/wp/app.xml
For DA place the tag in <webapp-context>/webtop/app.xml
|
- Append the following lines to WebformScripts.properties found in
/WEB-INF/classes/com/documentum/web/form/WebformScripts.properties
14_iTrace.href=/custom/include/itrace.js
14_iTrace.language=javascript1.2
|
Note: Make sure that index value of the script (e.g., 14 in the above case) should be the successive index of last entry already present in the file. For example, if last script included in the file has index of 21 then you need to append 22_iTrace.href=/custom/include/itrace.js and 22_iTrace.language=javascript1.2 to the file.
- Restart the application server or reload the context
Notes
WDK iTrace 1.0 supports IE 5 and above and all versions of Mozilla Firefox. In Firefox the information is displayed in a separate pop up window, so please turn off your pop up blocker for iTrace in Firefox.
Download
Click here to download the WDK_iTrace_tool_1.0.zip file.
About the Author
Kunal Gaba works with Accenture's Documentum Community of Practice in India. Kunal has 2.5 years of experience on EMC Documentum platform and has been involved in projects based on WDK customizations and other Documentum products. For questions or comments about this tool, you can contact Kunal at kunal.gaba@accenture.com.
Discuss
Click here to discuss this article
|