RULE release_authentication_string_restriction

(* SCHEMA step_merged_ap_schema; *)
-- IN AP232
RULE release_authentication_string_restriction FOR (approval );
   LOCAL
      ar : STRING := 'release authentication';
      result1 : BOOLEAN := TRUE;
      result2 : BOOLEAN := TRUE;
      found : BOOLEAN;
      aaa : BAG OF applied_approval_assignment;
      adt : BAG OF approval_date_time;
      appr : SET OF approval;
      apo : BAG OF approval_person_organization;
   END_LOCAL;
      appr := approval;
      REPEAT i := 1 TO SIZEOF(appr) BY 1;
         aaa := USEDIN(appr[i], 'STEP_MERGED_AP_SCHEMA.' + 'APPROVAL_ASSIGNMENT.ASSIGNED_APPROVAL');
         found := FALSE;
         REPEAT j := 1 TO SIZEOF(aaa) BY 1;
            IF EXISTS(aaa[j]\approval_assignment.role) THEN
               IF aaa[j].role.name = ar THEN
                  found := TRUE;
               END_IF;
            END_IF;
         END_REPEAT;
         IF found THEN
            apo := USEDIN(appr[i], 'STEP_MERGED_AP_SCHEMA.' + 'APPROVAL_PERSON_ORGANIZATION.AUTHORIZED_APPROVAL');
            found := FALSE;
            REPEAT j := 1 TO SIZEOF(apo) BY 1;
               IF EXISTS(apo[j].role) THEN
                  IF apo[j].role.role = ar THEN
                     found := TRUE;
                  END_IF;
               END_IF;
            END_REPEAT;
            IF NOT found THEN
               result1 := FALSE;
            END_IF;
            adt := USEDIN(appr[i], 'STEP_MERGED_AP_SCHEMA.' + 'APPROVAL_DATE_TIME.DATED_APPROVAL');
            found := FALSE;
            REPEAT j := 1 TO SIZEOF(adt) BY 1;
               IF EXISTS(adt[j].role) THEN
                  IF adt[j].role.name = ar THEN
                     found := TRUE;
                  END_IF;
               END_IF;
            END_REPEAT;
            IF NOT found THEN
               result2 := FALSE;
            END_IF;
         END_IF;
      END_REPEAT;
   WHERE
      wr1:
         result1;
      wr2:
         result2;
END_RULE;

[Top Level Definitions] [Exit]

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