Template:— assigning_approval_person_organization (asg_apr_pers_org)
Capability: assigning_approvals
Date: 2007/06/21 20:30:31
Revision: 1.3
Template: assigning_approval_person_organization

Path

-- Instantiate an Approval_assignment
Approval_assignment

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

-- Set the Approval_assignment attribute role
^apr_asg.role = '/IGNORE'

-- Set the type of Approval_assignment
/assigning_reference_data(
    items= ^apr.asg,
    class_name=@apr_asg_role_class_name,
    ecl_id=@apr_asg_role_ecl_id)/

-- Assign the Approval_assignment to the
-- to the instances passed into the template through the @items
-- input parameter (e.g. a Part_version)
^apr_asg.items -> @items

-- Instantiate Approval and point at it
^apr_asg.assigned_approval -> Approval

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

-- Set the Approval attributes
^apr.purpose = '/IGNORE'

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

-- Instantiate Approval_status and point at it
^apr.status -> ^apr_stat

-- Set the Approval_status attributes
^apr_stat.status_name = '/IGNORE'

-- Set the status
/assigning_reference_data(
    items= ^apr.stat,
    class_name=@apr_stat_class_name,
    ecl_id=@apr_stat_ecl_id)/

-- 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%

-- Instantiate an Approving_person_organization and point at it
^app_pers_org.authorized_approval -> ^apr

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

-- Set the role of person/organization
/assigning_reference_data(
    items= ^app_pers_org,
    class_name=@pers_org_role_class_name,
    ecl_id=@pers_org_role_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Approval_assignment.role '/IGNORE'
Approval.purpose '/IGNORE'
Approval_status.status_name '/IGNORE'
Approving_person_organization.role '/IGNORE'

XML representation of path

<refpath
   template="assigning_approval_person_organization">
   <comment>
      Instantiate an Approval_assignment
   </comment>
   <instantiate
      entity="Approval_assignment">
      
   </instantiate>
   <comment>
      The parameter is a reference parameter so the Approval_assignment
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="apr_asg">
      <express_entity
         entity="Approval_assignment">
         
      </express_entity>
   </bind>
   <comment>
      Set the Approval_assignment attribute role
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <bound_parameter
            name="apr_asg.role">
            
         </bound_parameter>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Set the type of Approval_assignment
   </comment>
   <call_template
      name="assigning_reference_data">
      <param_in
         name="items"
         value=" ^apr.asg">
         
      </param_in>
      <param_in
         name="class_name"
         value="@apr_asg_role_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@apr_asg_role_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Assign the Approval_assignment to the
   </comment>
   <comment>
      to the instances passed into the template through the @items
   </comment>
   <comment>
      input parameter (e.g. a Part_version)
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="apr_asg.items">
            
         </bound_parameter>
      </target>
      <source>
         <param_in_ref
            name="items">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Instantiate Approval and point at it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="apr_asg.assigned_approval">
            
         </bound_parameter>
      </target>
      <source>
         <express_entity
            entity="Approval">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Bind the Approval to the parameter ^apr.
   </comment>
   <comment>
      The parameter is a reference parameter so the Approval
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="apr">
      <express_entity
         entity="Approval">
         
      </express_entity>
   </bind>
   <comment>
      Set the Approval attributes
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <bound_parameter
            name="apr.purpose">
            
         </bound_parameter>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Bind the Approval_status to the parameter ^apr_stat.
   </comment>
   <comment>
      The parameter is a reference parameter so the Approval_status
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="apr_stat">
      <express_entity
         entity="Approval_status">
         
      </express_entity>
   </bind>
   <comment>
      Instantiate Approval_status and point at it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="apr.status">
            
         </bound_parameter>
      </target>
      <source>
         <bound_parameter
            name="apr_stat">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Set the Approval_status attributes
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <bound_parameter
            name="apr_stat.status_name">
            
         </bound_parameter>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Set the status
   </comment>
   <call_template
      name="assigning_reference_data">
      <param_in
         name="items"
         value=" ^apr.stat">
         
      </param_in>
      <param_in
         name="class_name"
         value="@apr_stat_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@apr_stat_ecl_id">
         
      </param_in>
   </call_template>
   <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>
      Instantiate an Approving_person_organization and point at it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="app_pers_org.authorized_approval">
            
         </bound_parameter>
      </target>
      <source>
         <bound_parameter
            name="apr">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Set the Approving_person_organization attributes
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <bound_parameter
            name="app_pers_org.role">
            
         </bound_parameter>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Set the role of person/organization
   </comment>
   <call_template
      name="assigning_reference_data">
      <param_in
         name="items"
         value=" ^app_pers_org">
         
      </param_in>
      <param_in
         name="class_name"
         value="@pers_org_role_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@pers_org_role_ecl_id">
         
      </param_in>
   </call_template>
</refpath>