Get Answer XML

This method generates HotDocs Answer XML from the data entered into the displayed answer fields. HotDocs uses the answer XML to create a document when assembling a HotDocs Template.

In this Topic Hide

Prerequisites

Return Type

Using Get Answer XML

SmartObject Tester

Using Get Answer XML in a K2 Process

Prerequisites

Before you can use Get Answer XML, you must first:

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

Return Type

Get Answer XML returns an XML string.

Using Get Answer XML

SmartObject Tester

To generate Answer XML using the SmartObject Tester:

  1. Open the SmartObjects Services Tester (typically located at C:\Program Files (x86)\K2 blackpearl\Bin).
  2. Navigate to the SmartObject Explorer node and expand All SmartObjects.
  3. Right-click on the appropriate HotDocs SmartObject and select Execute SmartObject.
  4. Select Method to Execute > Get Answer XML.
  5. In the answer fields, enter appropriate answer data.
  6. Press Execute. Answer XML appears in the Results section.

Using Get Answer XML in a K2 Process

To use Get Answer XML to Stream in a K2 Process:

  1. Open K2 Studio.
  2. Create a new project or open an existing project.
  3. In the Solution Explorer, expand the project and create or open a process.
  4. Navigate to the Event Wizards menu.
  5. Drag and drop SmartObject Event onto appropriate location on the canvas.
  6. In the SmartObject Wizard, click Next add an Event Name.
  7. Click the Context Browser button next to the SmartObject Method field.
  8. Navigate to SmartObject Server(s) > SmartObject Server.
  9. Navigate to the HotDocs SmartObject created in the K2 SmartObject Tester.
  10. Expand the Packages node.
  11. In the Packages node, expand a Template node. This is a HotDocs Template you wish to use in the process.
  12. Expand the Single Method node.
  13. Select the Get Answer XML option.
  14. Click Add.
  15. In the SmartObject Event Wizard, click Next.
  16. 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.
  17. 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.
  18. Click Next.
  19. In Return Mapping, drag and drop a string data field 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. This data can then be used to assemble a document, by passing the data to another SmartObject that uses Assemble Documents to Stream or Assemble Documents to Disk.
  20. Click Next.
  21. Click Finish. The new mapping appears in the process. You can now link the SmartObject to other stages in the process.