Template:— assigning_approval (asg_apr) Date: 2010/03/14 16:32:08
Revision: 1.28
Template: assigning_approval

XML references to the Template

These can be cut and pasted into the XML as required.

assigning_approval

Set up a hyperlink to the template definition.
<template_ref name="assigning_approval" capability="assigning_approvals"/>

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_approval" capability="assigning_approvals">
  <param name="status">
    <param_value>State_of_approval</param_value>
    <description></description>
  </param>
  <param name="status_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="items">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="person_org">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_approval">
  <param_in name="status" value="State_of_approval"/>
  <param_in name="status_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="items" value=""/>
  <param_in name="person_org" value=""/>
</template_example>

assigning_approval
/assigning_approval(status='State_of_approval', status_ecl_id='urn:plcs:rdl:std', items='', person_org='')/

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
-- instances passed into the template through the @items
-- input parameter (e.g. a Part_version)
Approval_assignment.items -> @items

-- Instantiate Approval and assign Approval_assignment to it
Approval
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 assign Approval to it
-- NB This mechanism is not used to represent an approval status
Approval_status
Approval.status -> Approval_status

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

-- Set the approval status using assigning_asserted_state
/assigning_asserted_state(
    assigned_to=^approval,
    state_class_name=@status,
    state_ecl_id=@status_ecl_id)/

-- Instantiate an Approving_person_organization and
-- assign it to Approval
Approving_person_organization
Approving_person_organization.authorized_approval -> ^approval

-- Bind the Approving_person_organization to the parameter ^app_pers_org.
-- This parameter is a reference parameter that allows the
-- Approving_person_organization entity to be referred to when this template is used.
%^app_pers_org = Approving_person_organization%

-- Assign the Approving_person_organization to the
-- to the instances passed into the template through the @person_org
-- input parameter (e.g. a Person_in_organization)
Approving_person_organization.person_organization -> @person_org

-- Bind the State_observed to the parameter ^state_obs.
-- This parameter is a reference parameter that allows the
-- State_observed entity to be referred to when this template is used.
%^state_obs = $assigning_asserted_state.state_obs%

-- Bind the State_assertion to the parameter ^state_assert.
-- This parameter is a reference parameter that allows the
-- State_assertion entity to be referred to when this template is used.
%^state_assert = $assigning_asserted_state.state_assert%

-- Bind the State_definition to the parameter ^state_def.
-- This parameter is a reference parameter that allows the
-- State_definition entity to be referred to when this template is used.
%^state_def = $assigning_asserted_state.state_def%
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"
      context="">
      
   </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"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Set the Approval_assignment attribute role
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Approval_assignment"
            attribute="role"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Assign the Approval_assignment to the
   </comment>
   <comment>
      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"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="items">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Instantiate Approval and assign Approval_assignment to it
   </comment>
   <instantiate
      entity="Approval"
      context="">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Approval_assignment"
            attribute="assigned_approval"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Approval"
            context="">
            
         </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"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Set the Approval attributes
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Approval"
            attribute="purpose"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Instantiate Approval_status and assign Approval to it
   </comment>
   <comment>
      NB This mechanism is not used to represent an approval status
   </comment>
   <instantiate
      entity="Approval_status"
      context="">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Approval"
            attribute="status"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Approval_status"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Set the Approval_status attribute
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Approval_status"
            attribute="status_name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Set the approval status using assigning_asserted_state
   </comment>
   <call_template
      name="assigning_asserted_state"
      business_context="">
      <param_in
         name="assigned_to"
         value="^approval">
         
      </param_in>
      <param_in
         name="state_class_name"
         value="@status">
         
      </param_in>
      <param_in
         name="state_ecl_id"
         value="@status_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Instantiate an Approving_person_organization and
   </comment>
   <comment>
      assign it to Approval
   </comment>
   <instantiate
      entity="Approving_person_organization"
      context="">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Approving_person_organization"
            attribute="authorized_approval"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="approval">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Bind the Approving_person_organization to the parameter ^app_pers_org.
   </comment>
   <comment>
      This parameter is a reference parameter that allows the
   </comment>
   <comment>
      Approving_person_organization entity to be referred to when this template is used.
   </comment>
   <bind
      parameter="app_pers_org">
      <express_entity
         entity="Approving_person_organization"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Assign the Approving_person_organization to the
   </comment>
   <comment>
      to the instances passed into the template through the @person_org
   </comment>
   <comment>
      input parameter (e.g. a Person_in_organization)
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Approving_person_organization"
            attribute="person_organization"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="person_org">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Bind the State_observed to the parameter ^state_obs.
   </comment>
   <comment>
      This parameter is a reference parameter that allows the
   </comment>
   <comment>
      State_observed entity to be referred to when this template is used.
   </comment>
   <bind
      parameter="state_obs">
      <template_instance
         template="assigning_asserted_state"
         parameter="state_obs">
         
      </template_instance>
   </bind>
   <comment>
      Bind the State_assertion to the parameter ^state_assert.
   </comment>
   <comment>
      This parameter is a reference parameter that allows the
   </comment>
   <comment>
      State_assertion entity to be referred to when this template is used.
   </comment>
   <bind
      parameter="state_assert">
      <template_instance
         template="assigning_asserted_state"
         parameter="state_assert">
         
      </template_instance>
   </bind>
   <comment>
      Bind the State_definition to the parameter ^state_def.
   </comment>
   <comment>
      This parameter is a reference parameter that allows the
   </comment>
   <comment>
      State_definition entity to be referred to when this template is used.
   </comment>
   <bind
      parameter="state_def">
      <template_instance
         template="assigning_asserted_state"
         parameter="state_def">
         
      </template_instance>
   </bind>
</refpath>

© OASIS 2010 — All rights reserved