Synchronous draft document creation flow in Smart Communications for PolicyCenter

When creating a document synchronously, you can create a new draft document by selecting New Document > Create from a template from the Documents screen.

Application flow

At the application level, creating a new draft document triggers the flow shown in the following diagram:

In the illustration, the following actions occur at each numbered item:
  1. In PolicyCenter, you select Create from a template.
  2. The document creation user interface, defined in the PCF file, calls the Template source plugin implementation to retrieve the templates from SmartCOMM.
  3. The user selects a template from the Search Results of the Upload Documents tab and then defines properties such as the name of the document.
  4. The user clicks Create Draft. The Draft Document Handler plugin calls SmartCOMM to create a draft document.
  5. PolicyCenter displays the SmartCOMM draft editor login screen. After you enter your credentials, the draft editor displays the draft document in the Upload Documents tab. You can edit the document in PolicyCenter. PolicyCenter displays a message if the template contains no fields for editable content.
  6. If you click Create Document, PolicyCenter calls the document production flow, which creates the Document object.
  7. If you click Cancel instead, then PolicyCenter deletes the draft document and does not create the Document object.

Integration flow

At the integration level, creating a new draft document triggers the flow shown in the following illustration:

In the illustration, the following actions occur at each numbered item:
  1. In PolicyCenter, you select Create from a template.
  2. The document creation user interface, defined in the PCF file, calls SmartCommsDocumentTemplateSource, the IDocumentTemplateSource plugin implementation. The plugin accesses the SmartCommsConfiguration entity instance. The plugin parameters specify:
    • The effective date of the template.
    • Maximum number of results.
    • Keywords, language, and document type for filtering the templates. This filter information comes from the PCF file.
  3. The SmartCommsDocumentTemplateSource plugin requests the templates from SmartCOMM.
  4. SmartCOMM retrieves the templates and provides them to the SmartCommsDocumentTemplateSource plugin.
  5. The SmartCommsDocumentTemplateSource plugin returns the list of templates to the user interface, which displays these templates in the Search Results of the Upload Documents tab.
  6. The user interface returns the template descriptors to PolicyCenter, which displays these templates in the Search Results of the Upload Documents tab.
  7. You select a template, and then define properties such as the name of the document. you click Create Draft.

    PolicyCenter stores this information in transient objects. PolicyCenter does not yet create the Document entity instance in the database.

  8. The user interface calls the DraftDocumentHandler plugin.
  9. The DraftDocumentHandler plugin sends a message to SmartCOMM through RESTful web services to create a draft document.
  10. SmartCOMM returns the draft document to the DraftDocumentHandler plugin.
  11. The DraftDocumentHandler plugin returns the draft document to the user interface. PolicyCenter displays the SmartCOMM draft editor login screen. After you enter your credentials, the draft editor displays the draft document in the Upload Documents tab. PolicyCenter displays a message if the template contains no fields for editable content.
  12. You edit the document in PolicyCenter.
  13. If you click Create Document, PolicyCenter calls the document production flow, which creates the Document object. If you click Cancel instead, then PolicyCenter deletes the draft document and does not create the Document object.

    In the base integration, you can create documents up to 260,000 characters. You can adjust this limit in Content property of the DraftDocument entity.