Template:— utility_demand (utlty_dmnd)
Context:— UK_Defence
Date: 2009/04/17 12:41:44
Revision: 1.5
Template: utility_demand

XML references to the Template

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

utility_demand

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="utility_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="delivery_location">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="reason">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="required_end_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="required_start_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="special_requirements">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="type_of_utility">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="utility_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="delivery_location" value=""/>
  <param_in name="reason" value=""/>
  <param_in name="required_end_date" value=""/>
  <param_in name="required_start_date" value=""/>
  <param_in name="special_requirements" value=""/>
  <param_in name="type_of_utility" value=""/>
</template_example>

utility_demand
/utility_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='', delivery_location='', reason='', required_end_date='', required_start_date='', special_requirements='', type_of_utility='')/

Path

-- Utility 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)/
%^utility_demand = $resource_demand.resource_demand%

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

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

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

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

-- Required_end_date
Date_or_date_time_assignment
Date_or_date_time_assignment.role = '/IGNORE'
Date_or_date_time_assignment.items -> ^utility_demand
Date_or_date_time_assignment.assigned_date -> @required_end_date

-- delivery location
/assigning_activity(
    role_class_name='Delivery_location',
    role_ecl_id='urn:plcs:rdl:uk_defence',
    assigned_activity=^utility_demand,
    items=@delivery_location)/

-- type of utility
/assigning_activity(
    role_class_name='Type_of_utility',
    role_ecl_id='urn:plcs:rdl:uk_defence',
    assigned_activity=^utility_demand,
    items=@type_of_utility)/
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="utility_demand">
   <comment>
      Utility 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="utility_demand">
      <template_instance
         template="resource_demand"
         parameter="resource_demand">
         
      </template_instance>
   </bind>
   <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="^utility_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="^utility_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="^utility_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="utility_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>
   <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="utility_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>
   <comment>
      delivery location
   </comment>
   <call_template
      name="assigning_activity"
      business_context="UK_Defence">
      <param_in
         name="role_class_name"
         value="'Delivery_location'">
         
      </param_in>
      <param_in
         name="role_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="assigned_activity"
         value="^utility_demand">
         
      </param_in>
      <param_in
         name="items"
         value="@delivery_location">
         
      </param_in>
   </call_template>
   <comment>
      type of utility
   </comment>
   <call_template
      name="assigning_activity"
      business_context="UK_Defence">
      <param_in
         name="role_class_name"
         value="'Type_of_utility'">
         
      </param_in>
      <param_in
         name="role_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="assigned_activity"
         value="^utility_demand">
         
      </param_in>
      <param_in
         name="items"
         value="@type_of_utility">
         
      </param_in>
   </call_template>
</refpath>

© UK MOD 2010 — All rights reserved