RULE restrict_product_definition_substitute FOR (product_definition_substitute); WHERE wr1: SIZEOF ( QUERY ( pds <* product_definition_substitute | (SIZEOF ( USEDIN ( pds , 'CATALOG_DATA_INFORMATION_MIM' + '.APPLIED_EFFECTIVITY_ASSIGNMENT.ITEMS' ) ) =0 ) ) ) =0; wr2: SIZEOF ( QUERY ( pds <* product_definition_substitute | pds.substitute_definition.frame_of_reference.name <> 'part occurrence' ) ) =0; wr3: SIZEOF ( QUERY ( pds <* product_definition_substitute | ( ( 'CATALOG_DATA_INFORMATION_MIM' + '.ASSEMBLY_COMPONENT_USAGE' IN TYPEOF ( pds.context_relationship ) ) AND ( SIZEOF (USEDIN ( pds.context_relationship , 'CATALOG_DATA_INFORMATION_MIM' + '.PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE_USAGE' ) ) =0 ) ) AND (( 'CATALOG_DATA_INFORMATION_MIM' + '.PRODUCT_DEFINITION_RELATIONSHIP' IN TYPEOF ( pds.context_relationship ) ) AND ( pds.context_relationship.related_product_definition.frame_of_reference.name <> 'part occurrence' ) ) ) ) =0; END_RULE; -- restrict_product_definition_substitute |
public class RRestrict_product_definition_substitute public int rWr3(SdaiContext _context) public int rWr2(SdaiContext _context) public int rWr1(SdaiContext _context) public int run(SdaiContext _context, A_string violations) |