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:

  1. Register the Service Type
  2. Register a Service Instance

1. Create a SmartObject

To create a SmartObject using an existing Service Instance:

  1. Open the SmartObjects Services Tester (Normally located at C:\Program Files (x86)\K2 blackpearl\Bin).
  2. In the ServiceObject Explorer folder, expand the Service Type you created previously (e.g. HotDocsServiceBroker).
  3. Locate the Service Instance you created previously.
  4. Expand the Service Instance.
  5. Expand the Packages node to see a list of all the template packages available to the SmartObject.
  6. Right-click a package.
  7. Select Create SmartObject.
  8. Click Publish SmartObject to create a new SmartObject. Close the Publish SmartObject window.
  9. In the SmartObject Services Tester, expand the SmartObject Explorer folder.
  10. 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:

  1. Open the SmartObjects Services Tester (Normally located at C:\Program Files (x86)\K2 blackpearl\Bin).
  2. Navigate to the SmartObject Explorer folder.
  3. Right-click the SmartObject you created above and select Execute SmartObject.
  4.  In the Method to Execute drop-down menu, select an option:
  5. 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:
  6. Click Execute.
  7. You can view your test outputs in the folder you specified when you registered the Service Instance.