(*
 * $Id$
 *
 * JSDAI(TM), a way to implement STEP, ISO 10303
 * Copyright (C) 1997-2008, LKSoftWare GmbH, Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License
 * version 3 as published by the Free Software Foundation (AGPL v3).
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * JSDAI is a registered trademark of LKSoftWare GmbH, Germany
 * This software is also available under commercial licenses.
 * See also http://www.jsdai.net/
 *)

(*
   Derived from N - ISO/CD-TS - 10303- pre_defined_product_data_management_specializations - EXPRESS ARM
   by LKSoftWare GmbH for implementation purpose within IDA-STEP(TM)
*)
SCHEMA Pre_defined_product_data_management_specializations_xim;

USE FROM Activity_xim; -- ISO/TS 10303-1047
USE FROM Approval_xim; -- ISO/TS 10303-1012
USE FROM External_item_identification_assignment_xim; -- ISO/TS 10303-1128
USE FROM Person_organization_assignment_xim; -- ISO/TS 10303-1013
USE FROM Security_classification_xim; -- ISO/TS 10303-1015
USE FROM Work_request_xim; -- ISO/TS 10303-1042


-- needed by classification_association__class_system_membership
(*
USE FROM Classification_with_attributes_xim; 
USE FROM management_resources_schema(classification_role);

-- needed by group_relationship__class_hierarchy
USE FROM group_schema(group_relationship);

-- needed by applied_effectivity_assignment 
USE FROM Effectivity_application_mim;

-- needed by applied_ineffectivity_assignment
USE FROM ida_step_aim_schema(applied_ineffectivity_assignment);

-- needed by applied_identification_assignment;
USE FROM Identification_assignment_mim;

-- needed by task_element_assignment
USE FROM management_resources_schema(action_method_role);
USE FROM Task_specification_xim;
*)

USE FROM support_resource_schema(
  text,
  label);

CONSTANT
Pre_defined_activity_relationship_types : SET OF STRING := [
	'alternative',
	'decomposition',
	'derivation',
	'exclusiveness',
	'precedence',
	'sequence',
	'simultaneity'];

Pre_defined_security_classification_types : SET OF STRING := [
	'unclassified',
	'classified',
	'proprietary',
	'confidential',
	'secret',
	'top secret'];
	
Pre_defined_address_assignment_types : SET OF STRING := [
	'delivery address',
	'postal address',
	'visitor address'];
	
Pre_defined_organization_or_person_in_organization_assignment_types : SET OF STRING := [
	'alias scope',
	'author',
	'classification officer',
	'creator',
	'custodian',
	'customer',
	'design supplier',
	'editor',
	'id owner',
	'location',
	'manufacturer',
	'notified person or organization',
	'owner',
	'read access',
	'requestor',
	'supplier',
	'wholesaler',
	'write access',
	'organization in contract',
	'publisher'];

Pre_defined_approval_status_types : SET OF STRING := [
	'approved',
	'disapproved',
	'withdrawn',
	'not yet approved']	;

Pre_defined_approval_types : SET OF STRING := [
	'disposition',
	'equipment order',
	'planning'];
	
Pre_defined_date_or_date_time_assignment_types : SET OF STRING := [
	'creation',
	'installation',
	'production',
	'registration',
	'update',
	'planned',
	'actual',
	'start date',
	'end date',
	'release date',
	'request date',
	'sign off'];
	
Pre_defined_work_request_types : SET OF STRING := [
	'change of standard',
	'cost reduction',
	'customer rejection',
	'customer request',
	'durability improvement',
	'government regulation',
	'production alignment',
	'procurement alignment',
	'production relief',
	'production requirement',
	'quality improvement',
	'security reason',
	'standardization',
	'supplier request',
	'technical improvement',
	'tool improvement'];
	
Pre_defined_work_request_status_types : SET OF STRING := [
	'in work',
	'issued',
	'proposed',
	'resolved'];

Pre_defined_action_request_assignment_types : SET OF STRING := [
	'scope'];

