Template:— product_location (prod_loc)
Context:— UK_Defence
Date: 2010/03/18 12:28:57
Revision: 1.5
Template: product_location

XML references to the Template

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

product_location

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="product_location" context="UK_Defence" >
  <param name="location_end_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="location_start_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="planned_location_end_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="planned_location_start_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_product">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_location">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="product_location">
  <param_in name="location_end_date" value=""/>
  <param_in name="location_start_date" value=""/>
  <param_in name="planned_location_end_date" value=""/>
  <param_in name="planned_location_start_date" value=""/>
  <param_in name="related_product" value=""/>
  <param_in name="related_location" value=""/>
</template_example>

product_location
/product_location(location_end_date='', location_start_date='', planned_location_end_date='', planned_location_start_date='', related_product='', related_location='')/

Path

-- product location
Location_assignment
Location_assignment.entity_for_location -> @related_product
Location_assignment.location_for_assignment -> @related_location
Location_assignment.description = '/IGNORE'
Location_assignment.role = '/IGNORE'
%^prodlocn = Location_assignment%

-- product location ID
-- Selected_item
-- Selected_item.id = '/IGNORE'
-- Selected_item.name = '/IGNORE'
-- Selected_item.description = '/IGNORE'
-- %^selitem=Selected_item%
-- Classification_assignment
-- Classification_assignment.role = '/IGNORE'
-- Classification_assignment.items -> ^prodlocn
-- Classification_assignment.assigned_class -> ^selitem
-- /identifier(ID=@ID,
-- source_organization=@ID_source_organization,
-- type='Product_location_identifier',
-- items=^selitem)/
-- [optional location_end_date]
Date_or_date_time_assignment
Date_or_date_time_assignment.items -> ^prodlocn
Date_or_date_time_assignment.assigned_date -> @location_end_date
%^location_end_date_time = Date_or_date_time_assignment%
/assigning_reference_data(
    items=^location_end_date_time,
    class_name='location_end_date',
    ecl_id='urn:plcs:rdl:uk_defence')/

-- location_start_date
Date_or_date_time_assignment
Date_or_date_time_assignment.items -> ^prodlocn
Date_or_date_time_assignment.assigned_date -> @location_start_date
%^location_start_date_time = Date_or_date_time_assignment%
/assigning_reference_data(
    items=^location_start_date_time,
    class_name='location_start_date',
    ecl_id='urn:plcs:rdl:uk_defence')/

-- [optional planned_location_end_date]
Date_or_date_time_assignment
Date_or_date_time_assignment.items -> ^prodlocn
Date_or_date_time_assignment.assigned_date -> @planned_location_end_date
%^planned_location_end_date_time = Date_or_date_time_assignment%
/assigning_reference_data(
    items=^planned_location_end_date_time,
    class_name='planned_location_end_date',
    ecl_id='urn:plcs:rdl:uk_defence')/

-- [optional planned_location_start_date]
Date_or_date_time_assignment
Date_or_date_time_assignment.items -> ^prodlocn
Date_or_date_time_assignment.assigned_date -> @planned_location_start_date
%^planned_location_start_date_time = Date_or_date_time_assignment%
/assigning_reference_data(
    items=^planned_location_start_date_time,
    class_name='planned_location_start_date',
    ecl_id='urn:plcs:rdl:uk_defence')/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Location_assignment.description '/IGNORE'
Location_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="product_location">
   <comment>
      product location
   </comment>
   <instantiate
      entity="Location_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="entity_for_location"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="related_product">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="location_for_assignment"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="related_location">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="description"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="role"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <bind
      parameter="prodlocn">
      <express_entity
         entity="Location_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      product location ID
   </comment>
   <comment>
      Selected_item
   </comment>
   <comment>
      Selected_item.id = '/IGNORE'
   </comment>
   <comment>
      Selected_item.name = '/IGNORE'
   </comment>
   <comment>
      Selected_item.description = '/IGNORE'
   </comment>
   <comment>
      %^selitem=Selected_item%
   </comment>
   <comment>
      Classification_assignment
   </comment>
   <comment>
      Classification_assignment.role = '/IGNORE'
   </comment>
   <comment>
      Classification_assignment.items -> ^prodlocn
   </comment>
   <comment>
      Classification_assignment.assigned_class -> ^selitem
   </comment>
   <comment>
      /identifier(ID=@ID,
   </comment>
   <comment>
      source_organization=@ID_source_organization,
   </comment>
   <comment>
      type='Product_location_identifier',
   </comment>
   <comment>
      items=^selitem)/
   </comment>
   <comment>
      [optional location_end_date]
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="prodlocn">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="assigned_date"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="location_end_date">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="location_end_date_time">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^location_end_date_time">
         
      </param_in>
      <param_in
         name="class_name"
         value="'location_end_date'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      location_start_date
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="prodlocn">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="assigned_date"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="location_start_date">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="location_start_date_time">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^location_start_date_time">
         
      </param_in>
      <param_in
         name="class_name"
         value="'location_start_date'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      [optional planned_location_end_date]
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="prodlocn">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="assigned_date"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="planned_location_end_date">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="planned_location_end_date_time">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^planned_location_end_date_time">
         
      </param_in>
      <param_in
         name="class_name"
         value="'planned_location_end_date'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      [optional planned_location_start_date]
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="prodlocn">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="assigned_date"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="planned_location_start_date">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="planned_location_start_date_time">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^planned_location_start_date_time">
         
      </param_in>
      <param_in
         name="class_name"
         value="'planned_location_start_date'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
</refpath>

© UK MOD 2010 — All rights reserved