Report Generation

A “report” in the DSM is a template for generating documents from the model. A typical example is shown below. When the report is executed it will generate a Word or HTML document.

The model containing this report is train door argument.dsm. You will need to install the DSM to open this file. You can see the Word version of the output here: safety-case.docx.

Report template
A Report in the DSM.

Reports take an input entity in the same way as matrices and queries. This report takes a “package” entity (packages in the DSM are used to organise other entities). The report starts by using the input package name as the top level heading followed by the Introduction” field from that package as a block of text.

The top level “Section” in the report runs the queryGSN packages“. This is a user-defined query which finds all the packages below the input that contain a GSN diagram. For each of these packages the section inserts the package name as a level 2 heading, and again follows this with the “Introduction” field from that package.

The final part of the section is a nested sub-section which runs the “Package Diagrams” query to find all the diagrams. It includes each of these diagrams, along with two matrices for the contents of the diagram.

This diagram shows the relationship between the Report template and the generated document.

Click to enlarge

The generated document only contains content derived from the model, but a deliverable report will also need front matter, executive summary, conclusions, recommendations etc.  Simply paste the generated document into the deliverable at the appropriate place.