RULE security_classification_date_string_restriction

(* SCHEMA step_merged_ap_schema; *)
-- IN AP232
RULE security_classification_date_string_restriction FOR (applied_security_classification_assignment );
   LOCAL
      asca : SET OF applied_security_classification_assignment;
      tresult : BOOLEAN;
      ada : BAG OF applied_date_assignment;
      adta : BAG OF applied_date_and_time_assignment;
      result : BOOLEAN := TRUE;
   END_LOCAL;
      asca := applied_security_classification_assignment;
      REPEAT i := 1 TO SIZEOF(asca) BY 1;
         adta := USEDIN(asca[i], 'STEP_MERGED_AP_SCHEMA.' + 'APPLIED_DATE_AND_TIME_ASSIGNMENT.ITEMS');
         tresult := FALSE;
         REPEAT j := 1 TO SIZEOF(adta) BY 1;
            REPEAT k := 1 TO SIZEOF(adta[j].items) BY 1;
               IF adta[j].items[k] = asca[i] THEN
                  IF EXISTS(adta[j]\date_and_time_assignment.role) THEN
                     IF adta[j]\date_and_time_assignment.role.name = 'classification date' THEN
                        tresult := TRUE;
                     END_IF;
                  END_IF;
                  result := result AND tresult;
               END_IF;
            END_REPEAT;
         END_REPEAT;
         ada := USEDIN(asca[i], 'STEP_MERGED_AP_SCHEMA.' + 'APPLIED_DATE_ASSIGNMENT.ITEMS');
         REPEAT j := 1 TO SIZEOF(ada) BY 1;
            REPEAT k := 1 TO SIZEOF(ada[j].items) BY 1;
               IF ada[j].items[k] = asca[i] THEN
                  IF EXISTS(ada[j]\date_assignment.role) THEN
                     IF ada[j]\date_assignment.role.name = 'classification date' THEN
                        tresult := TRUE;
                     END_IF;
                  END_IF;
                  result := result AND tresult;
               END_IF;
            END_REPEAT;
         END_REPEAT;
      END_REPEAT;
   WHERE
      wr1:
         result;
END_RULE;

[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2020-07-28T17:02:20-04:00