Template:— facility_demand (fac_dmnd)
Context:— UK_Defence
Date: 2009/04/17 11:21:20
Revision: 1.2
Template: facility_demand

XML references to the Template

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

facility_demand

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="facility_demand" context="UK_Defence" >
  <param name="id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="source_organization_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="lack_of_item_impact">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanding_organization_unit">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanding_person">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demand_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanded_quantity">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanded_quantity_unit">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanded_quantity_si_unit">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="authority_to_demand">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="reason">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="special_requirements">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="required_start_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="required_end_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="prefered_facility">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="type_of_facility">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="facility_demand">
  <param_in name="id" value=""/>
  <param_in name="source_organization_id" value=""/>
  <param_in name="lack_of_item_impact" value=""/>
  <param_in name="demanding_organization_unit" value=""/>
  <param_in name="demanding_person" value=""/>
  <param_in name="demand_date" value=""/>
  <param_in name="demanded_quantity" value=""/>
  <param_in name="demanded_quantity_unit" value=""/>
  <param_in name="demanded_quantity_si_unit" value=""/>
  <param_in name="authority_to_demand" value=""/>
  <param_in name="reason" value=""/>
  <param_in name="special_requirements" value=""/>
  <param_in name="required_start_date" value=""/>
  <param_in name="required_end_date" value=""/>
  <param_in name="prefered_facility" value=""/>
  <param_in name="type_of_facility" value=""/>
</template_example>

facility_demand
/facility_demand(id='', source_organization_id='', lack_of_item_impact='', demanding_organization_unit='', demanding_person='', demand_date='', demanded_quantity='', demanded_quantity_unit='', demanded_quantity_si_unit='', authority_to_demand='', reason='', special_requirements='', required_start_date='', required_end_date='', prefered_facility='', type_of_facility='')/

Path

-- Facility demand is based upon resource demand
/resource_demand(
    id=@id,
    source_organization_id=@source_organization_id,
    lack_of_item_impact=@lack_of_item_impact,
    demanding_organization_unit=@demanding_organization_unit,
    demanding_person=@demanding_person,
    demand_date=@demand_date,
    demanded_quantity=@demanded_quantity,
    demanded_quantity_unit=@demanded_quantity_unit,
    demanded_quantity_si_unit=@demanded_quantity_si_unit)/
%^ref_demand = $resource_demand.resource_demand%

-- Create the resource item to link to the Type of Facility and [Optional Prefered Facility]
/representing_resource_item_realization(
    res_item_id=@id,
    res_item_id_class='Resource_item_identification_code',
    res_item_id_ecl_id='urn:plcs:rdl:std',
    res_item_id_org_id=@source_organization_id,
    res_item_id_org_id_class='Organization_identification_code',
    res_item_id_org_id_ecl_id='urn:plcs:rdl:std',
    res_item_items=@type_of_facility,
    res_item_items=@prefered_facility)/
%^facility_demand = $representing_resource_item_realization.res_item%

-- Relate the refered resource demand to the facility demand
/assigning_required_resource(
    item=^ref_demand,
    resource_item=^facility_demand,
    class_name='Required_resource',
    ecl_id='urn:plcs:rdl:std')/

-- authority_to_demand
/assigning_descriptor(
    descr=@authority_to_demand,
    class_name='Authority_to_demand',
    ecl_id='urn:plcs:rdl:uk_defence',
    is_assigned_to=^facility_demand)/

-- reason
/assigning_descriptor(
    descr=@reason,
    class_name='Reason',
    ecl_id='urn:plcs:rdl:uk_defence',
    is_assigned_to=^facility_demand)/

-- special_requirements
/assigning_descriptor(
    descr=@special_requirements,
    class_name='Special_requirements',
    ecl_id='urn:plcs:rdl:uk_defence',
    is_assigned_to=^facility_demand)/

-- Required_start_date
Date_or_date_time_assignment
Date_or_date_time_assignment.role = '/IGNORE'
Date_or_date_time_assignment.items -> ^facility_demand
Date_or_date_time_assignment.assigned_date -> @required_start_date

