Issue 4475: Attribute.initialValue incorrectly implemented as mandatory. (cwm-rtf) Source: Adaptive (Mr. Pete Rivett, pete.rivett@adaptive.com) Nature: Revision Severity: Critical Summary: The XMI representation of the CWM metamodel does not implement the specification for the initialValue attribute of the Core.Attribute class: in the specification (section 7.3.2.1 on p7-71) it clearly states the "multiplicity: zero or one"). However in the XMI file the lower bound is 1. Note: the lower bound of 0 is consistent with the UML metamodel. The impact is that,despite the DTD not being affected, XMI imports fail when any subclass of Attribute (see below IDL changes for a list) does not specify an initialValue Expression. This affects the XMI file, the Rose model, and the IDL. It does not affect the DTD since DTDs do not reflect attribute multiplicity. Proposed resolution: Update the CWM XMI file, document ad/01-02-03 to change the value of Core.Attribute.initialValue.multiplicity.lower from 1 to 0. Update the CWM Rose model, document ad/01-02-07 for attribute initialValue of Core:Attribute to change the value of the tag 'rose2mof.multiplicity' from "1" to "0..1". Update the following in the CWM IDL files, document ad/01-02-06: In core.idl change the declaration of Attribute and its class proxy to: typedef sequence<Expression> ExpressionBag; interface AttributeClass : StructuralFeatureClass { readonly attribute AttributeSet all_of_type_attribute; readonly attribute AttributeSet all_of_class_attribute; Attribute create_attribute ( in Core::Name name, in VisibilityKind visibility, in ScopeKindBag owner_scope, in ChangeableKind changeability, in MultiplicityBag multiplicity, in OrderingKindBag ordering, in ScopeKindBag target_scope, in ExpressionBag initial_value) raises (Reflective::MofError); }; interface Attribute : AttributeClass, StructuralFeature { Expression initial_value () raises (Reflective::NotSet, Reflective::MofError); void set_initial_value (in Expression new_value) raises (Reflective::MofError); void unset_initial_value () raises (Reflective::MofError); }; // end of interface Attribute And in the following files and the following class proxies change the initial_value parameter of the 'create_x' constructor to be of type Core::ExpressionBag rather than Core::Expression: Multidimensional.idl: DimensionedObjectClass Olap.idl: MeasureClass Record.idl: FieldClass, FixedOffsetFieldClass Relational.idl: ColumnClass CML.idl: XMLAttributeClass, ElementTypeReferenceClass, TextClass InformationReporting.idl: ReportAttribute DataTypes.idl : UnionMemberClass DataMining.idl: MiningAttributeClass, NumericAttributeClass, CategoricalAttributeClass, Ordinal,AttributeClass, ApplicationAttributeClass COBOLData.idl: COBOLFieldClass, RenamesClass DMSII.idl: DataItemClass, RemapItemClass ER.idl: ErAttributeClass Essbase.idl: AliasClass, CommentClass, ConsolidationClass, CurrencyConversionClass, DataStorageClass, FormulaClass, GenerationClass, ImmediateParentClass, LevelClass, MemberNameClass, TimeBalanceClass, TwoPassCalculationClass, UDAClass, VarianceReportingClass Express.idl: VariableClass, FormulaClass, ValueSetClass, RelationClass IMSDatabase.idl: ImsFieldClass, SenFieldClass. Resolution: see below Revised Text: In the Rose model (document ad/01-02-07), change the value of the rose2mof.multiplicity value on the MOF tab of the Core::Attribute::initialValue attribute's specification sheet from "1" to "0..1". In the formal specification (document formal/2001-10-01), change multiplicity of the initialValue attribute of Attribute class on page 4-7 from "exactly one" to "zero or one". In the CWM XML file (document ad/01-02-03), change the lower bound of the Attribute::initialValue attribute at line 198 from <XMI.field>1</XMI.field> <!-- lower --> to <XMI.field>0</XMI.field> <!-- lower --> In the CWM IDL file (document ad/01-02-06), change lines 359 and 381 in the Core.idl file from: interface AttributeClass : StructuralFeatureClass { readonly attribute AttributeSet all_of_type_attribute; readonly attribute AttributeSet all_of_class_attribute; Attribute create_attribute ( in Core::Name name, in VisibilityKind visibility, in ScopeKindBag owner_scope, in ChangeableKind changeability, in MultiplicityBag multiplicity, in OrderingKindBag ordering, in ScopeKindBag target_scope, in Expression initial_value) raises (Reflective::MofError); }; interface Attribute : AttributeClass, StructuralFeature { Expression initial_value () raises (Reflective::MofError); void set_initial_value (in Expression new_value) raises (Reflective::MofError); }; // end of interface Attribute to typedef sequence ExpressionBag; interface AttributeClass : StructuralFeatureClass { readonly attribute AttributeSet all_of_type_attribute; readonly attribute AttributeSet all_of_class_attribute; Attribute create_attribute ( in Core::Name name, in VisibilityKind visibility, in ScopeKindBag owner_scope, in ChangeableKind changeability, in MultiplicityBag multiplicity, in OrderingKindBag ordering, in ScopeKindBag target_scope, in ExpressionBag initial_value) raises (Reflective::MofError); }; interface Attribute : AttributeClass, StructuralFeature { Expression initial_value () raises (Reflective::NotSet, Reflective::MofError); void set_initial_value (in Expression new_value) raises (Reflective::MofError); void unset_initial_value () raises (Reflective::MofError); }; // end of interface Attribute In the CWM IDL zip file, change the type of the initial_value parameters from "Core::Expression" to "Core::ExpressionBag" at the locations indicated in the following table: File Line No. Interface Name Constructor Name Original Parameter Text New Parameter Text COBOLData.idl 321 COBOLFieldClass create_cobolfield in Core::Expression initial_value, in Core::ExpressionBag initial_value, COBOLData.idl 504 RenamesClass create_renames in Core::Expression initial_value, in Core::ExpressionBag initial_value, DataMining.idl 225 MiningAttributeClass create_mining_attribute in Core::Expression initial_value) in Core::ExpressionBag initial_value) DataMining.idl 339 NumericAttributeClass create_numeric_attribute in Core::Expression initial_value, in Core::ExpressionBag initial_value, DataMining.idl 400 CategoricalAttributeClass create_categorical_attribute in Core::Expression initial_value) in Core::ExpressionBag initial_value) DataMining.idl 440 OrdinalAttributeClass create_ordinal_attribute in Core::Expression initial_value, in Core::ExpressionBag initial_value, DataMining.idl 762 ApplicationAttributeClass create_application_attribute in Core::Expression initial_value, in Core::ExpressionBag initial_value, DMSII.idl 230 DataItemClass create_data_item in Core::Expression initial_value, in Core::ExpressionBag initial_value, DMSII.idl 648 RemapItemClass create_remap_item in Core::Expression initial_value, in Core::ExpressionBag initial_value, DataTypes.idl 157 UnionMemberClass create_union_member in Core::Expression initial_value, in Core::ExpressionBag initial_value, ER.idl 162 ErAttributeClass create_er_attribute in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 100 AliasClass create_alias in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 134 CommentClass create_comment in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 154 ConsolidationClass create_consolidation in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 174 CurrencyConversionClass create_currency_conversion in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 194 DataStorageClass create_data_storage in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 266 FormulaClass create_formula in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 286 GenerationClass create_generation in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 306 ImmediateParentClass create_immediate_parent in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 326 CreateLevel create_level in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 346 CreateMemberName create_member_name in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 460 TimeBalanceClass create_time_balance in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 500 TwoPassCalculationClass create_two_pass_calculation in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 520 UDAClass create_uda in Core::Expression initial_value) in Core::ExpressionBag initial_value) Essbase.idl 540 VarianceReportingClass create_variance_reporting in Core::Expression initial_value) in Core::ExpressionBag initial_value) Express.idl 175 VariableClass create_variable in Core::Expression initial_value, in Core::ExpressionBag initial_value, Express.idl 214 FormulaClass create_formula in Core::Expression initial_value, in Core::ExpressionBag initial_value, Express.idl 239 ValueSetClass create_value_set in Core::Expression initial_value, in Core::ExpressionBag initial_value, Express.idl 268 RelationClass create_relation in Core::Expression initial_value, in Core::ExpressionBag initial_value, IMSDatabase.idl 848 ImsFieldClass create_ims_field in Core::Expression initial_value, in Core::ExpressionBag initial_value, IMSDatabase.idl 1191 SenFieldClass create_sen_field in Core::Expression initial_value, in Core::ExpressionBag initial_value, InformationReporting.idl 70 ReportAttributeClass create_report_attribute in Core::Expression initial_value) in Core::ExpressionBag initial_value) Multidimensional.idl 125 DimensionedObjectClass create_dimensioned_object in Core::Expression initial_value) in Core::ExpressionBag initial_value) Olap.idl 777 MeasureClass create_measure in Core::Expression initial_value) in Core::ExpressionBag initial_value) Record.idl 53 FieldClass create_field in Core::Expression initial_value, in Core::ExpressionBag initial_value, Record.idl 138 FixedOffsetFieldClass create_fixed_offset_field in Core::Expression initial_value, in Core::ExpressionBag initial_value, XML.idl 146 XMLAttributeClass create_xml_attribute in Core::Expression initial_value) in Core::ExpressionBag initial_value) XML.idl 298 ElementTypeReferenceClass create_element_type_reference in Core::Expression initial_value, in Core::ExpressionBag initial_value, XML.idl 337 TextClass create_text in Core::Expression initial_value) in Core::ExpressionBag initial_value) Actions taken: August 6, 2001: received issue May 13, 2002: closed issue Discussion: Update the CWM XMI file, document ad/01-02-03 to change the value of Core.Attribute.initialValue.multiplicity.lower from 1 to 0. Update the CWM Rose model, document ad/01-02-07 for attribute initialValue of Core:Attribute to change the value of the tag 'rose2mof.multiplicity' from "1" to "0..1". Update the following in the CWM IDL files, document ad/01-02-06: In core.idl change the declaration of Attribute and its class proxy to: typedef sequence ExpressionBag; interface AttributeClass : StructuralFeatureClass { readonly attribute AttributeSet all_of_type_attribute; readonly attribute AttributeSet all_of_class_attribute; Attribute create_attribute ( in Core::Name name, in VisibilityKind visibility, in ScopeKindBag owner_scope, in ChangeableKind changeability, in MultiplicityBag multiplicity, in OrderingKindBag ordering, in ScopeKindBag target_scope, in ExpressionBag initial_value) raises (Reflective::MofError); }; interface Attribute : AttributeClass, StructuralFeature { Expression initial_value () raises Reflective::NotSet, Reflective::MofError); void set_initial_value (in Expression new_value) raises (Reflective::MofError); void unset_initial_value () raises (Reflective::MofError); }; // end of interface Attribute And in the following files and the following class proxies change the initial_value parameter of the 'create_x' constructor to be of type Core::ExpressionBag rather than Core::Expression: Multidimensional.idl: DimensionedObjectClass Olap.idl: MeasureClass Record.idl: FieldClass FixedOffsetFieldClass Relational.idl: ColumnClass CML.idl: XMLAttributeClass, ElementTypeReferenceClass, TextClass InformationReporting.idl: ReportAttribute DataTypes.idl : UnionMemberClass DataMining.idl: MiningAttributeClass, NumericAttributeClass, CategoricalAttributeClass, Ordinal,AttributeClass, ApplicationAttributeClass COBOLData.idl: COBOLFieldClass, RenamesClass DMSII.idl: DataItemClass, RemapItemClass ER.idl: ErAttributeClass Essbase.idl: AliasClass, CommentClass, ConsolidationClass, CurrencyConversionClass, DataStorageClass, FormulaClass, GenerationClass, ImmediateParentClass, LevelClass, MemberNameClass, TimeBalanceClass, TwoPassCalculationClass, UDAClass, VarianceReportingClass Express.idl: VariableClass, FormulaClass, ValueSetClass, RelationClass IMSDatabase.idl: ImsFieldClass, SenFieldClass. End of Annotations:===== From: webmaster@omg.org Message-Id: <200108061127.f76BRYt08134@emerald.omg.org> Date: 06 Aug 2001 07:30:58 -0400 To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Issue/Bug Report Content-Type: Text/html; charset=windows-1252 X-UIDL: 6'+!!T,O!!)AMe9p'4e9 Name: Pete Rivett Company: Adaptive mailFrom: pete.rivett@adaptive.com Notification: Yes Specification: CWM Section: n/a FormalNumber: ad/01-02-03, ad/01-02-06, ad/01-02-07 Version: 1.0 RevisionDate: 02/02/2001 Page: n/a Nature: Revision Severity: Critical HTTP User Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Description Attribute.initialValue incorrectly implemented as mandatory. The XMI representation of the CWM metamodel does not implement the specification for the initialValue attribute of the Core.Attribute class: in the specification (section 7.3.2.1 on p7-71) it clearly states the "multiplicity: zero or one"). However in the XMI file the lower bound is 1. Note: the lower bound of 0 is consistent with the UML metamodel. The impact is that,despite the DTD not being affected, XMI imports fail when any subclass of Attribute (see below IDL changes for a list) does not specify an initialValue Expression. This affects the XMI file, the Rose model, and the IDL. It does not affect the DTD since DTDs do not reflect attribute multiplicity. Proposed resolution: Update the CWM XMI file, document ad/01-02-03 to change the value of Core.Attribute.initialValue.multiplicity.lower from 1 to 0. Update the CWM Rose model, document ad/01-02-07 for attribute initialValue of Core:Attribute to change the value of the tag 'rose2mof.multiplicity' from "1" to "0..1". Update the following in the CWM IDL files, document ad/01-02-06: In core.idl change the declaration of Attribute and its class proxy to: typedef sequence ExpressionBag; interface AttributeClass : StructuralFeatureClass { readonly attribute AttributeSet all_of_type_attribute; readonly attribute AttributeSet all_of_class_attribute; Attribute create_attribute ( in Core::Name name, in VisibilityKind visibility, in ScopeKindBag owner_scope, in ChangeableKind changeability, in MultiplicityBag multiplicity, in OrderingKindBag ordering, in ScopeKindBag target_scope, in ExpressionBag initial_value) raises (Reflective::MofError); }; interface Attribute : AttributeClass, StructuralFeature { Expression initial_value () raises (Reflective::NotSet, Reflective::MofError); void set_initial_value (in Expression new_value) raises (Reflective::MofError); void unset_initial_value () raises (Reflective::MofError); }; // end of interface Attribute And in the following files and the following class proxies change the initial_value parameter of the 'create_x' constructor to be of type Core::ExpressionBag rather than Core::Expression: Multidimensional.idl: DimensionedObjectClass Olap.idl: MeasureClass Record.idl: FieldClass, FixedOffsetFieldClass Relational.idl: ColumnClass CML.idl: XMLAttributeClass, ElementTypeReferenceClass, TextClass InformationReporting.idl: ReportAttribute DataTypes.idl : UnionMemberClass DataMining.idl: MiningAttributeClass, NumericAttributeClass, CategoricalAttributeClass, Ordinal,AttributeClass, ApplicationAttributeClass COBOLData.idl: COBOLFieldClass, RenamesClass DMSII.idl: DataItemClass, RemapItemClass ER.idl: ErAttributeClass Essbase.idl: AliasClass, CommentClass, ConsolidationClass, CurrencyConversionClass, DataStorageClass, FormulaClass, GenerationClass, ImmediateParentClass, LevelClass, MemberNameClass, TimeBalanceClass, TwoPassCalculationClass, UDAClass, VarianceReportingClass Express.idl: VariableClass, FormulaClass, ValueSetClass, RelationClass IMSDatabase.idl: ImsFieldClass, SenFieldClass. From: "Pete Rivett" To: Subject: CWM Issue: CWM implementation model makes initialValue mandatory Date: Tue, 7 Aug 2001 15:45:35 +0100 Message-ID: <001701c11f4f$9e6ee630$114c04c8@CHIMAY> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 Content-Type: text/plain; charset="iso-8859-1" X-UIDL: EW6e9D,=e9C^:e9^b8e9 I raised this via the OMG web site but have heard that Juergen is on vacation. This is fairly important to fix, but not enough to invoke the 'urgent' process. Unlike Issue 4408 this does not seem to be a problem with the spec but just the implementation. If we're reissuing files for 4408 could we fix this at the same time? ---------- The XMI representation of the CWM metamodel does not implement the specification for the initialValue attribute of the Core.Attribute class: in the specification (section 7.3.2.1 on p7-71) it clearly states the "multiplicity: zero or one"). However in the XMI file the lower bound is 1. Note: a lower bound of 0 is also consistent with the UML metamodel. This affects the XMI file, the Rose model, and the IDL. It does not affect the DTD since DTDs do not reflect attribute multiplicity. Proposed resolution: Update the CWM XMI file, document ad/01-02-03 to change the value of Core.Attribute.initialValue.multiplicity.lower from 1 to 0. Update the CWM Rose model, document ad/01-02-07 for attribute initialValue of Core:Attribute to change the value of the tag 'rose2mof.multiplicity' from "1" to "0..1". Update the following in the CWM IDL files, document ad/01-02-06: In core.idl change the declaration of Attribute and its class proxy to: typedef sequence ExpressionBag; interface AttributeClass : StructuralFeatureClass { readonly attribute AttributeSet all_of_type_attribute; readonly attribute AttributeSet all_of_class_attribute; Attribute create_attribute ( in Core::Name name, in VisibilityKind visibility, in ScopeKindBag owner_scope, in ChangeableKind changeability, in MultiplicityBag multiplicity, in OrderingKindBag ordering, in ScopeKindBag target_scope, in ExpressionBag initial_value) raises (Reflective::MofError); }; interface Attribute : AttributeClass, StructuralFeature { Expression initial_value () raises (Reflective::NotSet, Reflective::MofError); void set_initial_value (in Expression new_value) raises (Reflective::MofError); void unset_initial_value () raises (Reflective::MofError); }; // end of interface Attribute And in the following files and the following class proxies change the initial_value parameter of the 'create_x' constructor to be of type Core::ExpressionBag rather than Core::Expression: Multidimensional.idl: DimensionedObjectClass Olap.idl: MeasureClass Record.idl: FieldClass, FixedOffsetFieldClass Relational.idl: ColumnClass CML.idl: XMLAttributeClass, ElementTypeReferenceClass, TextClass InformationReporting.idl: ReportAttribute DataTypes.idl : UnionMemberClass DataMining.idl: MiningAttributeClass, NumericAttributeClass, CategoricalAttributeClass, Ordinal,AttributeClass, ApplicationAttributeClass COBOLData.idl: COBOLFieldClass, RenamesClass DMSII.idl: DataItemClass, RemapItemClass ER.idl: ErAttributeClass Essbase.idl: AliasClass, CommentClass, ConsolidationClass, CurrencyConversionClass, DataStorageClass, FormulaClass, GenerationClass, ImmediateParentClass, LevelClass, MemberNameClass, TimeBalanceClass, TwoPassCalculationClass, UDAClass, VarianceReportingClass Express.idl: VariableClass, FormulaClass, ValueSetClass, RelationClass IMSDatabase.idl: ImsFieldClass, SenFieldClass. Pete Rivett (pete.rivett@adaptive.com) Chief Technology Officer, Adaptive Ltd Dean Park House, 8-10 Dean Park Crescent, Bournemouth, BH1 1HL, UK Tel: +44 (0)1202 449419 Fax: +44 (0)1202 449448 http://www.adaptive.com The information contained in this email and any attached files are confidential and intended solely for the addressee(s). The e-mail may be legally privileged or prohibited from disclosure and unauthorised use. If you are not the named addressee you may not use, copy or disclose this information to any other person. If you received this message in error please notify the sender immediately. Any views or opinions presented here may be solely those of the originator and do not necessarily reflect those of the Company.