From e3e576232b9ace0f85160ca1325a60dd4cc8bb18 Mon Sep 17 00:00:00 2001 From: gregarnot Date: Wed, 16 Aug 2023 14:15:39 +0100 Subject: [PATCH] Add in support to report events that have the crtical defintion --- models/AEOrdering/.project | 6 ------ .../AuditEventType/AuditEventType.xtuml | 18 ++++++++++++++++++ .../AEOrdering/AEOclasses/JobType/JobType.masl | 11 +++++++++-- .../AEOclasses/SystemSpec/SystemSpec.masl | 2 +- .../AEOrdering/AEOdomain/Shared/Shared.xtuml | 8 ++++++++ 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/models/AEOrdering/.project b/models/AEOrdering/.project index 3f47c19c..2a7a8520 100644 --- a/models/AEOrdering/.project +++ b/models/AEOrdering/.project @@ -10,15 +10,9 @@ - - org.eclipse.xtext.ui.shared.xtextBuilder - - - org.xtuml.bp.core.xtumlnature - org.eclipse.xtext.ui.shared.xtextNature org.xtuml.bp.mc.masl.MCNature diff --git a/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/AuditEventType/AuditEventType.xtuml b/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/AuditEventType/AuditEventType.xtuml index 7d342e5a..7df5a8e5 100644 --- a/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/AuditEventType/AuditEventType.xtuml +++ b/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/AuditEventType/AuditEventType.xtuml @@ -342,6 +342,24 @@ INSERT INTO O_ATTR "937e7b24-4016-44da-abc5-a7bf3c67b00c", '', ''); +INSERT INTO O_NBATTR + VALUES ("5fb45b45-a66d-4ca6-9930-66c6d2bf79c2", + "387c8f68-277a-4047-a914-04ba096d94dd"); +INSERT INTO O_BATTR + VALUES ("5fb45b45-a66d-4ca6-9930-66c6d2bf79c2", + "387c8f68-277a-4047-a914-04ba096d94dd"); +INSERT INTO O_ATTR + VALUES ("5fb45b45-a66d-4ca6-9930-66c6d2bf79c2", + "387c8f68-277a-4047-a914-04ba096d94dd", + "8307fce7-f9c9-4f80-81dc-eaf322d71924", + 'critical', + '', + '', + 'critical', + 0, + "937e7b24-4016-44da-abc5-a7bf3c67b00c", + '', + ''); INSERT INTO O_ID VALUES (0, "387c8f68-277a-4047-a914-04ba096d94dd"); diff --git a/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/JobType/JobType.masl b/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/JobType/JobType.masl index ba5cd131..93a6cbe9 100644 --- a/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/JobType/JobType.masl +++ b/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/JobType/JobType.masl @@ -14,6 +14,7 @@ applicationName : string; sequenceStart : boolean; sequenceEnd : boolean; isBreak : boolean; +critical : boolean; emptyPreviousEventTypes : sequence of PreviousEventType; previousEventTypes : sequence of PreviousEventType; previousEventName : string; @@ -44,6 +45,7 @@ begin sequenceEnd := false; isBreak := false; hasDynamicControl := false; + critical := false; previousEventTypes := emptyPreviousEventTypes; eventDefJSONObject := JSON::get_object(eventTypeJSONElement); eventTypeName := JSON::get_string(eventDefJSONObject["EventName"]); @@ -59,6 +61,9 @@ begin if eventDefJSONObject'contains("IsBreak") then isBreak := JSON::get_boolean(eventDefJSONObject["IsBreak"]); end if; + if eventDefJSONObject'contains("Critical") then + critical := JSON::get_boolean(eventDefJSONObject["Critical"]); + end if; if eventDefJSONObject'contains("PreviousEvents") and eventDefJSONObject["PreviousEvents"].kind = JSON::Array then for prevEventTypeJSONElement in JSON::get_array(eventDefJSONObject["PreviousEvents"]) loop previousEventName := ""; @@ -88,7 +93,8 @@ begin isSequenceStart => sequenceStart, isSequenceEnd => sequenceEnd, staleAuditEventDuration => this.staleAuditEventDuration, blockedAuditEventDuration => this.blockedAuditEventDuration, - previousEventTypes => previousEventTypes, isBreak => isBreak, isSequenced => true); + previousEventTypes => previousEventTypes, isBreak => isBreak, + critical => critical, isSequenced => true); link eventType R6 application; link eventType R12 this; else @@ -199,7 +205,8 @@ begin isSequenceStart => sequenceStart, isSequenceEnd => sequenceEnd, staleAuditEventDuration => this.staleAuditEventDuration, blockedAuditEventDuration => this.blockedAuditEventDuration, - previousEventTypes => previousEventTypes, isBreak => isBreak, isSequenced => false); + previousEventTypes => previousEventTypes, isBreak => isBreak, + critical => false, isSequenced => false); link eventType R6 application; link eventType R12 this; end if; diff --git a/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/SystemSpec/SystemSpec.masl b/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/SystemSpec/SystemSpec.masl index afd3ea43..0e890ac0 100644 --- a/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/SystemSpec/SystemSpec.masl +++ b/models/AEOrdering/models/AEOrdering/AEOdomain/AEOrdering/AEOclasses/SystemSpec/SystemSpec.masl @@ -293,7 +293,7 @@ begin for auditEventType in (job -> R12.AuditEventType() ordered_by (auditEventTypeId)) loop eventDefinitions := eventDefinitions & (auditEventType.sequenceName, auditEventType.eventType, auditEventType.occurrenceId, auditEventType.previousEventTypes, auditEventType.isSequenceStart, auditEventType.isSequenceEnd, - auditEventType.isBreak, auditEventType.isSequenced); + auditEventType.isBreak, auditEventType.isSequenced, auditEventType.critical); end loop; Req_IF_Verification~>jobDefinition(job.jobTypeName, eventDefinitions); // report any dynamic controls diff --git a/models/AEOrdering/models/AEOrdering/AEOdomain/Shared/Shared.xtuml b/models/AEOrdering/models/AEOrdering/AEOdomain/Shared/Shared.xtuml index c28fffa6..fd27a642 100644 --- a/models/AEOrdering/models/AEOrdering/AEOdomain/Shared/Shared.xtuml +++ b/models/AEOrdering/models/AEOrdering/AEOdomain/Shared/Shared.xtuml @@ -1138,6 +1138,14 @@ INSERT INTO S_MBR "937e7b24-4016-44da-abc5-a7bf3c67b00c", "6218b11e-e7e5-4346-8396-8f655e31ca9d", ''); +INSERT INTO S_MBR + VALUES ("0d5120e8-9a92-47b9-ac50-04c057084be6", + 'critical', + '', + "2ad0c5b9-f515-4c1b-9afb-f283927665c0", + "937e7b24-4016-44da-abc5-a7bf3c67b00c", + "82573ab5-c45f-4f53-a2e9-3da384a9595c", + ''); INSERT INTO PE_PE VALUES ("2ad0c5b9-f515-4c1b-9afb-f283927665c0", 1,