Template:— contract (cntrct)
Context:— UK_Defence
Date: 2010/03/16 15:29:12
Revision: 1.4
Template: contract

XML references to the Template

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

contract

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="contract" context="UK_Defence" >
  <param name="ID">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="ID_source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Providing_party">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Receiving_party">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Name_source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_from_year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_from_month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_from_day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_from_hour">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_from_minute">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_from_second">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_to_year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_to_month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_to_day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_to_hour">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_to_minute">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Effective_to_second">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Payment_completion_year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Payment_completion_month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Payment_completion_day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Payment_completion_hour">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Payment_completion_minute">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Payment_completion_second">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Payment_method">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Value">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Currency">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="contract">
  <param_in name="ID" value=""/>
  <param_in name="ID_source_organization" value=""/>
  <param_in name="Providing_party" value=""/>
  <param_in name="Receiving_party" value=""/>
  <param_in name="Name" value=""/>
  <param_in name="Name_source_organization" value=""/>
  <param_in name="Effective_from_year" value=""/>
  <param_in name="Effective_from_month" value=""/>
  <param_in name="Effective_from_day" value=""/>
  <param_in name="Effective_from_hour" value=""/>
  <param_in name="Effective_from_minute" value=""/>
  <param_in name="Effective_from_second" value=""/>
  <param_in name="Effective_to_year" value=""/>
  <param_in name="Effective_to_month" value=""/>
  <param_in name="Effective_to_day" value=""/>
  <param_in name="Effective_to_hour" value=""/>
  <param_in name="Effective_to_minute" value=""/>
  <param_in name="Effective_to_second" value=""/>
  <param_in name="Payment_completion_year" value=""/>
  <param_in name="Payment_completion_month" value=""/>
  <param_in name="Payment_completion_day" value=""/>
  <param_in name="Payment_completion_hour" value=""/>
  <param_in name="Payment_completion_minute" value=""/>
  <param_in name="Payment_completion_second" value=""/>
  <param_in name="Payment_method" value=""/>
  <param_in name="Value" value=""/>
  <param_in name="Currency" value=""/>
</template_example>

contract
/contract(ID='', ID_source_organization='', Providing_party='', Receiving_party='', Name='', Name_source_organization='', Effective_from_year='', Effective_from_month='', Effective_from_day='', Effective_from_hour='', Effective_from_minute='', Effective_from_second='', Effective_to_year='', Effective_to_month='', Effective_to_day='', Effective_to_hour='', Effective_to_minute='', Effective_to_second='', Payment_completion_year='', Payment_completion_month='', Payment_completion_day='', Payment_completion_hour='', Payment_completion_minute='', Payment_completion_second='', Payment_method='', Value='', Currency='')/

Path

-- Instantiate a Contract
Contract

-- Bind the Contract to the parameter ^contract
-- The parameter is a reference parameter so the Contract_assignment
-- entity can be referred to when this template is used.
%^contract = Contract%

-- Set the Contract attributes id, purpose and kind to be ignored
Contract.id = '/IGNORE'
Contract.kind = '/IGNORE'
Contract.purpose = '/IGNORE'

-- Assign identifier
/identifier(
    ID=@ID,
    source_organization=@ID_source_organization,
    type='Contract_identification_code',
    items=^contract)/

-- Assign payment completion date
/assigning_time(
    date_class_name='Date_planned_payment_completion',
    date_ecl_id='urn:plcs:rdl:uk_defence',
    year=@Payment_completion_year,
    month=@Payment_completion_month,
    day=@Payment_completion_day,
    hour=@Payment_completion_hour,
    minute=@Payment_completion_minute,
    second=@Payment_completion_second,
    sense='.EXACT.',
    hour_offset='0',
    minute_offset='0',
    items=^contract)/
/assigning_reference_data(
    items=^contract,
    class_name=@Payment_method,
    ecl_id='urn:plcs:rdl:uk_defence')/

-- Represent contract document
/representing_document(
    doc_id=@Name,
    doc_id_class_name='Contract_name',
    doc_id_ecl_id='urn:plcs:rdl:uk_defence',
    doc_org_id=@Name_source_organization,
    doc_org_id_class_name='Organization_name',
    doc_org_id_ecl_id='urn:plcs:rdl:std',
    doc_vn_id='/NULL',
    doc_vn_id_class_name='Version_identification_code',
    doc_vn_id_ecl_id='urn:plcs:rdl:std',
    doc_vn_org_id='/NULL',
    doc_vn_org_id_class_name='Organization_identification_code',
    doc_vn_org_id_ecl_id='urn:plcs:rdl:std',
    domain='Through_life_support_standard',
    domain_ecl_id='urn:plcs:rdl:uk_defence',
    life_cycle_stage='Support',
    life_cycle_stage_ecl_id='urn:plcs:rdl:std')/