END_CONSTANT;

 ENTITY Person_in_organization_relationship
  (* CONNOTATIONAL *) SUBTYPE OF (applied_person_and_organization_assignment);
	relating : person_and_organization;
	SELF\person_and_organization_assignment.assigned_person_and_organization RENAMED related : person_and_organization;
	relation_type : STRING;
	description : OPTIONAL STRING;
	DERIVE
	 (* Overlaps with attributes relation_type, description *)
	 SELF\person_and_organization_assignment.role : person_and_organization_role :=?;
	 (* Overlaps with relating and can't be redeclared just because of cardinality *)
	 SELF\applied_person_and_organization_assignment.items : SET[1:?] OF person_and_organization_item :=?;
 END_ENTITY;

ENTITY Pre_defined_activity_relationship
	ABSTRACT SUPERTYPE OF (ONEOF (Activity_relationship__alternative,
                                Activity_relationship__decomposition,
                                Activity_relationship__derivation,
                                Activity_relationship__exclusiveness,
                                Activity_relationship__precedence,
                                Activity_relationship__sequence,
                                Activity_relationship__simultaneity))
	SUBTYPE OF (Activity_relationship);
	WHERE
      WR1: SELF\Activity_relationship.name IN Pre_defined_activity_relationship_types;
END_ENTITY;

ENTITY Externally_defined_activity_relationship
    SUBTYPE OF (Activity_relationship);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\Activity_relationship.name IN Pre_defined_activity_relationship_types);
END_ENTITY;

ENTITY Activity_relationship__alternative
	SUBTYPE OF (Pre_defined_activity_relationship);
DERIVE
	SELF\Activity_relationship.name : label := 'alternative';
END_ENTITY;

ENTITY Activity_relationship__decomposition
	SUBTYPE OF (Pre_defined_activity_relationship);
DERIVE
	SELF\Activity_relationship.name : label := 'decomposition';
END_ENTITY;

ENTITY Activity_relationship__derivation
	SUBTYPE OF (Pre_defined_activity_relationship);
DERIVE
	SELF\Activity_relationship.name : label := 'derivation';
END_ENTITY;

ENTITY Activity_relationship__exclusiveness
	SUBTYPE OF (Pre_defined_activity_relationship);
DERIVE
	SELF\Activity_relationship.name : label := 'exclusiveness';
END_ENTITY;

ENTITY Activity_relationship__precedence
	SUBTYPE OF (Pre_defined_activity_relationship);
DERIVE
	SELF\Activity_relationship.name : label := 'precedence';
END_ENTITY;

ENTITY Activity_relationship__sequence
	SUBTYPE OF (Pre_defined_activity_relationship);
DERIVE
	SELF\Activity_relationship.name : label := 'sequence';
END_ENTITY;

ENTITY Activity_relationship__simultaneity
	SUBTYPE OF (Pre_defined_activity_relationship);
DERIVE
	SELF\Activity_relationship.name : label := 'simultaneity';
END_ENTITY;

ENTITY Pre_defined_security_classification
	ABSTRACT SUPERTYPE OF (ONEOF (Security_classification__unclassified,
                                Security_classification__classified,
                                Security_classification__proprietary,
                                Security_classification__confidential,
                                Security_classification__secret,
                                Security_classification__top_secret))
  SUBTYPE OF (security_classification);
DERIVE
  SELF\security_classification.purpose : text := ?;
--  SELF\security_classification.security_level : security_classification_level := ?;
  SELF\security_classification.name : label := ?;
  WHERE
    WR1: SELF\security_classification.security_level.name IN Pre_defined_security_classification_types;
END_ENTITY;

ENTITY Externally_defined_security_classification
    SUBTYPE OF (security_classification);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\security_classification.security_level.name IN Pre_defined_security_classification_types);
END_ENTITY;

ENTITY Security_classification__unclassified
	SUBTYPE OF (Pre_defined_security_classification);
DERIVE
  SELF\security_classification.security_level : security_classification_level := security_classification_level('unclassified');
END_ENTITY;

ENTITY Security_classification__classified
	SUBTYPE OF (Pre_defined_security_classification);
DERIVE
  SELF\security_classification.security_level : security_classification_level := security_classification_level('classified');
END_ENTITY;

ENTITY Security_classification__proprietary
	SUBTYPE OF (Pre_defined_security_classification);
