Document

A document represents a system-generated artifact, such as an invoice, order, or a report, which is intended to be either stored in electronic form or printed out. It can include any form of content, such as text, graphs, or pictures.

Static x Dynamic

Documents can be static or dynamic. The static document is stored as-is in the system and is served to the user when requested. The dynamic document, on the other hand, does not exist before the user requests it. The dynamic document is generated on the fly. It is basically a static template that is filled with the data provided by the system.

Documentation

From the perspective of documentation, there is only a minimal difference between a document and a screen. For both, the essential thing to be described is the business value. Next, it should be covered who are the typical consumers, which data is needed to fill the artifact, and how the data is mapped to the data fields.

aa

Good Practices

  • Each template, both static and dynamic, needs to have a unique identifier so that it is clear which exact document shall be generated
    • Button onclick: System generates the invoice (INV-001) and displays it
  • It is very important to include the business goal and the typical use case - who generates the document and for what reason
    • The report is required by the local regulator demanding our organization to send it every quarter. More info could be found in the overview (link) of the 'AST Regulatory Requirement'

Antipatterns

  • The document itself does not ask for the data, it receives it as an input. Do not include SQL statements, service calls, or any other tools to get data. Provide just the data object and map it to the template's data fields.
  • Do not include any business logic, algorithms, or business rules in the document template. They should be stored centrally and just referenced.