Overview Schemas Index

Specification_document_arm (jsdai.SSpecification_document_arm)


FUNCTION get_document_definition
          (input : documented_element_select; role : STRING; type_name : STRING) : SET [0:?] OF Document_definition;

LOCAL
      dd : SET[0:?] OF  Document_definition := [];  --this gives us access TO  the information base
      da : SET[0:?] OF Document_assignment :=[];
    END_LOCAL;
    da := bag_to_set(QUERY(dr <* USEDIN (input, 'DOCUMENT_ASSIGNMENT_ARM.'+
            'DOCUMENT_ASSIGNMENT.IS_ASSIGNED_TO') | (dr.role = role)));
    -- iterate over da
    REPEAT i := 1 TO SIZEOF(da) BY 1;
      IF(type_name IN TYPEOF (da[i].assigned_document))THEN
        dd := dd + da[i].assigned_document;
      END_IF;
    END_REPEAT;
    RETURN(dd);

END_FUNCTION; -- get_document_definition

public class FGet_document_definition
          public static Value run(SdaiContext _context, Value input, Value role, Value type_name)