Template:— assigned_person (asgd_pers)
Context:— UK_Defence
Date: 2009/04/17 10:23:02
Revision: 1.2
Template: assigned_person

XML references to the Template

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

assigned_person

Set up a hyperlink to the template definition.
<template_ref name="assigned_person" context="UK_Defence" />

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="assigned_person" context="UK_Defence" >
  <param name="family_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="first_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="ID">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="type">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="middle_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="prefix_title">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="suffix_title">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="items">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigned_person">
  <param_in name="family_name" value=""/>
  <param_in name="first_name" value=""/>
  <param_in name="ID" value=""/>
  <param_in name="source_organization" value=""/>
  <param_in name="type" value=""/>
  <param_in name="middle_name" value=""/>
  <param_in name="prefix_title" value=""/>
  <param_in name="suffix_title" value=""/>
  <param_in name="items" value=""/>
</template_example>

assigned_person
/assigned_person(family_name='', first_name='', ID='', source_organization='', type='', middle_name='', prefix_title='', suffix_title='', items='')/

Path

-- Instantiate Organization_or_person_in_organization_assignment entity
Organization_or_person_in_organization_assignment

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

-- Set the Organization_or_person_in_organization_assignment attribute role to be ignored
Organization_or_person_in_organization_assignment.role = '/IGNORE'

-- Assign the Organization_or_person_in_organization_assignment
-- to the instances passed into the template through the @items
-- input parameter (e.g. an Activity_actual)
Organization_or_person_in_organization_assignment.items -> @items
/person(
    family_name=@family_name,
    first_name=@first_name,
    ID=@ID,
    source_organization=@source_organization,
    type=@type,
    middle_name=@middle_name,
    prefix_title=@prefix_title,
    suffix_title=@suffix_title)/
%^person = $person.person%
%^org = $person.org%
%^pers_in_org = $person.pers_in_org%

-- Assign the Organization_or_person_in_organization_assignment
-- to the representing_person_in_organization template
Organization_or_person_in_organization_assignment.assigned_entity -> ^pers_in_org
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Organization_or_person_in_organization_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="assigned_person">
   <comment>
      Instantiate Organization_or_person_in_organization_assignment entity
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <comment>
      Bind the Organization_or_person_in_organization_assignment
   </comment>
   <comment>
      to the parameter ^asgn_org. The parameter is a reference parameter
   </comment>
   <comment>
      so the Organization_or_person_in_organization_assignment
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="asgn_org">
      <express_entity
         entity="Organization_or_person_in_organization_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      Set the Organization_or_person_in_organization_assignment attribute role to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="role"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Assign the Organization_or_person_in_organization_assignment
   </comment>
   <comment>
      to the instances passed into the template through the @items
   </comment>
   <comment>
      input parameter (e.g. an Activity_actual)
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="items">
            
         </param_in_ref>
      </source>
   </assign>
   <call_template
      name="person"
      business_context="UK_Defence">
      <param_in
         name="family_name"
         value="@family_name">
         
      </param_in>
      <param_in
         name="first_name"
         value="@first_name">
         
      </param_in>
      <param_in
         name="ID"
         value="@ID">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="@type">
         
      </param_in>
      <param_in
         name="middle_name"
         value="@middle_name">
         
      </param_in>
      <param_in
         name="prefix_title"
         value="@prefix_title">
         
      </param_in>
      <param_in
         name="suffix_title"
         value="@suffix_title">
         
      </param_in>
   </call_template>
   <bind
      parameter="person">
      <template_instance
         template="person"
         parameter="person">
         
      </template_instance>
   </bind>
   <bind
      parameter="org">
      <template_instance
         template="person"
         parameter="org">
         
      </template_instance>
   </bind>
   <bind
      parameter="pers_in_org">
      <template_instance
         template="person"
         parameter="pers_in_org">
         
      </template_instance>
   </bind>
   <comment>
      Assign the Organization_or_person_in_organization_assignment
   </comment>
   <comment>
      to the representing_person_in_organization template
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="assigned_entity"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="pers_in_org">
            
         </bound_parameter>
      </source>
   </assign>
</refpath>

© UK MOD 2010 — All rights reserved