The TMWorkItemTemplate.html file is the basis of the work item viewer. The HTML in this file helps to determine how the content of a work item appears to the user. You should use a copy of this file as the basis of each work item viewer you develop.
Note: Currently, all HTML work item viewers for EPX must be authored in well-formed HTML, which conforms to the rules of XML. Refer to Using Well-Formed HTML for a description of the basic rules that must be followed.
If you only need default functionality, it is fairly easy to create an HTML work item viewer. The major steps are:
Copy the TMWorkItemTemplate.html file to your work area and rename it. The file is located in:
<EPX>\tomcat\webapps\tm\apps
A second copy of TMWorkItemTemplate.html is located in:
<EPX>\tomcat\webapps\html
If something should happen to the copy in ..\apps, this file can be copied into the ..\apps directory. The file in ..\html should never be used unless something happens to the copy in ..\apps.
Modify your new work item viewer file by going to the <USER_WORKITEM_AREA> section of the file and adding your well-formed HTML form elements. Make sure you assign unique names to each form element needed in your new work item viewer file.
Save the file.
Optionally, run the file through an XML validation tool to ensure that it uses only well-formed HTML. Refer to Using Well-Formed HTML for more information.
You can test the file by opening it with a Web browser and seeing how it looks. Ignore any JavaScript error messages.
Repeat steps 1–5 until you have all the viewer files you need for your various work item viewers.
Place your work item viewer files into a directory that can be referenced relative to the Web server base URL. In practice, all work item viewers should be placed into the directory:
<EPX>\tomcat\webapps\tm\apps
Work item viewers can also be placed in a subdirectory under this one, such as:
<EPX>\tomcat\webapps\tm\apps\myapp
It is recommended that you create a subdirectory under the ..\apps directory for each application (where an application consists of one or more process flows and associated HTML work item viewers, graphics, process flow definitions, and other application-specific files).
Important: You must place any graphics (such as GIF or JPG images) that your HTML viewer file references in the same directory as your viewer file, and all image references in your HTML viewer file must follow the format ..\apps\myapp\my.jpg.
For example:
<img border="0" src="..\apps\myapp\my.jpg"
width="273" height="83"></img>
All HTML viewer files that you create that have other references, such as hyperlinks using HTML-relative URL addresses, must also use the ..\apps format.
For example:
<a href="..\apps\MyHelpHyperLink.html">
Help Document</a>
Note: Several sample work item viewer files are provided with EPX. They are located in the directory <EPX>\tomcat\webapps\tm\apps.
Refer to TMWorkItem1.html, TMWorkItem2.html, TMWorkItem3.html, and TMWorkItem4.html for examples of work item viewers.
After work item viewer development is finished, use Process Modeling to add the viewer to the system and tell the Web server where the file is located. Then, associate each field in the work item viewer file with a work item type, using the Work Item Viewer dialog. For information about these functions, see Using the Work Item Viewer Dialog.
The names you use for a work item viewer file and its form elements should be clearly related for ease and efficiency of information retrieval and storage. For example, suppose a purchase order work item has four viewer files. If you name the work item type purchase order and then call each viewer by a name that describes its function (such as po_request, po_verify, po_approve, and po_execute), you can tell at a glance which viewer performs which function without having to examine the file. If you name your viewers po_1, po_2, po_3, and po_4, and then later you need to make a change to the approval viewer, you may need to examine several of the files to determine which one is affected. Using this method also makes it easier for the process designer to match the appropriate work item viewer with the appropriate participant when creating process flows.