Template:— assigning_approval (asg_apr) Capability:assigning_approvals |
Date: 2010/03/14 16:32:08 Revision: 1.28
|
These can be cut and pasted into the XML as required.
Set up a hyperlink to the template definition.
<template_ref name="assigning_approval" capability="assigning_approvals"/>
Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_approval" capability="assigning_approvals">
<param name="status">
<param_value>State_of_approval</param_value>
<description></description>
</param>
<param name="status_ecl_id">
<param_value>urn:plcs:rdl:std</param_value>
<description></description>
</param>
<param name="items">
<param_value></param_value>
<description></description>
</param>
<param name="person_org">
<param_value></param_value>
<description></description>
</param>
</template_table>
Setup a template_example:
<template_example name="assigning_approval">
<param_in name="status" value="State_of_approval"/>
<param_in name="status_ecl_id" value="urn:plcs:rdl:std"/>
<param_in name="items" value=""/>
<param_in name="person_org" value=""/>
</template_example>
/
assigning_approval(status='State_of_approval', status_ecl_id='urn:plcs:rdl:std', items='', person_org='')/
-- Instantiate an Approval_assignment Approval_assignment-- Bind the Approval_assignment to the parameter ^approval_assgn. -- The parameter is a reference parameter so the Approval_assignment -- entity can be referred to when this template is used. %^approval_assgn =
Approval_assignment%
-- Set the Approval_assignment attribute role Approval_assignment.role = '/IGNORE'
-- Assign the Approval_assignment to the -- instances passed into the template through the @items -- input parameter (e.g. a Part_version) Approval_assignment.items ->
@items-- Instantiate Approval and assign Approval_assignment to it ApprovalApproval_assignment.assigned_approval ->
Approval-- Bind the Approval to the parameter ^approval. -- The parameter is a reference parameter so the Approval -- entity can be referred to when this template is used. %^approval =
Approval%
-- Set the Approval attributes Approval.purpose = '/IGNORE'
-- Instantiate Approval_status and assign Approval to it -- NB This mechanism is not used to represent an approval status Approval_statusApproval.status ->
Approval_status-- Set the Approval_status attribute Approval_status.status_name = '/IGNORE'
-- Set the approval status using assigning_asserted_state /
assigning_asserted_state(
assigned_to=^approval,
state_class_name=@status,
state_ecl_id=@status_ecl_id)/
-- Instantiate an Approving_person_organization and -- assign it to Approval Approving_person_organizationApproving_person_organization.authorized_approval ->
^approval
-- Bind the Approving_person_organization to the parameter ^app_pers_org. -- This parameter is a reference parameter that allows the -- Approving_person_organization entity to be referred to when this template is used. %^app_pers_org =
Approving_person_organization%
-- Assign the Approving_person_organization to the -- to the instances passed into the template through the @person_org -- input parameter (e.g. a Person_in_organization) Approving_person_organization.person_organization ->
@person_org-- Bind the State_observed to the parameter ^state_obs. -- This parameter is a reference parameter that allows the -- State_observed entity to be referred to when this template is used. %^state_obs = $assigning_asserted_state.state_obs%
-- Bind the State_assertion to the parameter ^state_assert. -- This parameter is a reference parameter that allows the -- State_assertion entity to be referred to when this template is used. %^state_assert = $assigning_asserted_state.state_assert%
-- Bind the State_definition to the parameter ^state_def. -- This parameter is a reference parameter that allows the -- State_definition entity to be referred to when this template is used. %^state_def = $assigning_asserted_state.state_def%