RULE data_definition_exchange_restrict_to_one_presentation

(* SCHEMA step_merged_ap_schema; *)
-- IN AP232
RULE data_definition_exchange_restrict_to_one_presentation FOR (product_related_product_category );
   LOCAL
      prds : SET OF product := [];
      prpc : SET OF product_related_product_category;
      pdf : BAG OF product_definition_formation;
      result : BOOLEAN := TRUE;
   END_LOCAL;
      prpc := product_related_product_category;
      REPEAT i := 1 TO SIZEOF(prpc) BY 1;
         IF prpc[i]\product_category.name = 'data definition exchange' THEN
            prds := prds + prpc[i].products;
         END_IF;
      END_REPEAT;
      REPEAT i := 1 TO SIZEOF(prds) BY 1;
         pdf := USEDIN(prds[i], 'STEP_MERGED_AP_SCHEMA.' + 'PRODUCT_DEFINITION_FORMATION.OF_PRODUCT');
         REPEAT j := 1 TO SIZEOF(pdf) BY 1;
            IF SIZEOF(USEDIN(pdf[j], 'STEP_MERGED_AP_SCHEMA.' + 'APPLIED_PRESENTED_ITEM.ITEMS')) > 1 THEN
               result := FALSE;
            END_IF;
         END_REPEAT;
      END_REPEAT;
   WHERE
      wr1:
         result;
END_RULE;

[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2017-01-19T11:17:24-05:00