(* SCHEMA STRUCTURAL_FRAME_SCHEMA; *)
(* New for LPM/6 - See Issues 80 and 102 *) ENTITY managed_data_item_with_history SUBTYPE OF (managed_data_item); DERIVE number_of_uses : INTEGER := SIZEOF(SELF\managed_data_item.history); first_managing_application : managed_application_installation := SELF\managed_data_item.history[1] \managed_data_transaction.application; first_managing_person : person := SELF\managed_data_item.history[1] \managed_data_transaction.user.the_person; date_first_managed : calendar_date := SELF\managed_data_item.history[1] \managed_data_transaction.processing_date.date_component; last_managing_application : managed_application_installation := SELF\managed_data_item.history[number_of_uses] \managed_data_transaction.application; last_managing_person : person := SELF\managed_data_item.history[number_of_uses] \managed_data_transaction.user.the_person; date_last_managed : calendar_date := SELF\managed_data_item.history[number_of_uses] \managed_data_transaction.processing_date.date_component; WHERE WRM60 : number_of_uses > 0; (* the data must have history *) WRM61 : EXISTS(SELF\managed_data_item.originating_application); (* the data must be associated with an application *) WRM6 : first_managing_application :=: originating_application; (* the application that first managed the data must be the one that provided its unique identifier *) WRM7 : ('STRUCTURAL_FRAME_SCHEMA.MANAGED_DATA_CREATION' IN TYPEOF(SELF\managed_data_item.history[1])); (* the first data processing event that may be recorded for each instance of manged_data_item will be its creation *) WRM8 : NOT ( (original_data = TRUE) AND ('STRUCTURAL_FRAME_SCHEMA.MANAGED_DATA_IMPORT' IN TYPEOF(SELF\managed_data_item.history[1])) ); (* the data cannot be deemed as original if has been imported *) WRM37 : SIZEOF(QUERY(creation <* SELF\managed_data_item.history | ('STRUCTURAL_FRAME_SCHEMA.MANAGED_DATA_CREATION') IN TYPEOF(creation))) = 1; (* an instance of manged_data_item can only be created once *) WRM38 : NOT( ('STRUCTURAL_FRAME_SCHEMA.MANAGED_DATA_DELETED' IN TYPEOF(SELF\managed_data_item.data_item)) AND (number_of_uses = 1) ); (* an instance of managed_data_item has to be created before the data associated with it can be deleted. *) WRM39 : NOT( ('STRUCTURAL_FRAME_SCHEMA.MANAGED_DATA_DELETED' IN TYPEOF(SELF\managed_data_item.data_item)) AND (SIZEOF(QUERY(modification <* SELF\managed_data_item.history | ('STRUCTURAL_FRAME_SCHEMA.MANAGED_DATA_MODIFICATION') IN TYPEOF(modification))) < 1) ); (* there must be at least one instance of managed_data_modification associated with the managed_data_item if the engineering data has been deleted. In other words, the data processing event that deleted the engineering data is recorded by the instance of managed_data_modification. (Deletion is considered in CIS/2 to be a type of data modification.) *) END_ENTITY;
|
|
|
Generated by STEP Tools® EXPRESS to HTML Converter
2023-03-25T00:11:38-04:00