RULE unique_shape_aspect_constraint FOR (product_definition_shape, shape_aspect); LOCAL bsa : BAG OF shape_aspect := []; pass : BOOLEAN := TRUE; END_LOCAL; REPEAT i := 1 TO SIZEOF (product_definition_shape) WHILE pass; bsa := QUERY(sa <* USEDIN(product_definition_shape[i], 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.' + 'SHAPE_ASPECT.' + 'OF_SHAPE') | sa\shape_aspect.name <> ''); IF (SIZEOF(bag_to_set(bsa)) <> SIZEOF(bsa)) THEN pass := FALSE; END_IF; END_REPEAT; WHERE wr1: pass; END_RULE; -- unique_shape_aspect_constraint |
public class RUnique_shape_aspect_constraint public int rWr1(SdaiContext _context) public int run(SdaiContext _context, A_string violations) |