%^document = $representing_document.document%

-- Assign contract document
/assigning_document(
    doc_ass_role='Document_assignment',
    doc_ar_ecl_id='urn:plcs:rdl:std',
    assigned_document=^document,
    is_assigned_to=^contract)/
%^document_assignment = $assigning_document.doc_asg%

-- Associcate contract document with contract
/assigning_document(
    doc_ass_role='Document_assignment',
    doc_ar_ecl_id='urn:plcs:rdl:std',
    assigned_document=^document,
    is_assigned_to=^contract)/
%^document_assignment = $assigning_document.doc_asg%

-- Contract effectivity
/assigning_dated_effectivity(
    start_year=@Effective_from_year,
    start_month=@Effective_from_month,
    start_day=@Effective_from_day,
    start_hour=@Effective_from_hour,
    start_minute=@Effective_from_minute,
    start_second=@Effective_from_second,
    start_sense='exact',
    start_hour_offset=0,
    start_minute_offset=0,
    end_year=@Effective_to_year,
    end_month=@Effective_to_month,
    end_day=@Effective_to_day,
    end_hour=@Effective_to_hour,
    end_minute=@Effective_to_minute,
    end_second=@Effective_to_second,
    end_sense='exact',
    end_hour_offset=0,
    end_minute_offset=0,
    role_class_name='Effectivity_assignment',
    role_ecl_id='urn:plcs:rdl:std',
    items=^contract)/
/assigning_product_property(
    property_class_name='Contract_value',
    property_ecl_id='urn:plcs:rdl:uk_defence',
    described_element=^contract)/
%^target = $assigning_product_property.property%
/product_property_numeric(
    value=@Value,
    unit=@Currency,
    unit_ecl_id='urn:plcs:rdl:std',
    si_unit='false',
    context='Numerical_representation_context',
    context_ecl_id='urn:plcs:rdl:std',
    property=^target)/

-- Create relationship to providing organization
Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.items -> ^contract
Organization_or_person_in_organization_assignment.assigned_entity -> @Providing_party
Organization_or_person_in_organization_assignment.role = '/IGNORE'

