Template:— assigning_contract (asg_ctr) Date: 2008/02/01 17:30:12
Revision: 1.20
Template: assigning_contract

XML references to the Template

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

assigning_contract

Set up a hyperlink to the template definition.
<template_ref name="assigning_contract" capability="representing_contract"/>

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_contract" capability="representing_contract">
  <param name="cnt_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="cnt_id_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="cnt_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="cnt_org_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="cnt_org_id_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="cnt_org_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="items">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_contract">
  <param_in name="cnt_id" value=""/>
  <param_in name="cnt_id_class_name" value=""/>
  <param_in name="cnt_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="cnt_org_id" value=""/>
  <param_in name="cnt_org_id_class_name" value=""/>
  <param_in name="cnt_org_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="items" value=""/>
</template_example>

assigning_contract
/assigning_contract(cnt_id='', cnt_id_class_name='', cnt_id_ecl_id='urn:plcs:rdl:std', cnt_org_id='', cnt_org_id_class_name='', cnt_org_id_ecl_id='urn:plcs:rdl:std', items='')/

Path

-- Instantiate a Contract_assignment
Contract_assignment

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

-- to the instances passed into the template through the @items
-- input parameter
Contract_assignment.items -> @items

-- Instantiate and assign a Contract to the Contract_assignment
-- NOTE - an contract entity should only be instantiated once for
-- any contract
Contract_assignment.assigned_contract -> Contract

-- Bind the Contract to the parameter ^contract.
-- The parameter is a reference parameter so the Contract
-- 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'

-- Identify the Contract
/assigning_identification(
    items=^contract,
    id=@cnt_id,
    id_class_name=@cnt_id_class_name,
    id_ecl_id=@cnt_id_ecl_id,
    org_id=@cnt_org_id,
    org_id_class_name=@cnt_org_id_class_name,
    org_id_ecl_id=@cnt_org_id_ecl_id )/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Contract.id '/IGNORE'
Contract.kind '/IGNORE'
Contract.purpose '/IGNORE'

XML representation of path

<refpath
   template="assigning_contract">
   <comment>
      Instantiate a Contract_assignment
   </comment>
   <instantiate
      entity="Contract_assignment"
      context="">
      
   </instantiate>
   <comment>
      Bind the Contract_assignment to the parameter ^contract_assgn
   </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_assgn">
      <express_entity
         entity="Contract_assignment"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      to the instances passed into the template through the @items
   </comment>
   <comment>
      input parameter
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Contract_assignment"
            attribute="items"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="items">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Instantiate and assign a Contract to the Contract_assignment
   </comment>
   <comment>
      NOTE - an contract entity should only be instantiated once for
   </comment>
   <comment>
      any contract
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Contract_assignment"
            attribute="assigned_contract"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Contract"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Bind the Contract to the parameter ^contract.
   </comment>
   <comment>
      The parameter is a reference parameter so the Contract
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="contract">
      <express_entity
         entity="Contract"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Set the Contract attributes id, purpose and kind to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Contract"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Contract"
            attribute="kind"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Contract"
            attribute="purpose"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Identify the Contract
   </comment>
   <call_template
      name="assigning_identification"
      business_context="">
      <param_in
         name="items"
         value="^contract">
         
      </param_in>
      <param_in
         name="id"
         value="@cnt_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@cnt_id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@cnt_id_ecl_id">
         
      </param_in>
      <param_in
         name="org_id"
         value="@cnt_org_id">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="@cnt_org_id_class_name">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="@cnt_org_id_ecl_id ">
         
      </param_in>
   </call_template>
</refpath>

© OASIS 2010 — All rights reserved