Assembly sessions are specific instances of the document assembly process, for a work item. You use assembly sessions to create new versions of work items.
In this Topic Hide
A work item is a named location in HotDocs Advance, comprising a reference to a specific HotDocs template and a collection of work item versions.
A version is a snapshot of the assembled documents for a work item at a particular point in time, and the data required for Advance to (if necessary) re-create those documents. A version comprises:
Every version created for a work item is saved in Advance. In this way, work item versions help you track how a work item has changed over time.
When you want to create a new version of a work item, you first create a new assembly session for the work item. You use the assembly session to manage the creation of the new version. While the assembly session is in progress, you can optionally display interviews for your end users, to gather answer data. When you complete an assembly session, Advance processes the data it has gathered and creates the new version, including the assembled documents and the new answer set.
See Assembling Documents Overview for an overview of the implementation details for using assembly sessions.
There are two main work flows for using assembly sessions. The one you use will depend on whether you already have answer data or if you need to gather it from your end-users. The workflows are:
When gathering answer data from end-users, using an interview, you will use the following workflow:
When assembling documents with existing answer data, you will use the following workflow:
An assembly session has two states:
When beginning an assembly session, you can use the forceCreate parameter to create a new assembly session even if the work item has a currently in-progress assembly session.
API endpoint: PUT /WorkItems/{id}/Versions/{versionId}
Creates a new assembly session for the work item. See Beginning an Assembly Session for more information.
API endpoint: PUT /WorkItems/{id}/Versions/Active/CompleteSession
When a user clicks the Finish button in an interview, the interview posts answer data to the server. At this point, for Advance to assemble the documents, the status of the assembly session must be set to 'Complete', using the endpoint above. See Completing an assembly session for more information.
API endpoint: PUT /WorkItems/{id}/Versions/Active/SaveSession
Your end users may sometimes decide to leave an interview incomplete, with the intention of returning to it at a later time. To support this, you should implement storing an assembly session. Stored assembly sessions can be resumed using the 'Begin assembly session' endpoint.
API endpoint: DELETE /WorkItems/{id}/Versions/Active/
Your end users may sometimes decide to leave an interview, with no intention of returning to it. To support this, you should implement abandoning an assembly session. Abandoned assembly sessions do not assemble new documents and cannot be resumed.
Once an assembly session is complete, you will often want to download the documents assembled by that session. This takes two steps with the API:
This action is typically performed at the request of the end user who has just finished the interview.