WorkSession AssembleDocuments Method (PreAssembleDocumentDelegate, PostAssembleDocumentDelegate, Object, String)
AssembleDocuments causes all contiguous pending document work items (from CurrentWorkItem onwards) to be assembled, and returns the assembled documents.

Namespace: HotDocs.Sdk.Server
Assembly: HotDocs.Sdk.Server (in HotDocs.Sdk.Server.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public Document[] AssembleDocuments(
	PreAssembleDocumentDelegate preAssembleDocument,
	PostAssembleDocumentDelegate postAssembleDocument,
	Object userState,
	string logRef
)

Parameters

preAssembleDocument
Type: HotDocs.Sdk.Server PreAssembleDocumentDelegate
This delegate will be called immediately before each document is assembled.
postAssembleDocument
Type: HotDocs.Sdk.Server PostAssembleDocumentDelegate
This delegate will be called immediately following assembly of each document.
userState
Type: OnlineSystem Object
This object will be passed to the above delegates.
logRef
Type: OnlineSystem String
A string identifying the current user or transcation, to be included in HotDocs log entries. This is necessary if you wish to track log entries back to specific users during analysis or troubleshooting.

Return Value

Type:  Document 
An array of Document, one item for each document that was assembled. Note that these items are of type Document, not AssemblyResult (see below).
Remarks

If AssembleDocuments is called when the current work item is not a document (i.e. when there are currently no documents to assemble), it will return an empty array of results without performing any work.

TODO: include a table that shows the relationship between members of Document, AssemblyResult, WorkSession and DocumentWorkItem.
See Also