Template:— change_effectivity (chg_effect)
Context:— UK_Defence
Date: 2009/04/17 10:29:28
Revision: 1.2
Template: change_effectivity

XML references to the Template

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

change_effectivity

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="change_effectivity" 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="ID_type">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_start_year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_start_month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_start_day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_start_hour">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_start_minute">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_start_second">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_end_year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_end_month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_end_day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_end_hour">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_end_minute">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="effectivity_end_second">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="applicable_to">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_change">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="type">
    <param_value>Effectivity_assignment</param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="change_effectivity">
  <param_in name="ID" value=""/>
  <param_in name="source_organization" value=""/>
  <param_in name="ID_type" value=""/>
  <param_in name="effectivity_start_year" value=""/>
  <param_in name="effectivity_start_month" value=""/>
  <param_in name="effectivity_start_day" value=""/>
  <param_in name="effectivity_start_hour" value=""/>
  <param_in name="effectivity_start_minute" value=""/>
  <param_in name="effectivity_start_second" value=""/>
  <param_in name="effectivity_end_year" value=""/>
  <param_in name="effectivity_end_month" value=""/>
  <param_in name="effectivity_end_day" value=""/>
  <param_in name="effectivity_end_hour" value=""/>
  <param_in name="effectivity_end_minute" value=""/>
  <param_in name="effectivity_end_second" value=""/>
  <param_in name="applicable_to" value=""/>
  <param_in name="related_change" value=""/>
  <param_in name="type" value="Effectivity_assignment"/>
</template_example>

change_effectivity
/change_effectivity(ID='', source_organization='', ID_type='', effectivity_start_year='', effectivity_start_month='', effectivity_start_day='', effectivity_start_hour='', effectivity_start_minute='', effectivity_start_second='', effectivity_end_year='', effectivity_end_month='', effectivity_end_day='', effectivity_end_hour='', effectivity_end_minute='', effectivity_end_second='', applicable_to='', related_change='', type='Effectivity_assignment')/

Path

/assigning_dated_effectivity(
    start_year=@effectivity_start_year,
    start_month=@effectivity_start_month,
    start_day=@effectivity_start_day,
    start_hour=@effectivity_start_hour,
    start_minute=@effectivity_start_minute,
    start_second=@effectivity_start_second,
    start_sense='.EXACT.',
    start_hour_offset='0',
    start_minute_offset='0',
    end_year=@effectivity_end_year,
    end_month=@effectivity_end_month,
    end_day=@effectivity_end_day,
    end_hour=@effectivity_end_hour,
    end_minute=@effectivity_end_minute,
    end_second=@effectivity_end_second,
    end_sense='.EXACT.',
    end_hour_offset='0',
    end_minute_offset='0',
    role_class_name=@type,
    role_ecl_id='urn:plcs:rdl:uk_defence',
    items=@applicable_to)/
%^eff_asgn = $assigning_dated_effectivity.eff_asgn%
/identifier(
    ID=@ID,
    source_organization=@source_organization,
    type=@ID_type,
    items=^eff_asgn)/
Applied_activity_assignment

-- Set the Applied_activity_assignment
Applied_activity_assignment.role = '/IGNORE'
Applied_activity_assignment.items -> ^eff_asgn
Applied_activity_assignment.assigned_activity -> @related_change
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Applied_activity_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="change_effectivity">
   <call_template
      name="assigning_dated_effectivity"
      business_context="UK_Defence">
      <param_in
         name="start_year"
         value="@effectivity_start_year">
         
      </param_in>
      <param_in
         name="start_month"
         value="@effectivity_start_month">
         
      </param_in>
      <param_in
         name="start_day"
         value="@effectivity_start_day">
         
      </param_in>
      <param_in
         name="start_hour"
         value="@effectivity_start_hour">
         
      </param_in>
      <param_in
         name="start_minute"
         value="@effectivity_start_minute">
         
      </param_in>
      <param_in
         name="start_second"
         value="@effectivity_start_second">
         
      </param_in>
      <param_in
         name="start_sense"
         value="'.EXACT.'">
         
      </param_in>
      <param_in
         name="start_hour_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="start_minute_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="end_year"
         value="@effectivity_end_year">
         
      </param_in>
      <param_in
         name="end_month"
         value="@effectivity_end_month">
         
      </param_in>
      <param_in
         name="end_day"
         value="@effectivity_end_day">
         
      </param_in>
      <param_in
         name="end_hour"
         value="@effectivity_end_hour">
         
      </param_in>
      <param_in
         name="end_minute"
         value="@effectivity_end_minute">
         
      </param_in>
      <param_in
         name="end_second"
         value="@effectivity_end_second">
         
      </param_in>
      <param_in
         name="end_sense"
         value="'.EXACT.'">
         
      </param_in>
      <param_in
         name="end_hour_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="end_minute_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="role_class_name"
         value="@type">
         
      </param_in>
      <param_in
         name="role_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="items"
         value="@applicable_to">
         
      </param_in>
   </call_template>
   <bind
      parameter="eff_asgn">
      <template_instance
         template="assigning_dated_effectivity"
         parameter="eff_asgn">
         
      </template_instance>
   </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="@ID_type">
         
      </param_in>
      <param_in
         name="items"
         value="^eff_asgn">
         
      </param_in>
   </call_template>
   <instantiate
      entity="Applied_activity_assignment"
      context="UK_Defence">
      
   </instantiate>
   <comment>
      Set the Applied_activity_assignment
   </comment>
   <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>
         <bound_parameter
            name="eff_asgn">
            
         </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="related_change">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© UK MOD 2010 — All rights reserved