Create and Test Execute a New SmartObject
To use a HotDocs Template Package in your K2 business process, you need
to use a HotDocs Service Instance to create a new SmartObject. Once you
have published this new SmartObject, you can choose to test execute it.
Prerequisites
Before you can create a SmartObject, you must first:
- Register the Service Type
- Register a Service
Instance
1. Create a SmartObject
To create a SmartObject using an existing Service
Instance:
- Open the SmartObjects
Services Tester (Normally located at C:\Program Files
(x86)\K2 blackpearl\Bin).
- In the ServiceObject
Explorer folder, expand the Service Type you created
previously (e.g. HotDocsServiceBroker).
- Locate the Service Instance you created
previously.
- Expand the Service Instance.
- Expand the Packages
node to see a list of all the template packages available to the SmartObject.
- Right-click a package.
- Select Create SmartObject.
- Click Publish SmartObject
to create a new SmartObject. Close the Publish SmartObject
window.
- In the SmartObject Services Tester, expand the SmartObject Explorer folder.
- Expand the All SmartObjects
folder to see the new SmartObject in the list.
2. Test Execute a Smart Object
If you are using a template package that contains
repeat data, you will need to use a different method when executing
your SmartObject.
To execute the SmartObject created above:
- Open the SmartObjects
Services Tester (Normally located at C:\Program Files
(x86)\K2 blackpearl\Bin).
- Navigate to the SmartObject Explorer
folder.
- Right-click the SmartObject you created above and select Execute SmartObject.
- In the Method to Execute
drop-down menu, select an option:
- Enter the input properties. For Get Answer XML you can just type
the answers to your variables into their fields. When you click Execute
you get an XML output in the CreatedAnswerXML field at the bottom
of the window that can be used to test execute this or other templates
with the same variable names. For Assemble Documents to Disk or Assemble
Documents to Stream you also have the following options:
- Output Format (required)
– the output format for the generated document. Enter one of these
options:
- Document Markup View (optional)-
Type Yes
if you want HotDocs to generate the document with Markup text.
- Document Answer XML
(optional) – Paste the XML output you previously generated using
the Get Answer XML method. This will act like a HotDocs Answer
File and populate the variable fields when executed.
- Click Execute.
- You can view your test outputs in the folder you specified
when you registered the
Service Instance.