RULE restrict_approval

(* SCHEMA step_merged_ap_schema; *)
-- IN AP214
RULE restrict_approval FOR (approval, approval_date_time );
   WHERE
      wr1:
         SIZEOF(QUERY (a <* approval| (SIZEOF(USEDIN(a, 'STEP_MERGED_AP_SCHEMA.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, 'STEP_MERGED_AP_SCHEMA.APPROVAL_DATE_TIME.DATED_APPROVAL')| (adt.role.name = 'actual'))) > 1))) = 0;
      wr4:
         SIZEOF(QUERY (a <* approval| (SIZEOF(QUERY (adt <* USEDIN(a, 'STEP_MERGED_AP_SCHEMA.APPROVAL_DATE_TIME.DATED_APPROVAL')| (adt.role.name = 'planned'))) > 1))) = 0;
END_RULE;

[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-09-06T14:00:33-04:00