The basic elements needed for including the guideword analysis information in the M2Doc report are the analysis itself and each element it contains. You can access these through the analysis model. Services can extract for example the guideword definitions function names.
The following example shows a guideword table and how to access elements in it.
Table 11.1: Sample Guideword Analysis Table
| Element | NO OR NOT | MORE | LESS | AS WELL AS |
|---|---|---|---|---|
| [F001] Main Function | [MF001] No main | [MF002] Not enough main | ||
| [F002] Secondary Function | [MF003] No secondary | [MF004] Too much secondary | [MF005] Not enough secondary | |
| [F003] Diagnose Function |
Let's say you use the variable analysis for your guideword analysis.
To list the total number of entries, use
{ m:analysis.entries->size() }Result: 3
To list the number of guidewords, use
{ m:analysis.guidewords->size() }Result: 4
To access the name of
entry1, you can use:{ m:entry1.element.name }{ m:analysis.entries->first().element.name }
Result: Main Function
To count the number of entries, such as malfunctions, in
entry2, use{ m:entry2.eval('self.guidewordToFailures.size() + ""') }Result: 3