Interactive document composition

The following components are involved in the interactive document composition:

  • KCM (server side)
  • The business application (server side)
  • The business application (web browser, client side)
  • The KCM ComposerUI JavaScript API loaded in a page of the business application (web browser, client side)

The process of interactive document composition consists of the following steps:

  1. The business application (server side) calls KCM through the Contract Manager. During this call, it passes a reference to the object (a Template or a Letter Book) in KCM Designer and the data for the interactive document composition run.
  2. KCM registers a session for the run and returns a URL and a session identifier.
  3. The business application passes this information to its client side.
  4. The business application calls the KCM ComposerUI JavaScript API and passes the URL, the session identifier, an identification of an HTML element on the page, and a number of JavaScript callback functions.
  5. The KCM ComposerUI JavaScript API connects to KCM server. Based on the retrieved information, it presents all interaction required for composition of the document to the end user. All interaction is presented inside the HTML element that was indicated by the call to the API.
  6. When the interactive process is finished, an appropriate callback function is called by the API. This allows the business application to take up the process and notify its server side that the document is composed.
  7. The business application server side calls KCM through Contract Manager. The call returns the composed document.