A Java servlet is a small extension to a server that enhances and extends the server’s functionality. In EPX, servlets provide dynamic content for TaskManager and Report Tool. Java servlets are used to handle all requests generated by users and are run on the same machine as the Web server. The servlet receives requests from EPX clients and then makes a request to its associated EPX’s Application Server instance for the dynamic content. The servlet then creates an XML document in memory by reading in an HTML work item viewer and concatenating the dynamic content to it. A predefined XSL style sheet is then applied to the XML document, and the HTML output is sent back to the client, as illustrated in the following diagram:
When a user makes a request from TaskManager, the content of the data returned is dynamic, based on the current data in the system and which page is returned in the navigation flow.
TaskManager provides users with a window into process flows. From the TaskManager interface, users can gain access to any tasks that have been assigned to them as a part of a process flow activity. Users can also generate new work items to be dropped into an existing process flow.
When a TaskManager servlet is called, it is passed through several parameters, including the work item viewer type and key, the EPX session ID, and action (which may be the work item ID), as applicable. The servlet checks the sessions cache for the latest data relative to the type of servlet request. If the cache data is available, that data will be used first. Otherwise, the data is retrieved from the Application Server instance.
The TaskManager servlet retrieves the appropriate template and style sheet. The XML template has been pre-loaded and the servlet adds the dynamic data to it. After processing, HTML is produced, which is then returned to the EPX client.