-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes on the reqs-json model for usability in macros. playground exam…
…ple for trace creation.
- Loading branch information
1 parent
1a990dd
commit 58c98eb
Showing
8 changed files
with
64 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
' ############################################ | ||
' --------------------------------------------- | ||
' create the reqs trace starting with the | ||
' requirement with the given alias | ||
!unquoted procedure PUMLAPutReqsTraceFor(alias) | ||
!foreach $r in $allreqs.reqs | ||
!if ($r.alias == alias) | ||
tbd | ||
!endif | ||
!endfor | ||
!endprocedure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
@startuml | ||
!include <c4/C4_Container.puml> | ||
!include pumla_macros.puml | ||
!include reqsrepo_json.puml | ||
|
||
AddElementTag("v1.0", $borderColor="#d73027") | ||
AddElementTag("v1.1", $fontColor="#d73027") | ||
AddElementTag("backup", $fontColor="orange") | ||
!alias = "REQ_WS1" | ||
|
||
'AddRelTag("backup", $textColor="orange", $lineColor="orange", $lineStyle = DashedLine()) | ||
!foreach $r in $allreqs.reqs | ||
!if $r.alias == alias | ||
object $r.alias { | ||
|= //attribute// |= //content//| | ||
|= Type | $r.type | | ||
|= Content | $r.content | | ||
|= Status | $r.status | | ||
} | ||
!endif | ||
!if $r.derived_from == alias | ||
object $r.alias { | ||
|= //attribute// |= //content//| | ||
|= Type | $r.type | | ||
|= Content | $r.content | | ||
|= Status | $r.status | | ||
} | ||
!endif | ||
!endfor | ||
|
||
PUMLAC4Person(user, "Customer", "People that need products") | ||
PUMLAC4Person(admin, "Administrator", "People that administrates the products via the new v1.1 components", $tags="v1.1") | ||
PUMLAC4Container(spa, "SPA", "angular", "The main interface that the customer interacts with via v1.0", $tags="v1.0") | ||
PUMLAC4Container(spaAdmin, "Admin SPA", "angular", "The administrator interface that the customer interacts with via new v1.1", $tags="v1.1") | ||
PUMLAC4Container(api, "API", "java", "Handles all business logic (incl. new v1.1 extensions)", $tags="v1.0+v1.1") | ||
PUMLAC4ContainerDb(db, "Database", "Microsoft SQL", "Holds product, order and invoice information") | ||
PUMLAC4Container(archive, "Archive", "Audit logging", "Stores 5 years", $tags="backup") | ||
!foreach $r in $allreqs.reqs | ||
!if $r.derived_from !=null | ||
$r.derived_from <|-- $r.alias | ||
!endif | ||
!endfor | ||
|
||
|
||
PUMLAC4Rel("id1", user, spa, "Uses", "https") | ||
PUMLAC4Rel("id2", spa, api, "Uses", "https") | ||
PUMLAC4Rel_R("id3", api, db, "Reads/Writes") | ||
PUMLAC4Rel("id4",admin, spaAdmin, "Uses", "https") | ||
PUMLAC4Rel("id5", spaAdmin, api, "Uses", "https") | ||
PUMLAC4Rel_L("id6", api, archive, "Writes", "messages", $tags="backup") | ||
|
||
user .. spa : huhu | ||
|
||
SHOW_LEGEND() | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
@startjson | ||
{"reqsrepopath": ".", "reqsrepofile": "./reqsrepo_json.puml", "reqs": [{"type": "Requirement", "alias": "REQ_WS1", "status": "decided", "derived from": null, "taggedvalues": [{"tag": "Vendor", "values": ["A Inc.", "C Ltd."]}, | ||
{"tag": "Variant", "values": ["SysA", "SysB"]}], "content": "This is a requirement towards my Weather Station. The Weather Station shall be able to measure the temperature.", "derived to": "REQ_SensorA1", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS2", "status": "new", "derived from": null, "content": "This is another requirement. The Weather Station housing shall be blue.", "derived to": "not yet derived", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS3", "status": "aligned", "derived from": null, "content": "The Weather Station shall display the measured temperature so that it is conveniently readable by a human looking at it in a distance of up to 3m.", "derived to": "not yet derived", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS4", "status": "aligned", "derived from": null, "content": "It shall be possible to switch the unit of the displayed temperature between degree Celsius and Fahrenheit.", "derived to": "not yet derived", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS5", "status": "aligned", "derived from": null, "content": "The unit in which the temperature is displayed shall stay as it is even after the batteries and/or the power supply has been removed.", "derived to": "not yet derived", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_SensorA1", "status": "aligned", "derived from": "REQ_WS1", "content": "The sensor shall be able to measure the temperature of the surrounding air in the room.", "derived to": "not yet derived", "in file": "./tempSensorA/req.yaml"}]} | ||
{"reqsrepopath": ".", "reqsrepofile": "./reqsrepo_json.puml", "reqs": [{"type": "Requirement", "alias": "REQ_WS1", "status": "decided", "derived_from": null, "taggedvalues": [{"tag": "Vendor", "values": ["A Inc.", "C Ltd."]}, | ||
{"tag": "Variant", "values": ["SysA", "SysB"]}], "content": "This is a requirement towards my Weather Station. The Weather Station shall be able to measure the temperature.", "derived_to": "REQ_SensorA1", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS2", "status": "new", "derived_from": null, "content": "This is another requirement. The Weather Station housing shall be blue.", "derived_to": "not yet derived", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS3", "status": "aligned", "derived_from": null, "content": "The Weather Station shall display the measured temperature so that it is conveniently readable by a human looking at it in a distance of up to 3m.", "derived_to": "not yet derived", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS4", "status": "aligned", "derived_from": null, "content": "It shall be possible to switch the unit of the displayed temperature between degree Celsius and Fahrenheit.", "derived_to": "not yet derived", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS5", "status": "aligned", "derived_from": null, "content": "The unit in which the temperature is displayed shall stay as it is even after the batteries and/or the power supply has been removed.", "derived_to": "not yet derived", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_SensorA1", "status": "aligned", "derived_from": "REQ_WS1", "content": "The sensor shall be able to measure the temperature of the surrounding air in the room.", "derived_to": "not yet derived", "in_file": "./tempSensorA/req.yaml"}]} | ||
@endjson | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
!$allreqs = {"reqsrepopath": ".", "reqsrepofile": "./reqsrepo_json.puml", "reqs": [{"type": "Requirement", "alias": "REQ_WS1", "status": "decided", "derived from": null, "taggedvalues": [{"tag": "Vendor", "values": ["A Inc.", "C Ltd."]}, | ||
{"tag": "Variant", "values": ["SysA", "SysB"]}], "content": "This is a requirement towards my Weather Station. The Weather Station shall be able to measure the temperature.", "derived to": "REQ_SensorA1", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS2", "status": "new", "derived from": null, "content": "This is another requirement. The Weather Station housing shall be blue.", "derived to": "not yet derived", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS3", "status": "aligned", "derived from": null, "content": "The Weather Station shall display the measured temperature so that it is conveniently readable by a human looking at it in a distance of up to 3m.", "derived to": "not yet derived", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS4", "status": "aligned", "derived from": null, "content": "It shall be possible to switch the unit of the displayed temperature between degree Celsius and Fahrenheit.", "derived to": "not yet derived", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS5", "status": "aligned", "derived from": null, "content": "The unit in which the temperature is displayed shall stay as it is even after the batteries and/or the power supply has been removed.", "derived to": "not yet derived", "in file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_SensorA1", "status": "aligned", "derived from": "REQ_WS1", "content": "The sensor shall be able to measure the temperature of the surrounding air in the room.", "derived to": "not yet derived", "in file": "./tempSensorA/req.yaml"}]} | ||
!$allreqs = {"reqsrepopath": ".", "reqsrepofile": "./reqsrepo_json.puml", "reqs": [{"type": "Requirement", "alias": "REQ_WS1", "status": "decided", "derived_from": null, "taggedvalues": [{"tag": "Vendor", "values": ["A Inc.", "C Ltd."]}, | ||
{"tag": "Variant", "values": ["SysA", "SysB"]}], "content": "This is a requirement towards my Weather Station. The Weather Station shall be able to measure the temperature.", "derived_to": "REQ_SensorA1", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS2", "status": "new", "derived_from": null, "content": "This is another requirement. The Weather Station housing shall be blue.", "derived_to": "not yet derived", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS3", "status": "aligned", "derived_from": null, "content": "The Weather Station shall display the measured temperature so that it is conveniently readable by a human looking at it in a distance of up to 3m.", "derived_to": "not yet derived", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS4", "status": "aligned", "derived_from": null, "content": "It shall be possible to switch the unit of the displayed temperature between degree Celsius and Fahrenheit.", "derived_to": "not yet derived", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_WS5", "status": "aligned", "derived_from": null, "content": "The unit in which the temperature is displayed shall stay as it is even after the batteries and/or the power supply has been removed.", "derived_to": "not yet derived", "in_file": "./req.yaml"}, | ||
{"type": "Requirement", "alias": "REQ_SensorA1", "status": "aligned", "derived_from": "REQ_WS1", "content": "The sensor shall be able to measure the temperature of the surrounding air in the room.", "derived_to": "not yet derived", "in_file": "./tempSensorA/req.yaml"}]} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters