Template:— product_location_change (prod_loc_chg)
Context:— UK_Defence
Date: 2010/03/15 14:46:04
Revision: 1.2
Template: product_location_change

XML references to the Template

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

product_location_change

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="product_location_change" context="UK_Defence" >
  <param name="ID">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="prior_location">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_activity">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="subsequent_location">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_product">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="product_location_change">
  <param_in name="ID" value=""/>
  <param_in name="source_organization" value=""/>
  <param_in name="prior_location" value=""/>
  <param_in name="related_activity" value=""/>
  <param_in name="subsequent_location" value=""/>
  <param_in name="related_product" value=""/>
</template_example>

product_location_change
/product_location_change(ID='', source_organization='', prior_location='', related_activity='', subsequent_location='', related_product='')/

Path

-- Create the Selected_item entity
Selected_item
Selected_item.id = '/IGNORE'
Selected_item.name = '/IGNORE'
Selected_item.description = '/IGNORE'
%^selected_item = Selected_item%
/identifier(
    ID=@ID,
    source_organization=@source_organization,
    type='Organization_identification_code',
    items=^selected_item)/

-- [optional Applied_activity_assignment]
Applied_activity_assignment
Applied_activity_assignment.role = '/IGNORE'
Applied_activity_assignment.items -> @related_product
Applied_activity_assignment.assigned_activity -> @related_activity
%^actiivty = Applied_activity_assignment%

-- [optional Classification_assignment]
Classification_assignment
Classification_assignment.role = '/IGNORE'
Classification_assignment.items -> ^actiivty
Classification_assignment.assigned_class -> ^selected_item

-- Create the Location_relationship entity
Location_relationship
Location_relationship.name = '/IGNORE'
Location_relationship.description = '/IGNORE'
Location_relationship.relating -> @prior_location
Location_relationship.related -> @subsequent_location
%^loc_rel = Location_relationship%

-- Create the Classification_assignment entity
Classification_assignment
Classification_assignment.role = '/IGNORE'
Classification_assignment.items -> ^loc_rel
Classification_assignment.assigned_class -> ^selected_item
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Selected_item.id '/IGNORE' Class.id
Selected_item.name '/IGNORE' Class.name
Selected_item.description '/IGNORE' Class.description
Applied_activity_assignment.role '/IGNORE'
Classification_assignment.role '/IGNORE'
Location_relationship.name '/IGNORE'
Location_relationship.description '/IGNORE'
Classification_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="product_location_change">
   <comment>
      Create the Selected_item entity
   </comment>
   <instantiate
      entity="Selected_item"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Selected_item"
            attribute="id"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Selected_item"
            attribute="name"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Selected_item"
            attribute="description"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <bind
      parameter="selected_item">
      <express_entity
         entity="Selected_item"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="@ID">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="'Organization_identification_code'">
         
      </param_in>
      <param_in
         name="items"
         value="^selected_item">
         
      </param_in>
   </call_template>
   <comment>
      [optional Applied_activity_assignment]
   </comment>
   <instantiate
      entity="Applied_activity_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Applied_activity_assignment"
            attribute="role"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Applied_activity_assignment"
            attribute="items"
            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="Applied_activity_assignment"
            attribute="assigned_activity"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="related_activity">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="actiivty">
      <express_entity
         entity="Applied_activity_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      [optional Classification_assignment]
   </comment>
   <instantiate
      entity="Classification_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Classification_assignment"
            attribute="role"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Classification_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="actiivty">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Classification_assignment"
            attribute="assigned_class"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="selected_item">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Create the Location_relationship entity
   </comment>
   <instantiate
      entity="Location_relationship"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Location_relationship"
            attribute="name"
            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_relationship"
            attribute="description"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Location_relationship"
            attribute="relating"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="prior_location">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Location_relationship"
            attribute="related"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="subsequent_location">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="loc_rel">
      <express_entity
         entity="Location_relationship"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      Create the Classification_assignment entity
   </comment>
   <instantiate
      entity="Classification_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Classification_assignment"
            attribute="role"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Classification_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="loc_rel">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Classification_assignment"
            attribute="assigned_class"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="selected_item">
            
         </bound_parameter>
      </source>
   </assign>
</refpath>

© UK MOD 2010 — All rights reserved