Template:— inventory (invntry) Context:— UK_Defence |
Date: 2009/04/17 09:34:16 Revision: 1.6
|
XML references to the Template
These can be cut and pasted into the XML as required.
inventory
Set up a hyperlink to the template definition.
<template_ref name="inventory" context="UK_Defence" />
Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="inventory" 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="version">
<param_value></param_value>
<description></description>
</param>
<param name="managed_by">
<param_value></param_value>
<description></description>
</param>
<param name="items">
<param_value></param_value>
<description></description>
</param>
</template_table>
Setup a template_example:
<template_example name="inventory">
<param_in name="id" value=""/>
<param_in name="source_organization_id" value=""/>
<param_in name="version" value=""/>
<param_in name="managed_by" value=""/>
<param_in name="items" value=""/>
</template_example>
/
inventory(id='', source_organization_id='', version='', managed_by='', items='')/
Path
-- create the inventory_item %^inventory =
Managed_resource%
^inventory.name = '/IGNORE'
^inventory.description = '/IGNORE'
-- Note the optional Managed_resource.quantity attribute is left unused -- create the associated resource_item %^inventory_items =
Resource_item%
^inventory_items.name = '/IGNORE'
^inventory_items.description = '/IGNORE'
^inventory_items.resource_items ->
@items-- Note the opt resource_items cannot relate back to the managed_resource of Inventory_item, but is able to link to the 'actual'
product, spec etc., that these items refer to. -- Associate the Resource_item above with the Inventory (Managed_resource)
^inventory.item ->
^inventory_items
-- Inventory item id /
identifier(
ID=@id,
source_organization=@source_organization_id,
type='Inventory_identification_code',
items=^inventory)/
-- Inventory item version /
identifier(
ID=@version,
source_organization=@source_organization_id,
type='Version_identification_code',
items=^inventory)/
-- not explicitly required but may need to classify different Managed resource instances. /
assigning_reference_data(
class_name='Inventory',
ecl_id='urn:plcs:rdl:UK_Defence',
items=^inventory)/
-- Managed_by Organization_or_person_in_organization_assignmentOrganization_or_person_in_organization_assignment.role = '/IGNORE'
Organization_or_person_in_organization_assignment.items ->
^inventory
Organization_or_person_in_organization_assignment.assigned_entity ->
@managed_by
The following entities are instantiated with attributes as specified:
XML representation of path
<refpath
template="inventory">
<comment>
create the inventory_item
</comment>
<bind
parameter="inventory">
<express_entity
entity="Managed_resource"
context="UK_Defence">
</express_entity>
</bind>
<assign
assignment_type="equals"
context="UK_Defence">
<target>
<bound_parameter
name="inventory.name">
</bound_parameter>
</target>
<source>
<string
value="'/IGNORE' ">
</string>
</source>
</assign>
<assign
assignment_type="equals"
context="UK_Defence">
<target>
<bound_parameter
name="inventory.description">
</bound_parameter>
</target>
<source>
<string
value="'/IGNORE' ">
</string>
</source>
</assign>
<comment>
Note the optional Managed_resource.quantity attribute is left unused
</comment>
<comment>
create the associated resource_item
</comment>
<bind
parameter="inventory_items">
<express_entity
entity="Resource_item"
context="UK_Defence">
</express_entity>
</bind>
<assign
assignment_type="equals"
context="UK_Defence">
<target>
<bound_parameter
name="inventory_items.name">
</bound_parameter>
</target>
<source>
<string
value="'/IGNORE' ">
</string>
</source>
</assign>
<assign
assignment_type="equals"
context="UK_Defence">
<target>
<bound_parameter
name="inventory_items.description">
</bound_parameter>
</target>
<source>
<string
value="'/IGNORE' ">
</string>
</source>
</assign>
<assign
assignment_type="points-to">
<target>
<bound_parameter
name="inventory_items.resource_items">
</bound_parameter>
</target>
<source>
<param_in_ref
name="items">
</param_in_ref>
</source>
</assign>
<comment>
Note the opt resource_items cannot relate back to the managed_resource of Inventory_item, but is able to link to the 'actual'
product, spec etc., that these items refer to.
</comment>
<comment>
Associate the Resource_item above with the Inventory (Managed_resource)
</comment>
<assign
assignment_type="points-to">
<target>
<bound_parameter
name="inventory.item">
</bound_parameter>
</target>
<source>
<bound_parameter
name="inventory_items">
</bound_parameter>
</source>
</assign>
<comment>
Inventory item id
</comment>
<call_template
name="identifier"
business_context="UK_Defence">
<param_in
name="ID"
value="@id">
</param_in>
<param_in
name="source_organization"
value="@source_organization_id">
</param_in>
<param_in
name="type"
value="'Inventory_identification_code'">
</param_in>
<param_in
name="items"
value="^inventory">
</param_in>
</call_template>
<comment>
Inventory item version
</comment>
<call_template
name="identifier"
business_context="UK_Defence">
<param_in
name="ID"
value="@version">
</param_in>
<param_in
name="source_organization"
value="@source_organization_id">
</param_in>
<param_in
name="type"
value="'Version_identification_code'">
</param_in>
<param_in
name="items"
value="^inventory">
</param_in>
</call_template>
<comment>
not explicitly required but may need to classify different Managed resource instances.
</comment>
<call_template
name="assigning_reference_data"
business_context="UK_Defence">
<param_in
name="class_name"
value="'Inventory'">
</param_in>
<param_in
name="ecl_id"
value="'urn:plcs:rdl:UK_Defence'">
</param_in>
<param_in
name="items"
value="^inventory">
</param_in>
</call_template>
<comment>
Managed_by
</comment>
<instantiate
entity="Organization_or_person_in_organization_assignment"
context="UK_Defence">
</instantiate>
<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>
<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="inventory">
</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="managed_by">
</param_in_ref>
</source>
</assign>
</refpath>