|
RULE restrict_approval FOR (approval, approval_date_time); WHERE wr1: SIZEOF ( QUERY ( a <* approval | SIZEOF ( USEDIN ( a , 'catalog_data_information_mim' + '.approval_date_time.dated_approval' ) ) > 2 ) ) = 0 ; wr2: SIZEOF ( QUERY ( adt <* approval_date_time | ( NOT EXISTS ( adt . role ) ) OR ( NOT ( adt . role . name IN [ 'actual' , 'planned' ] ) ) ) ) = 0 ; wr3: SIZEOF ( QUERY ( a <* approval | SIZEOF ( QUERY ( adt <* USEDIN ( a , 'catalog_data_information_mim' + '.approval_date_time.dated_approval' ) | adt . role . name = 'actual' ) ) > 1 ) ) = 0 ; wr4: SIZEOF ( QUERY ( a <* approval | SIZEOF ( QUERY ( adt <* USEDIN ( a , 'catalog_data_information_mim' + '.approval_date_time.dated_approval' ) | adt . role . name = 'planned' ) ) > 1 ) ) = 0 ; END_RULE; -- restrict_approval |
|
public class RRestrict_approval public int rWr4(SdaiContext _context) public int rWr3(SdaiContext _context) public int rWr2(SdaiContext _context) public int rWr1(SdaiContext _context) public int run(SdaiContext _context, A_string violations) |