-- Required_end_date
-- Note this is a second instance or usage of Date_or_date_time_assignment - Graphical Instance cannot handle this
Date_or_date_time_assignment
Date_or_date_time_assignment.role = '/IGNORE'
Date_or_date_time_assignment.items -> ^facility_demand
Date_or_date_time_assignment.assigned_date -> @required_end_date
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Date_or_date_time_assignment.role '/IGNORE'
Date_or_date_time_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="facility_demand">
   <comment>
      Facility demand is based upon resource demand
   </comment>
   <call_template
      name="resource_demand"
      business_context="UK_Defence">
      <param_in
         name="id"
         value="@id">
         
      </param_in>
      <param_in
         name="source_organization_id"
         value="@source_organization_id">
         
      </param_in>
      <param_in
         name="lack_of_item_impact"
         value="@lack_of_item_impact">
         
      </param_in>
      <param_in
         name="demanding_organization_unit"
         value="@demanding_organization_unit">
         
      </param_in>
      <param_in
         name="demanding_person"
         value="@demanding_person">
         
      </param_in>
      <param_in
         name="demand_date"
         value="@demand_date">
         
      </param_in>
      <param_in
         name="demanded_quantity"
         value="@demanded_quantity">
         
      </param_in>
      <param_in
         name="demanded_quantity_unit"
         value="@demanded_quantity_unit">
         
      </param_in>
      <param_in
         name="demanded_quantity_si_unit"
         value="@demanded_quantity_si_unit">
         
      </param_in>
   </call_template>
   <bind
      parameter="ref_demand">
      <template_instance
         template="resource_demand"
         parameter="resource_demand">
         
      </template_instance>
   </bind>
   <comment>
      Create the resource item to link to the Type of Facility and [Optional Prefered Facility]
   </comment>
   <call_template
      name="representing_resource_item_realization"
      business_context="UK_Defence">
      <param_in
         name="res_item_id"
         value="@id">
         
      </param_in>
      <param_in
         name="res_item_id_class"
         value="'Resource_item_identification_code'">
         
      </param_in>
      <param_in
         name="res_item_id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="res_item_id_org_id"
         value="@source_organization_id">
         
      </param_in>
      <param_in
         name="res_item_id_org_id_class"
         value="'Organization_identification_code'">
         
      </param_in>
      <param_in
         name="res_item_id_org_id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="res_item_items"
         value="@type_of_facility">
         
      </param_in>
      <param_in
         name="res_item_items"
         value="@prefered_facility">
         
      </param_in>
   </call_template>
   <bind
      parameter="facility_demand">
      <template_instance
         template="representing_resource_item_realization"
         parameter="res_item">
         
      </template_instance>
   </bind>
   <comment>
      Relate the refered resource demand to the facility demand
   </comment>
   <call_template
      name="assigning_required_resource"
      business_context="UK_Defence">
      <param_in
         name="item"
         value="^ref_demand">
         
      </param_in>
      <param_in
         name="resource_item"
         value="^facility_demand">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Required_resource'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
   </call_template>
   <comment>
      authority_to_demand
   </comment>
   <call_template
      name="assigning_descriptor"
      business_context="UK_Defence">
      <param_in
         name="descr"
         value="@authority_to_demand">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Authority_to_demand'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="is_assigned_to"
         value="^facility_demand">
         
      </param_in>
   </call_template>
   <comment>
      reason
   </comment>
   <call_template
      name="assigning_descriptor"
      business_context="UK_Defence">
      <param_in
         name="descr"
         value="@reason">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Reason'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="is_assigned_to"
         value="^facility_demand">
         
      </param_in>
   </call_template>
   <comment>
      special_requirements
   </comment>
   <call_template
      name="assigning_descriptor"
      business_context="UK_Defence">
      <param_in
         name="descr"
         value="@special_requirements">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Special_requirements'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="is_assigned_to"
         value="^facility_demand">
         
      </param_in>
   </call_template>
   <comment>
      Required_start_date
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Date_or_date_time_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="Date_or_date_time_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="facility_demand">
            
         </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="required_start_date">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Required_end_date
   </comment>
   <comment>
      Note this is a second instance or usage of Date_or_date_time_assignment - Graphical Instance cannot handle this
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Date_or_date_time_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="Date_or_date_time_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="facility_demand">
            
         </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="required_end_date">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© UK MOD 2010 — All rights reserved