Assemble Documents to Disk
The Assemble
Documents to Disk method assembles a document from a HotDocs template
and writes the results to disk. Typically, this method is used for test
purposes. In most cases, the Assemble
Documents to Stream method is recommended for use in production.
In this Topic ShowHide
Prerequisites
Before you can use Assemble Documents to Disk, you must first:
- Register the Service Type
- Register a Service
Instance
Return Type
Assemble Documents to Disk returns a string
containing a file path to the folder containing the assembled documents.
Using Assemble Documents to Disk
SmartObject Tester
To assemble documents to disk using
the SmartObject Tester:
- Open the SmartObjects
Services Tester (typically located at C:\Program
Files (x86)\K2 blackpearl\Bin).
- Navigate to the SmartObject
Explorer node and expand All
SmartObjects.
- Right-click on the appropriate HotDocs SmartObject and select
Execute SmartObject.
- Select Assemble Documents to Disk
from the Method to Execute drop-down menu.
- In the answer fields, enter appropriate answer data.
- Press Execute to
write the file to the location specified by the SmartObject's Document Output Folder Path
property.
K2 Process
To
assemble documents to disk in a K2 Process:
- Open K2 Studio.
- Create a new project or open an existing project.
- In the Solution Explorer, expand the project and create or
open a process.
- Navigate to the Event Wizards
menu.
- Drag and drop SmartObject Event
onto appropriate location on the canvas.
- In the SmartObject Wizard, click Next.
- Enter an Event Name.
- Click the Context Browser
button next to the SmartObject Method field.
- Navigate to SmartObject Server(s)
> SmartObject Server.
- Navigate to the HotDocs
SmartObject created in the K2 SmartObject Tester.
- Expand the Packages
node.
- In the Packages node, expand a Template node. This
is a HotDocs Template you wish to use in the process.
- Expand the Single Method node.
- Select the Assemble Documents
to Disk option.
- Click Add.
- In the SmartObject Event Wizard, click Next.
- Click the right arrow on the right-hand side of the window to display
the context browser. Open the Process/Activity
Data tab and expand Data Fields.
- In Input Mapping, drag and drop data fields from the
Context Browser into the Value column for the appropriate
Input field. This maps data from the process to fields used in the
SmartObject.
- Click Next.
- Optional: in Return Mapping,
drag and drop data fields from the Context Browser
into the Value column for the appropriate Return field. This maps
the data returned from the SmartObject to business data within the
process.
- Click Next.
- Click Finish.
The new mapping appears in the process. You can now link the SmartObject
to other stages in the process.