Template:— assigning_approval (asg_apr)
Capability: assigning_approvals
Date: 2007/06/22 11:00:41
Revision: 1.10
Template: assigning_approval

Path

-- Instantiate an Approval_assignment
Approval_assignment

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

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

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

-- Instantiate Approval and point at it
Approval_assignment.assigned_approval -> Approval

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

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

-- Instantiate Approval_status and point at it
Approval.status -> Approval_status

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

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

-- Set the status
/assigning_reference_data(
    items=Approval_status,
    class_name=@status,
    ecl_id=@status_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'

XML representation of path

<refpath
   template="assigning_approval">
   <comment>
      Instantiate an Approval_assignment
   </comment>
   <instantiate
      entity="Approval_assignment">
      
   </instantiate>
   <comment>
      Bind the Approval_assignment to the parameter ^approval_assgn.
   </comment>
   <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="approval_assgn">
      <express_entity
         entity="Approval_assignment">
         
      </express_entity>
   </bind>
   <comment>
      Set the Approval_assignment attribute role
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <express_attribute
            entity="Approval_assignment"
            attribute="role">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <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>
         <express_attribute
            entity="Approval_assignment"
            attribute="items">
            
         </express_attribute>
      </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>
         <express_attribute
            entity="Approval_assignment"
            attribute="assigned_approval">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Approval">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Bind the Approval to the parameter ^approval.
   </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="approval">
      <express_entity
         entity="Approval">
         
      </express_entity>
   </bind>
   <comment>
      Set the Approval attributes
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <express_attribute
            entity="Approval"
            attribute="purpose">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Instantiate Approval_status and point at it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Approval"
            attribute="status">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Approval_status">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Bind the Approval_status to the parameter ^approval_status.
   </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="approval_status">
      <express_entity
         entity="Approval_status">
         
      </express_entity>
   </bind>
   <comment>
      Set the Approval_status attributes
   </comment>
   <assign
      assignment_type="equals">
      <target>
         <express_attribute
            entity="Approval_status"
            attribute="status_name">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Set the status
   </comment>
   <call_template
      name="assigning_reference_data">
      <param_in
         name="items"
         value="Approval_status">
         
      </param_in>
      <param_in
         name="class_name"
         value="@status">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@status_ecl_id">
         
      </param_in>
   </call_template>
</refpath>