Template:— assigning_approving_person (asg_apr_pers)
Capability: assigning_approvals
Date: 2007/06/22 12:28:03
Revision: 1.8
Template: assigning_approving_person

Path

-- Instantiate an Approving_person_organization
Approving_person_organization

-- Bind the Approving_person_organization to the parameter ^app_pers_org.
-- The parameter is a reference parameter so the Approving_person_organization
-- entity can be referred to when this template is used.
%^app_pers_org = Approving_person_organization%

-- Set the Approving_person_organization attributes
Approving_person_organization.role = '/IGNORE'

-- Assign the Approving_person_organization to the
-- Approval entity passed into the template through
-- the @authorized_approval input parameter
Approving_person_organization.authorized_approval -> @authorized_approval

-- Instantiate Person_in_organization and point at it
Approving_person_organization.person_organization -> Person_in_organization

-- Bind the Person_in_organization to the parameter ^pers_in_org.
-- The parameter is a reference parameter so the Person_in_organization
-- entity can be referred to when this template is used.
%^pers_in_org = Person_in_organization%

-- Set the Person_in_organization attribute role
Person_in_organization.role = '/IGNORE'

-- Instantiate Person and point at it
Person_in_organization.concerned_person -> Person

-- Set the Person attributes
Person.last_name -> @last_name
Person.first_name -> @first_name
Person.middle_names -> @middle_names
Person.prefix_titles -> @prefix_titles
Person.suffix_titles -> @suffix_titles

-- Instantiate Organization and point at it
Person_in_organization.containing_organization -> Organization

-- Bind the Organization to the parameter ^organization.
-- The parameter is a reference parameter so the Organization
-- entity can be referred to when this template is used.
%^organization = Organization%

-- Identify the Organization
/assigning_identification_with_no_organization(
    items=^organization,
    id=@org_id,
    id_class_name=@org_id_class_name,
    id_ecl_id=@org_id_ecl_id)/

-- Set the Organization attributes
Organization.name = '/IGNORE'
Organization.id = '/IGNORE'
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Approving_person_organization.role '/IGNORE'
Person_in_organization.role '/IGNORE'
Organization.name '/IGNORE'
Organization.id '/IGNORE'

XML representation of path

<refpath
   template="assigning_approving_person">
   <comment>
      Instantiate an Approving_person_organization
   </comment>
   <instantiate
      entity="Approving_person_organization">
      
   </instantiate>
   <comment>
      Bind the Approving_person_organization to the parameter ^app_pers_org.
   </comment>
   <comment>
      The parameter is a reference parameter so the Approving_person_organization
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="app_pers_org">
      <express_entity
         entity="Approving_person_organization">
         
      </express_entity>
   </bind>
   <comment>
      Set the Approving_person_organization attributes
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <express_attribute
            entity="Approving_person_organization"
            attribute="role">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Assign the Approving_person_organization to the
   </comment>
   <comment>
      Approval entity passed into the template through
   </comment>
   <comment>
      the @authorized_approval input parameter
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Approving_person_organization"
            attribute="authorized_approval">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="authorized_approval">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Instantiate Person_in_organization and point at it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Approving_person_organization"
            attribute="person_organization">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Person_in_organization">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Bind the Person_in_organization to the parameter ^pers_in_org.
   </comment>
   <comment>
      The parameter is a reference parameter so the Person_in_organization
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="pers_in_org">
      <express_entity
         entity="Person_in_organization">
         
      </express_entity>
   </bind>
   <comment>
      Set the Person_in_organization attribute role
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <express_attribute
            entity="Person_in_organization"
            attribute="role">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Instantiate Person and point at it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Person_in_organization"
            attribute="concerned_person">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Person">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Set the Person attributes
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Person"
            attribute="last_name">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="last_name">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Person"
            attribute="first_name">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="first_name">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Person"
            attribute="middle_names">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="middle_names">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Person"
            attribute="prefix_titles">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="prefix_titles">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Person"
            attribute="suffix_titles">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="suffix_titles">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Instantiate Organization and point at it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Person_in_organization"
            attribute="containing_organization">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Organization">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Bind the Organization to the parameter ^organization.
   </comment>
   <comment>
      The parameter is a reference parameter so the Organization
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="organization">
      <express_entity
         entity="Organization">
         
      </express_entity>
   </bind>
   <comment>
      Identify the Organization
   </comment>
   <call_template
      name="assigning_identification_with_no_organization">
      <param_in
         name="items"
         value="^organization">
         
      </param_in>
      <param_in
         name="id"
         value="@org_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@org_id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@org_id_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Set the Organization attributes
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <express_attribute
            entity="Organization"
            attribute="name">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals">
      <target>
         <express_attribute
            entity="Organization"
            attribute="id">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
</refpath>