HotDocs Server Host Application Overview

A HotDocs Server host application is any web application that utilizes HotDocs Server features on the back end to accomplish tasks related to document generation. Some host applications are focused primarily on document generation, but this is not always the case. Many third-party custom host applications focus primarily on other areas of functionality (for example, enterprise-specific workflows) and use HotDocs whenever documents need to be generated. Either way, the designation of "host application" generally refers to the application that integrates with (or "hosts") HotDocs. If you think of HotDocs as an engine, the host application is analogous to the automobile that makes the engine's power available to an end user.

Who writes and maintains a host application? A custom-built solution can be developed by someone in your organization or an outside consultant. It is also possible to acquire (and possibly adapt) an out-of-the-box, general-purpose host application that is developed and maintained by HotDocs Ltd. or another other third party. Although host applications are frequently ASP.NET Web applications, if you choose integrate with HotDocs Server via its web services interface, the host application can in fact be almost any type of application on any platform (Java, PHP, etc.).

Division of Labor

There are several features typically exposed by a HotDocs host application. Some of these features can be accomplished entirely by HotDocs Server; some are provided by the host application. This leads to a flexible architecture that shields end users from much direct interaction with HotDocs and imposes very few requirements on the end user experience. Depending on the design and functionality of your host application, end users may not even be aware HotDocs Server is in use, but they will naturally benefit from the powerful document generation capabilities HotDocs Server brings to the table.

Following are the primary tasks that host applications are concerned with:

Feature HotDocs Server's Role Host Application's Role
Manage Templates HotDocs Server requires that templates (and all their dependent files) be accessible by direct file path (either local paths or UNC network paths are supported). The host application is responsible for managing the upload and storage of templates and the selection of which templates to use when.
Manipulate Answers Data is supplied to interviews or document assemblies using an XML-based Answer Collection (also known as an Answer File). HotDocs Server's COM and .NET APIs provide Windows-based host applications with a means of easily producing, inspecting, and manipulating Answer Collections. Host applications can provide custom data to pre-populate interviews, or even assemble documents without presenting an interview at all. Being conversant in HotDocs Answer Collections allows a host application to manipulate and inspect data before and after interviews are presented or documents are generated. Depending on host application design, Answer Collections are sometimes also archived for later reuse.
Present Interviews HotDocs Server generates browser-based interviews (dynamic series of input forms) that collect the answers needed to assemble a document based on a given HotDocs template. The browser-based interview encapsulates rules and dynamic behavior imposed by the template author. When the interview is completed, answers are made available to the host application. Host applications can place HotDocs-generated interviews directly in any standards-compliant web page.
Assemble Documents HotDocs Server takes an answer collection and a template path as input and delivers an assembled document. It can also optionally convert most assembled documents into PDF format. Results of assembly and/or conversion are delivered to the host application. Host applications are responsible for requesting assemblies, storing assembled documents, and making those documents available to end users in whatever way meets your requirements.
Manage "Assembly Queues" Because of their embedded business logic, HotDocs interviews can be dynamic. What begins as a single interview or document assembly can branch out into an "assembly queue": a sort of mini-workflow containing a series of one or more interviews that need to be presented to the user and/or documents that need to be generated, as dictated by the template author. Your host application may need to be aware of how assembly queues work in order to facilitate the user experience of progressing through the work to be done.

To see a working example of a HotDocs Server host application built using the HotDocs Open SDK, you can install HotDocs Sample Portal. This basic host application (including all source code) is available as a demonstration of one way in which you could write a host application. Although it incorporates all of the basic features of HotDocs Server into a functioning host application, it is not designed to be used as-is in a production environment.

You may also choose one of several out-of-the-box host applications from HotDocs, such as HotDocs Workspace or HotDocs Template Portal. These pre-built host applications include template, answer file, and user group management, offering an easy alternative to building your own. They can also be customized to meet your needs.

If you need assistance developing your own host application, the HotDocs consulting team can help. It has experience in developing Web sites and template sets, and integrating existing systems and applications with HotDocs Server. Contact your HotDocs sales representative for details.