-- Create relationship to receiving organization
Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.items -> ^contract
Organization_or_person_in_organization_assignment.assigned_entity -> @Receiving_party
Organization_or_person_in_organization_assignment.role = '/IGNORE'
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Contract.id '/IGNORE'
Contract.kind '/IGNORE'
Contract.purpose '/IGNORE'
Organization_or_person_in_organization_assignment.role '/IGNORE'
Organization_or_person_in_organization_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="contract">
   <comment>
      Instantiate a Contract
   </comment>
   <instantiate
      entity="Contract"
      context="UK_Defence">
      
   </instantiate>
   <comment>
      Bind the Contract to the parameter ^contract
   </comment>
   <comment>
      The parameter is a reference parameter so the Contract_assignment
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="contract">
      <express_entity
         entity="Contract"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      Set the Contract attributes id, purpose and kind to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Contract"
            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="Contract"
            attribute="kind"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Contract"
            attribute="purpose"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Assign identifier
   </comment>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="@ID">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@ID_source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="'Contract_identification_code'">
         
      </param_in>
      <param_in
         name="items"
         value="^contract">
         
      </param_in>
   </call_template>
   <comment>
      Assign payment completion date
   </comment>
   <call_template
      name="assigning_time"
      business_context="UK_Defence">
      <param_in
         name="date_class_name"
         value="'Date_planned_payment_completion'">
         
      </param_in>
      <param_in
         name="date_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="year"
         value="@Payment_completion_year">
         
      </param_in>
      <param_in
         name="month"
         value="@Payment_completion_month">
         
      </param_in>
      <param_in
         name="day"
         value="@Payment_completion_day">
         
      </param_in>
      <param_in
         name="hour"
         value="@Payment_completion_hour">
         
      </param_in>
      <param_in
         name="minute"
         value="@Payment_completion_minute">
         
      </param_in>
      <param_in
         name="second"
         value="@Payment_completion_second">
         
      </param_in>
      <param_in
         name="sense"
         value="'.EXACT.'">
         
      </param_in>
      <param_in
         name="hour_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="minute_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="items"
         value="^contract">
         
      </param_in>
   </call_template>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^contract">
         
      </param_in>
      <param_in
         name="class_name"
         value="@Payment_method">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      Represent contract document
   </comment>
   <call_template
      name="representing_document"
      business_context="UK_Defence">
      <param_in
         name="doc_id"
         value="@Name">
         
      </param_in>
      <param_in
         name="doc_id_class_name"
         value="'Contract_name'">
         
      </param_in>
      <param_in
         name="doc_id_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="doc_org_id"
         value="@Name_source_organization">
         
      </param_in>
      <param_in
         name="doc_org_id_class_name"
         value="'Organization_name'">
         
      </param_in>
      <param_in
         name="doc_org_id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="doc_vn_id"
         value="'/NULL'">
         
      </param_in>
      <param_in
         name="doc_vn_id_class_name"
         value="'Version_identification_code'">
         
      </param_in>
      <param_in
         name="doc_vn_id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="doc_vn_org_id"
         value="'/NULL'">
         
      </param_in>
      <param_in
         name="doc_vn_org_id_class_name"
         value="'Organization_identification_code'">
         
      </param_in>
      <param_in
         name="doc_vn_org_id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="domain"
         value="'Through_life_support_standard'">
         
      </param_in>
      <param_in
         name="domain_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="life_cycle_stage"
         value="'Support'">
         
      </param_in>
      <param_in
         name="life_cycle_stage_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
   </call_template>
   <bind
      parameter="document">
      <template_instance
         template="representing_document"
         parameter="document">
         
      </template_instance>
   </bind>
   <comment>
      Assign contract document
   </comment>
   <call_template
      name="assigning_document"
      business_context="UK_Defence">
      <param_in
         name="doc_ass_role"
         value="'Document_assignment'">
         
      </param_in>
      <param_in
         name="doc_ar_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="assigned_document"
         value="^document">
         
      </param_in>
      <param_in
         name="is_assigned_to"
         value="^contract">
         
      </param_in>
   </call_template>
   <bind
      parameter="document_assignment">
      <template_instance
         template="assigning_document"
         parameter="doc_asg">
         
      </template_instance>
   </bind>
   <comment>
      Associcate contract document with contract
   </comment>
   <call_template
      name="assigning_document"
      business_context="UK_Defence">
      <param_in
         name="doc_ass_role"
         value="'Document_assignment'">
         
      </param_in>
      <param_in
         name="doc_ar_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="assigned_document"
         value="^document">
         
      </param_in>
      <param_in
         name="is_assigned_to"
         value="^contract">
         
      </param_in>
   </call_template>
   <bind
      parameter="document_assignment">
      <template_instance
         template="assigning_document"
         parameter="doc_asg">
         
      </template_instance>
   </bind>
   <comment>
      Contract effectivity
   </comment>
   <call_template
      name="assigning_dated_effectivity"
      business_context="UK_Defence">
      <param_in
         name="start_year"
         value="@Effective_from_year">
         
      </param_in>
      <param_in
         name="start_month"
         value="@Effective_from_month">
         
      </param_in>
      <param_in
         name="start_day"
         value="@Effective_from_day">
         
      </param_in>
      <param_in
         name="start_hour"
         value="@Effective_from_hour">
         
      </param_in>
      <param_in
         name="start_minute"
         value="@Effective_from_minute">
         
      </param_in>
      <param_in
         name="start_second"
         value="@Effective_from_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="@Effective_to_year">
         
      </param_in>
      <param_in
         name="end_month"
         value="@Effective_to_month">
         
      </param_in>
      <param_in
         name="end_day"
         value="@Effective_to_day">
         
      </param_in>
      <param_in
         name="end_hour"
         value="@Effective_to_hour">
         
      </param_in>
      <param_in
         name="end_minute"
         value="@Effective_to_minute">
         
      </param_in>
      <param_in
         name="end_second"
         value="@Effective_to_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="'Effectivity_assignment'">
         
      </param_in>
      <param_in
         name="role_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="items"
         value="^contract">
         
      </param_in>
   </call_template>
   <call_template
      name="assigning_product_property"
      business_context="UK_Defence">
      <param_in
         name="property_class_name"
         value="'Contract_value'">
         
      </param_in>
      <param_in
         name="property_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="described_element"
         value="^contract">
         
      </param_in>
   </call_template>
   <bind
      parameter="target">
      <template_instance
         template="assigning_product_property"
         parameter="property">
         
      </template_instance>
   </bind>
   <call_template
      name="product_property_numeric"
      business_context="UK_Defence">
      <param_in
         name="value"
         value="@Value">
         
      </param_in>
      <param_in
         name="unit"
         value="@Currency">
         
      </param_in>
      <param_in
         name="unit_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="si_unit"
         value="'false'">
         
      </param_in>
      <param_in
         name="context"
         value="'Numerical_representation_context'">
         
      </param_in>
      <param_in
         name="context_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="property"
         value="^target">
         
      </param_in>
   </call_template>
   <comment>
      Create relationship to providing organization
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <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="contract">
            
         </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="Providing_party">
            
         </param_in_ref>
      </source>
   </assign>
   <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>
   <comment>
      Create relationship to receiving organization
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <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="contract">
            
         </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="Receiving_party">
            
         </param_in_ref>
      </source>
   </assign>
   <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>
</refpath>

© UK MOD 2010 — All rights reserved