DERIVE
  SELF\security_classification.security_level : security_classification_level := security_classification_level('proprietary');
END_ENTITY;

ENTITY Security_classification__confidential
	SUBTYPE OF (Pre_defined_security_classification);
DERIVE
  SELF\security_classification.security_level : security_classification_level := security_classification_level('confidential');
END_ENTITY;

ENTITY Security_classification__secret
	SUBTYPE OF (Pre_defined_security_classification);
DERIVE
  SELF\security_classification.security_level : security_classification_level := security_classification_level('secret');
END_ENTITY;

ENTITY Security_classification__top_secret
	SUBTYPE OF (Pre_defined_security_classification);
DERIVE
  SELF\security_classification.security_level : security_classification_level := security_classification_level('top secret');
END_ENTITY;

(* 2 entities are made from original ARM Pre_defined_address_assignment entity, since there are 2 alternatives in the mapping *)
ENTITY Pre_defined_address_assignment__oa
	ABSTRACT SUPERTYPE OF (ONEOF (Organizational_address__delivery_address,
                                Organizational_address__postal_address,
                                Organizational_address__visitor_address))
  SUBTYPE OF (organizational_address);
  WHERE
    WR1: SELF\organizational_address.description IN Pre_defined_address_assignment_types;
END_ENTITY;

ENTITY Externally_defined_address_assignment__oa
    SUBTYPE OF (organizational_address);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: EXISTS(SELF\organizational_address.description) AND
       NOT (SELF\organizational_address.description IN Pre_defined_address_assignment_types);
END_ENTITY;

ENTITY Organizational_address__delivery_address
  SUBTYPE OF (Pre_defined_address_assignment__oa);
DERIVE
  SELF\organizational_address.description : text := 'delivery address';
END_ENTITY;

ENTITY Organizational_address__postal_address
  SUBTYPE OF (Pre_defined_address_assignment__oa);
DERIVE
  SELF\organizational_address.description : text := 'postal address';
END_ENTITY;

ENTITY Organizational_address__visitor_address
  SUBTYPE OF (Pre_defined_address_assignment__oa);
DERIVE
  SELF\organizational_address.description : text := 'visitor address';
END_ENTITY;

ENTITY Pre_defined_address_assignment__paoa
	ABSTRACT SUPERTYPE OF (ONEOF (Person_and_organization_address__delivery_address,
                                Person_and_organization_address__postal_address,
                                Person_and_organization_address__visitor_address))
  SUBTYPE OF (person_and_organization_address);
  WHERE
    WR1: SELF\organizational_address.description IN Pre_defined_address_assignment_types;
END_ENTITY;

ENTITY Externally_defined_address_assignment__paoa
    SUBTYPE OF (person_and_organization_address);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: EXISTS(SELF\organizational_address.description) AND
       NOT (SELF\organizational_address.description IN Pre_defined_address_assignment_types);
END_ENTITY;

ENTITY Person_and_organization_address__delivery_address
  SUBTYPE OF (Pre_defined_address_assignment__paoa);
DERIVE
  SELF\organizational_address.description : text := 'delivery address';
END_ENTITY;

ENTITY Person_and_organization_address__postal_address
  SUBTYPE OF (Pre_defined_address_assignment__paoa);
DERIVE
  SELF\organizational_address.description : text := 'postal address';
END_ENTITY;

ENTITY Person_and_organization_address__visitor_address
  SUBTYPE OF (Pre_defined_address_assignment__paoa);
DERIVE
  SELF\organizational_address.description : text := 'visitor address';
END_ENTITY;

