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
Step | Step description | Requirement | Requirement constraints |
---|---|---|---|
1 | User chooses to make a new reservation | ||
2 | System show the reservation screen where the user can enter Begin, Endate and Roomtype | ||
3 | User enters begindate and enddate or the numbers of nights | REQ_RV_ 403 Reservation period | Invariant: 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
EA-Matic, the add-in to automatically trigger your script in Enterprise Architect introduces the Developer Mode
EA-Matic is a free and open source add-in for Sparx Enterprise Architect, and is distributed as part of the Bellekens EA Toolpack
In order to enable Developer Mode, open the settings window and check the Developer Mode checkbox and fill in the Script Path.
The Developer Mode is registered per model. Typically you would enable this on your DEV model, but not on the TEST or PROD models.… Read more
The Bellekens EA toolpack v2.0 now has two completely new general purpose add-ins.
EA Validator
The EA Validator is an add-in that will help you validate the syntactical correctness of your EA model.

Validations as based on SQL queries and are fully customizable to your specific requirements. It comes with a set of example rules that may be used as is, or can serve as a basis for writing your own validation rules
EA Mapping
With EA Mapping you can map data models of all kinds to each other.… Read more