Template:— inventory_item_issue (invntry_itm_iss)
Context:— UK_Defence
Date: 2009/11/05 14:47:34
Revision: 1.7
Template: inventory_item_issue

XML references to the Template

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

inventory_item_issue

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="inventory_item_issue" context="UK_Defence" >
  <param name="denomination_of_quantity">
    <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="issue_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="issued_by">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="issued_for_activity">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="issued_from">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="issued_to">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="quantity">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_demand_response">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_inventory_item">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_resource_allocation">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="inventory_item_issue">
  <param_in name="denomination_of_quantity" value=""/>
  <param_in name="id" value=""/>
  <param_in name="source_organization" value=""/>
  <param_in name="issue_date" value=""/>
  <param_in name="issued_by" value=""/>
  <param_in name="issued_for_activity" value=""/>
  <param_in name="issued_from" value=""/>
  <param_in name="issued_to" value=""/>
  <param_in name="quantity" value=""/>
  <param_in name="related_demand_response" value=""/>
  <param_in name="related_inventory_item" value=""/>
  <param_in name="related_resource_allocation" value=""/>
</template_example>

inventory_item_issue
/inventory_item_issue(denomination_of_quantity='', id='', source_organization='', issue_date='', issued_by='', issued_for_activity='', issued_from='', issued_to='', quantity='', related_demand_response='', related_inventory_item='', related_resource_allocation='')/

Path

-- quantity
/representing_value_with_unit(
    value=@quantity,
    unit=@denomination_of_quantity,
    unit_ecl_id='urn:plcs:rdl:std',
    si_unit='false')/
%^value_with_unit = $representing_value_with_unit.value%

-- inventory item issue
Decreasing_resource_event
Decreasing_resource_event.quantity -> ^value_with_unit
Decreasing_resource_event.resource -> @related_inventory_item
%^dec_res_event = Decreasing_resource_event%

-- id
/identifier(
    ID=@id,
    source_organization=@source_organization,
    type='Inventory_item_issue_id_code',
    items=^dec_res_event )/

-- issue_date
Date_or_date_time_assignment
%^date_issue_date = Date_or_date_time_assignment%
^date_issue_date.assigned_date -> @issue_date
^date_issue_date.role = 'inventory_item_issue_date_issued'
^date_issue_date.items -> ^dec_res_event

-- issued_from
Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.role = '/IGNORE'
Organization_or_person_in_organization_assignment.items -> ^dec_res_event
Organization_or_person_in_organization_assignment.assigned_entity -> @issued_from

-- issued_to
Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.role = 'issued_to'
Organization_or_person_in_organization_assignment.items -> ^dec_res_event
Organization_or_person_in_organization_assignment.assigned_entity -> @issued_to

-- [optional related_demand_response]
-- use resource_event_correspondence_relationship relationship entity
Resource_event_correspondence_relationship
Resource_event_correspondence_relationship.relating -> ^dec_res_event
Resource_event_correspondence_relationship.related -> @related_demand_response

-- [optional issued_by]
Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.role = 'issued_by'
Organization_or_person_in_organization_assignment.items -> ^dec_res_event
Organization_or_person_in_organization_assignment.assigned_entity -> @issued_by

-- [optional issued_for_activity]
Applied_activity_assignment
Applied_activity_assignment.items -> ^dec_res_event
Applied_activity_assignment.assigned_activity -> @issued_for_activity

-- [optional related_resource_allocation]
Resource_as_realized_relationship
Resource_as_realized_relationship.related -> ^dec_res_event
Resource_as_realized_relationship.relating -> @related_resource_allocation
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Date_or_date_time_assignment.role 'inventory_item_issue_date_issued'
Organization_or_person_in_organization_assignment.role '/IGNORE'
Organization_or_person_in_organization_assignment.role 'issued_to'
Organization_or_person_in_organization_assignment.role 'issued_by'

XML representation of path

<refpath
   template="inventory_item_issue">
   <comment>
      quantity
   </comment>
   <call_template
      name="representing_value_with_unit"
      business_context="UK_Defence">
      <param_in
         name="value"
         value="@quantity">
         
      </param_in>
      <param_in
         name="unit"
         value="@denomination_of_quantity">
         
      </param_in>
      <param_in
         name="unit_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="si_unit"
         value="'false'">
         
      </param_in>
   </call_template>
   <bind
      parameter="value_with_unit">
      <template_instance
         template="representing_value_with_unit"
         parameter="value">
         
      </template_instance>
   </bind>
   <comment>
      inventory item issue
   </comment>
   <instantiate
      entity="Decreasing_resource_event"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Decreasing_resource_event"
            attribute="quantity"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="value_with_unit">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Decreasing_resource_event"
            attribute="resource"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="related_inventory_item">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="dec_res_event">
      <express_entity
         entity="Decreasing_resource_event"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      id
   </comment>
   <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="'Inventory_item_issue_id_code'">
         
      </param_in>
      <param_in
         name="items"
         value="^dec_res_event ">
         
      </param_in>
   </call_template>
   <comment>
      issue_date
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <bind
      parameter="date_issue_date">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="date_issue_date.assigned_date">
            
         </bound_parameter>
      </target>
      <source>
         <param_in_ref
            name="issue_date">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <bound_parameter
            name="date_issue_date.role">
            
         </bound_parameter>
      </target>
      <source>
         <string
            value=" 'inventory_item_issue_date_issued' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="date_issue_date.items">
            
         </bound_parameter>
      </target>
      <source>
         <bound_parameter
            name="dec_res_event">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      issued_from
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <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>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="dec_res_event">
            
         </bound_parameter>
      </source>
   </assign>
   <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>
         <param_in_ref
            name="issued_from">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      issued_to
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <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=" 'issued_to' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="dec_res_event">
            
         </bound_parameter>
      </source>
   </assign>
   <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>
         <param_in_ref
            name="issued_to">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      [optional related_demand_response]
   </comment>
   <comment>
      use resource_event_correspondence_relationship relationship entity
   </comment>
   <instantiate
      entity="Resource_event_correspondence_relationship"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Resource_event_correspondence_relationship"
            attribute="relating"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="dec_res_event">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Resource_event_correspondence_relationship"
            attribute="related"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="related_demand_response">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      [optional issued_by]
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <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=" 'issued_by' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="dec_res_event">
            
         </bound_parameter>
      </source>
   </assign>
   <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>
         <param_in_ref
            name="issued_by">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      [optional issued_for_activity]
   </comment>
   <instantiate
      entity="Applied_activity_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Applied_activity_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="dec_res_event">
            
         </bound_parameter>
      </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="issued_for_activity">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      [optional related_resource_allocation]
   </comment>
   <instantiate
      entity="Resource_as_realized_relationship"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Resource_as_realized_relationship"
            attribute="related"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="dec_res_event">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Resource_as_realized_relationship"
            attribute="relating"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="related_resource_allocation">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© UK MOD 2010 — All rights reserved