(* 2 entities are made from original ARM Pre_defined_organization_or_person_in_organization_assignment entity, since there are 2 alternatives in the mapping *)
ENTITY Pre_defined_organization_or_person_in_organization_assignment__aoa
	ABSTRACT SUPERTYPE OF (ONEOF (Applied_organization_assignment__alias_scope,
								Applied_organization_assignment__author,
                                Applied_organization_assignment__classification_officer,
								Applied_organization_assignment__creator,                                
								Applied_organization_assignment__custodian,								
                                Applied_organization_assignment__customer,
								Applied_organization_assignment__design_supplier,                                
								Applied_organization_assignment__editor,								
                                Applied_organization_assignment__id_owner,
								Applied_organization_assignment__location,                                
								Applied_organization_assignment__manufacturer,
								Applied_organization_assignment__notified_person_or_organization,								
                                Applied_organization_assignment__owner,
								Applied_organization_assignment__read_access,
								Applied_organization_assignment__requestor,                                
								Applied_organization_assignment__supplier,								
                                Applied_organization_assignment__wholesaler,
								Applied_organization_assignment__write_access,                                
								Applied_organization_assignment__organization_in_contract,
								Applied_organization_assignment__concerned_organization,
								Applied_organization_assignment__supplying_organization,
								Applied_organization_assignment__publisher))
  SUBTYPE OF (applied_organization_assignment);
  WHERE
    WR1: SELF\organization_assignment.role.name IN Pre_defined_organization_or_person_in_organization_assignment_types; 
END_ENTITY;

ENTITY Externally_defined_organization_or_person_in_organization_assignment__aoa
  SUBTYPE OF (applied_organization_assignment);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\organization_assignment.role.name IN Pre_defined_organization_or_person_in_organization_assignment_types); 
END_ENTITY;

ENTITY Applied_organization_assignment__concerned_organization
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('concerned organization'); 
END_ENTITY;

ENTITY Applied_organization_assignment__supplying_organization
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('supplying organization'); 
END_ENTITY;

ENTITY Applied_organization_assignment__alias_scope
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('alias scope'); 
END_ENTITY;

ENTITY Applied_organization_assignment__author
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('author'); 
END_ENTITY;

ENTITY Applied_organization_assignment__classification_officer
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('classification officer'); 
END_ENTITY;

ENTITY Applied_organization_assignment__creator
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('creator'); 
END_ENTITY;

ENTITY Applied_organization_assignment__custodian
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('custodian'); 
END_ENTITY;

ENTITY Applied_organization_assignment__design_supplier
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('design supplier'); 
END_ENTITY;

ENTITY Applied_organization_assignment__editor
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('editor'); 
END_ENTITY;

ENTITY Applied_organization_assignment__id_owner
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('id owner'); 
END_ENTITY;

ENTITY Applied_organization_assignment__location
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('location'); 
END_ENTITY;

ENTITY Applied_organization_assignment__manufacturer
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('manufacturer'); 
END_ENTITY;

ENTITY Applied_organization_assignment__notified_person_or_organization
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('notified person or organization'); 
END_ENTITY;

ENTITY Applied_organization_assignment__owner
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('owner'); 
END_ENTITY;

ENTITY Applied_organization_assignment__read_access
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('read access'); 
END_ENTITY;

ENTITY Applied_organization_assignment__requestor
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('requestor'); 
END_ENTITY;

ENTITY Applied_organization_assignment__supplier
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('supplier'); 
END_ENTITY;

ENTITY Applied_organization_assignment__wholesaler
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('wholesaler'); 
END_ENTITY;

ENTITY Applied_organization_assignment__write_access
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('write access'); 
END_ENTITY;

ENTITY Applied_organization_assignment__organization_in_contract
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('organization in contract'); 
END_ENTITY;

ENTITY Applied_organization_assignment__customer
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('customer'); 
END_ENTITY;

ENTITY Applied_organization_assignment__scope
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('scope'); 
END_ENTITY;

ENTITY Applied_organization_assignment__publisher
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__aoa);
DERIVE
  SELF\organization_assignment.role : organization_role := organization_role('publisher'); 
END_ENTITY;

