acyclic_organization_relationship

EXPRESS specification:

FUNCTION acyclic_organization_relationship
(* Modified for LPM/6 *)(relation : organization_relationship; relatives : SET [1:?] OF organization; specific_relation : STRING) : BOOLEAN; LOCAL x : SET OF organization_relationship; END_LOCAL; IF relation.relating_organization IN relatives THEN RETURN (FALSE); END_IF; x := QUERY (org <* bag_to_set (USEDIN (relation.relating_organization, 'STRUCTURAL_FRAME_SCHEMA.' + 'ORGANIZATION_RELATIONSHIP.' + 'RELATED_ORGANIZATION')) | specific_relation IN TYPEOF (org)); REPEAT i := 1 TO HIINDEX(x); IF NOT acyclic_organization_relationship (x[i], relatives + relation.relating_organization, specific_relation) THEN RETURN(FALSE); END_IF; END_REPEAT; RETURN(TRUE);
END_FUNCTION;