In this article we discover the possibilities of Document Script fragments when dealing with complex requirements for document geneneration templates in Sparx Enterprise Architect.

The request

The other day I got a difficult request for a document generation template. At this client they are documenting Use Case scenarios using the structured scenario editor in EA. Each scenario step can be linked to a requirement element.

Each Requirement could have one or more constraints

Based on these scenarios the customer wanted to generate a test scenario document that contained a table like this

StepStep descriptionRequirementRequirement constraints
1User chooses to make a new reservation
2System show the reservation screen where the user can enter Begin, Endate and Roomtype
3User enters begindate and enddate or the numbers of nightsREQ_RV_ 403 Reservation periodInvariant: StartDate < Enddate
Post-condition: A reservation must have a reservation period in the future

The first three columns are available in the standard point and click templates, but the problematic part is the Requirement constraints.… Read more

  • Step 1: Create the virtual document with a script
  • Step 2: Generate the document from the virtual document

Document generation is important in most organisations that work with Enterprise Architect. Storing information in the model is good, but most stakeholders still require documents.

Documents are using as a tool for validation, as a work order, or just to give you an overview of a specific set of thing in the model. The main advantages of a document versus a model is that it has a limited scope and a linear order.… Read more