ENTITY Pre_defined_organization_or_person_in_organization_assignment__apaoa
	ABSTRACT SUPERTYPE OF (ONEOF (Applied_person_and_organization_assignment__alias_scope,
								Applied_person_and_organization_assignment__author,
                                Applied_person_and_organization_assignment__classification_officer,
								Applied_person_and_organization_assignment__creator,                                
								Applied_person_and_organization_assignment__custodian,								
                                Applied_person_and_organization_assignment__customer,
								Applied_person_and_organization_assignment__design_supplier,                                
								Applied_person_and_organization_assignment__editor,								
                                Applied_person_and_organization_assignment__id_owner,
								Applied_person_and_organization_assignment__location,                                
								Applied_person_and_organization_assignment__manufacturer,
								Applied_person_and_organization_assignment__notified_person_or_organization,								
                                Applied_person_and_organization_assignment__owner,
								Applied_person_and_organization_assignment__read_access,
								Applied_person_and_organization_assignment__requestor,
								Applied_person_and_organization_assignment__supplier,								
                                Applied_person_and_organization_assignment__wholesaler,
								Applied_person_and_organization_assignment__write_access,                                
								Applied_person_and_organization_assignment__organization_in_contract,
								Applied_person_and_organization_assignment__publisher))
  SUBTYPE OF (applied_person_and_organization_assignment);
  WHERE
    WR1: SELF\person_and_organization_assignment.role.name IN Pre_defined_organization_or_person_in_organization_assignment_types; 
END_ENTITY;

