Skip to content

Commit

Permalink
Add in support to report events that have the crtical defintion
Browse files Browse the repository at this point in the history
  • Loading branch information
gregarnot committed Aug 16, 2023
1 parent 14b1ada commit e3e5762
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 9 deletions.
6 changes: 0 additions & 6 deletions models/AEOrdering/.project
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.xtuml.bp.core.xtumlnature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.xtuml.bp.mc.masl.MCNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ applicationName : string;
sequenceStart : boolean;
sequenceEnd : boolean;
isBreak : boolean;
critical : boolean;
emptyPreviousEventTypes : sequence of PreviousEventType;
previousEventTypes : sequence of PreviousEventType;
previousEventName : string;
Expand Down Expand Up @@ -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"]);
Expand All @@ -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 := "";
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e3e5762

Please sign in to comment.