ENTITY Externally_defined_organization_or_person_in_organization_assignment__apaoa
  SUBTYPE OF (applied_person_and_organization_assignment);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\person_and_organization_assignment.role.name IN Pre_defined_organization_or_person_in_organization_assignment_types); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__alias_scope
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('alias_scope'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__author
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('author'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__classification_officer
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('classification officer'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__creator
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('creator'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__custodian
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('custodian'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__design_supplier
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('design supplier'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__editor
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('editor'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__id_owner
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('id owner'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__location
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('location'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__manufacturer
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('manufacturer'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__notified_person_or_organization
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('notified person or organization'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__owner
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('owner'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__read_access
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('read access'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__requestor
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('requestor'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__supplier
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('supplier'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__wholesaler
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('wholesaler'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__write_access
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('write access'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__organization_in_contract
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('organization in contract'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__customer
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('customer'); 
END_ENTITY;

ENTITY Applied_person_and_organization_assignment__publisher
  SUBTYPE OF (Pre_defined_organization_or_person_in_organization_assignment__apaoa);
DERIVE
  SELF\person_and_organization_assignment.role : person_and_organization_role := person_and_organization_role('publisher'); 
END_ENTITY;

ENTITY Pre_defined_approval_status
	ABSTRACT SUPERTYPE OF (ONEOF (Approval_status__approved,
                                Approval_status__disapproved,
								Approval_status__withdrawn,                                
								Approval_status__not_yet_approved))
  SUBTYPE OF (approval_status);
  WHERE
    WR1: SELF\Approval_status.name IN Pre_defined_approval_status_types;
END_ENTITY;

ENTITY Externally_defined_approval_status
  SUBTYPE OF (approval_status);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\approval_status.name IN Pre_defined_approval_status_types);
END_ENTITY;

ENTITY Approval_status__approved
  SUBTYPE OF (Pre_defined_approval_status);
DERIVE
  SELF\approval_status.name : label := 'approved';
END_ENTITY;

ENTITY Approval_status__disapproved
  SUBTYPE OF (Pre_defined_approval_status);
DERIVE
  SELF\approval_status.name : label := 'disapproved';
END_ENTITY;

ENTITY Approval_status__withdrawn
  SUBTYPE OF (Pre_defined_approval_status);
DERIVE
  SELF\approval_status.name : label := 'withdrawn';
END_ENTITY;

ENTITY Approval_status__not_yet_approved
  SUBTYPE OF (Pre_defined_approval_status);
DERIVE
  SELF\approval_status.name : label := 'not yet approved';
END_ENTITY;

ENTITY Pre_defined_approval
	ABSTRACT SUPERTYPE OF (ONEOF (Approval__disposition,
                                Approval__equipment_order,
								Approval__planning))
  SUBTYPE OF (Approval_armx);
WHERE
  WR1: SELF\Approval_armx.purpose IN Pre_defined_approval_types;
END_ENTITY;

ENTITY Externally_defined_approval
  SUBTYPE OF (Approval_armx);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\Approval_armx.purpose IN Pre_defined_approval_types);
END_ENTITY;

ENTITY Approval__disposition
  SUBTYPE OF (Pre_defined_approval);
DERIVE
  SELF\Approval.level : label := 'disposition';
END_ENTITY;

ENTITY Approval__equipment_order
  SUBTYPE OF (Pre_defined_approval);
DERIVE
  SELF\Approval.level : label := 'equipment order';
END_ENTITY;

ENTITY Approval__planning
  SUBTYPE OF (Pre_defined_approval);
DERIVE
  SELF\Approval.level : label := 'planning';
END_ENTITY;

(* 2 entities are made from original ARM Pre_defined_date_or_date_time_assignment entity, since there are 2 alternatives in the mapping *)
ENTITY Pre_defined_date_or_date_time_assignment__da
	ABSTRACT SUPERTYPE OF (ONEOF (Applied_date_assignment__creation,
                                Applied_date_assignment__installation,
                                Applied_date_assignment__production,
                                Applied_date_assignment__registration,
                                Applied_date_assignment__update,
                                Applied_date_assignment__planned,
                                Applied_date_assignment__actual,
                                Applied_date_assignment__start_date,
                                Applied_date_assignment__end_date,
                                Applied_date_assignment__release_date,
								Applied_date_assignment__request_date,
								Applied_date_assignment__sign_off))
  SUBTYPE OF (applied_date_assignment);
  WHERE
    WR1: SELF\date_assignment.role.name IN Pre_defined_date_or_date_time_assignment_types;
END_ENTITY;

ENTITY Externally_defined_date_or_date_time_assignment__da
  SUBTYPE OF (applied_date_assignment);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\date_assignment.role.name IN Pre_defined_date_or_date_time_assignment_types);
END_ENTITY;

ENTITY Applied_date_assignment__creation
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('creation');
END_ENTITY;

ENTITY Applied_date_assignment__installation
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('installation');
END_ENTITY;

ENTITY Applied_date_assignment__production
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('production');
END_ENTITY;

ENTITY Applied_date_assignment__registration
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('registration');
END_ENTITY;

ENTITY Applied_date_assignment__update
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('update');
END_ENTITY;

ENTITY Applied_date_assignment__planned
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('planned');
END_ENTITY;

ENTITY Applied_date_assignment__actual
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('actual');
END_ENTITY;

ENTITY Applied_date_assignment__start_date
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('start date');
END_ENTITY;

ENTITY Applied_date_assignment__end_date
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('end date');
END_ENTITY;

ENTITY Applied_date_assignment__release_date
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('release date');
END_ENTITY;

ENTITY Applied_date_assignment__request_date
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('request date');
END_ENTITY;

ENTITY Applied_date_assignment__sign_off
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__da);
DERIVE
  SELF\date_assignment.role : date_role := date_role('sign off');
END_ENTITY;

ENTITY Pre_defined_date_or_date_time_assignment__data
	ABSTRACT SUPERTYPE OF (ONEOF (Applied_date_and_time_assignment__creation,
                                Applied_date_and_time_assignment__installation,
                                Applied_date_and_time_assignment__production,
                                Applied_date_and_time_assignment__registration,
                                Applied_date_and_time_assignment__update,
                                Applied_date_and_time_assignment__planned,
                                Applied_date_and_time_assignment__actual,
                                Applied_date_and_time_assignment__start_date,
                                Applied_date_and_time_assignment__end_date,
                                Applied_date_and_time_assignment__release_date,
								Applied_date_and_time_assignment__request_date,
								Applied_date_and_time_assignment__sign_off))
  SUBTYPE OF (applied_date_and_time_assignment);
  WHERE
    WR1: SELF\date_and_time_assignment.role.name IN Pre_defined_date_or_date_time_assignment_types;
END_ENTITY;

ENTITY Externally_defined_date_or_date_time_assignment__data
  SUBTYPE OF (applied_date_and_time_assignment);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\date_and_time_assignment.role.name IN Pre_defined_date_or_date_time_assignment_types);
END_ENTITY;

ENTITY Applied_date_and_time_assignment__creation
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('creation');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__installation
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('installation');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__production
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('production');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__registration
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('registration');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__update
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('update');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__planned
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('planned');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__actual
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('actual');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__start_date
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('start date');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__end_date
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('end date');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__release_date
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('release date');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__request_date
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('request date');
END_ENTITY;

ENTITY Applied_date_and_time_assignment__sign_off
  SUBTYPE OF (Pre_defined_date_or_date_time_assignment__data);
DERIVE
  SELF\date_and_time_assignment.role : date_time_role := date_time_role('sign off');
END_ENTITY;

ENTITY Pre_defined_work_request
	ABSTRACT SUPERTYPE OF (ONEOF (Versioned_action_request__change_of_standard,
                                Versioned_action_request__cost_reduction,
                                Versioned_action_request__customer_rejection,
                                Versioned_action_request__customer_request,
                                Versioned_action_request__durability_improvement,
                                Versioned_action_request__government_regulation,
                                Versioned_action_request__production_alignment,
                                Versioned_action_request__procurement_alignment,
                                Versioned_action_request__production_relief,
                                Versioned_action_request__production_requirement,
                                Versioned_action_request__quality_improvement,
                                Versioned_action_request__security_reason,
                                Versioned_action_request__standardization,
                                Versioned_action_request__supplier_request,
                                Versioned_action_request__technical_improvement,
								Versioned_action_request__tool_improvement))
  SUBTYPE OF (versioned_action_request);
WHERE
  WR1: SELF\versioned_action_request.purpose IN Pre_defined_work_request_types;
END_ENTITY;

ENTITY Externally_defined_work_request
  SUBTYPE OF (versioned_action_request);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\versioned_action_request.purpose IN Pre_defined_work_request_types);
END_ENTITY;

ENTITY Versioned_action_request__change_of_standard
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'change of standard';
END_ENTITY;

ENTITY Versioned_action_request__cost_reduction
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'cost reduction';
END_ENTITY;

ENTITY Versioned_action_request__customer_rejection
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'customer rejection';
END_ENTITY;

ENTITY Versioned_action_request__customer_request
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'customer request';
END_ENTITY;

ENTITY Versioned_action_request__durability_improvement
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'durability improvement';
END_ENTITY;

ENTITY Versioned_action_request__government_regulation
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'government regulation';
END_ENTITY;

ENTITY Versioned_action_request__production_alignment
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'production alignment';
END_ENTITY;

ENTITY Versioned_action_request__procurement_alignment
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'procurement alignment';
END_ENTITY;

ENTITY Versioned_action_request__production_relief
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'production relief';
END_ENTITY;

ENTITY Versioned_action_request__production_requirement
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'production requirement';
END_ENTITY;

ENTITY Versioned_action_request__quality_improvement
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'quality improvement';
END_ENTITY;

ENTITY Versioned_action_request__security_reason
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'security reason';
END_ENTITY;

ENTITY Versioned_action_request__standardization
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'standardization';
END_ENTITY;

ENTITY Versioned_action_request__supplier_request
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'supplier request';
END_ENTITY;

ENTITY Versioned_action_request__technical_improvement
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'technical improvement';
END_ENTITY;

ENTITY Versioned_action_request__tool_improvement
  SUBTYPE OF (Pre_defined_work_request);
DERIVE
  SELF\versioned_action_request.purpose : text := 'tool improvement';
END_ENTITY;
  
ENTITY Pre_defined_work_request_status
	ABSTRACT SUPERTYPE OF (ONEOF (Action_request_status__in_work,
                                Action_request_status__issued,
                                Action_request_status__proposed,
								Action_request_status__resolved))
  SUBTYPE OF (action_request_status);
  WHERE
    WR1: SELF\action_request_status.status IN Pre_defined_work_request_status_types;
END_ENTITY;

ENTITY Externally_defined_work_request_status
  SUBTYPE OF (action_request_status);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: SELF\action_request_status.status IN Pre_defined_work_request_status_types;
END_ENTITY;

ENTITY Action_request_status__in_work
  SUBTYPE OF (Pre_defined_work_request_status);
DERIVE
  SELF\action_request_status.status : label := 'in work';
END_ENTITY;

ENTITY Action_request_status__issued
  SUBTYPE OF (Pre_defined_work_request_status);
DERIVE
  SELF\action_request_status.status : label := 'issued';
END_ENTITY;

ENTITY Action_request_status__proposed
  SUBTYPE OF (Pre_defined_work_request_status);
DERIVE
  SELF\action_request_status.status : label := 'proposed';
END_ENTITY;

ENTITY Action_request_status__resolved
  SUBTYPE OF (Pre_defined_work_request_status);
DERIVE
  SELF\action_request_status.status : label := 'resolved';
END_ENTITY;

ENTITY Pre_defined_action_request_assignment
	ABSTRACT SUPERTYPE OF (Applied_action_request_assignment__scope)
  SUBTYPE OF (applied_action_request_assignment);
  WHERE
    WR1: SELF\action_request_assignment.role.name IN Pre_defined_action_request_assignment_types;
END_ENTITY;

ENTITY Externally_defined_action_request_assignment
  SUBTYPE OF (applied_action_request_assignment);
INVERSE
  source : External_source_identification FOR item;
WHERE
  WR1: NOT (SELF\action_request_assignment.role IN Pre_defined_action_request_assignment_types);
END_ENTITY;

ENTITY Applied_action_request_assignment__scope
  SUBTYPE OF (Pre_defined_action_request_assignment);
DERIVE
  SELF\action_request_assignment.role : object_role := object_role('scope', ?);
END_ENTITY;

TYPE pdpdms_external_identification_item_armx = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON external_identification_item WITH (
      Externally_defined_activity_relationship,
      Externally_defined_security_classification,
      Externally_defined_address_assignment__oa,
      Externally_defined_address_assignment__paoa,
      Externally_defined_organization_or_person_in_organization_assignment__aoa,
      Externally_defined_organization_or_person_in_organization_assignment__apaoa,
      Externally_defined_approval_status,
      Externally_defined_approval,
      Externally_defined_date_or_date_time_assignment__da,
      Externally_defined_date_or_date_time_assignment__data,
      Externally_defined_work_request,
      Externally_defined_work_request_status,
	  Externally_defined_action_request_assignment);
END_TYPE;

SUBTYPE_CONSTRAINT pdpdms_activity_relationship_subtypes FOR Activity_relationship;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_activity_relationship,
           Externally_defined_activity_relationship);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_security_classification_subtypes FOR Security_classification;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_security_classification,
           Externally_defined_security_classification);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_organizational_address_subtypes FOR organizational_address;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_address_assignment__oa,
           Externally_defined_address_assignment__oa);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_person_and_organization_address_subtypes FOR person_and_organization_address;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_address_assignment__paoa,
           Externally_defined_address_assignment__paoa);
END_SUBTYPE_CONSTRAINT;


SUBTYPE_CONSTRAINT pdpdms_applied_organization_assignment_subtypes FOR applied_organization_assignment;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_organization_or_person_in_organization_assignment__aoa,
           Externally_defined_organization_or_person_in_organization_assignment__aoa);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_applied_person_and_organization_assignment_subtypes FOR applied_person_and_organization_assignment;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_organization_or_person_in_organization_assignment__apaoa,
           Externally_defined_organization_or_person_in_organization_assignment__apaoa);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_approval_status_subtypes FOR Approval_status;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_approval_status,
           Externally_defined_approval_status);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_approval_subtypes FOR Approval;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_approval,
           Externally_defined_approval);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_applied_date_assignment_subtypes FOR applied_date_assignment;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_date_or_date_time_assignment__da,
           Externally_defined_date_or_date_time_assignment__da);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_applied_date_and_time_assignment_subtypes FOR applied_date_and_time_assignment;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_date_or_date_time_assignment__data,
           Externally_defined_date_or_date_time_assignment__data);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_versioned_action_request_subtypes FOR versioned_action_request;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_work_request,
           Externally_defined_work_request);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_action_request_status_subtypes FOR action_request_status;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_work_request_status,
           Externally_defined_work_request_status);
END_SUBTYPE_CONSTRAINT;

SUBTYPE_CONSTRAINT pdpdms_applied_action_request_assignment_subtypes FOR applied_action_request_assignment;
	ABSTRACT SUPERTYPE;
    ONEOF (Pre_defined_action_request_assignment,
           Externally_defined_action_request_assignment);
END_SUBTYPE_CONSTRAINT;

END_SCHEMA;
