Book a Demo

Author Topic: Assigning values to complex data types  (Read 4284 times)

dirah

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Assigning values to complex data types
« on: February 22, 2008, 12:09:28 am »
Hallo,

I am using custom datatypes and now want to define certain values for them. Currently I don't see a possibility of defining initial values as well as run-time values for objects/instances of these custom datatypes!

I have defined some enumerations (and their valid values) and combined them as attributes in another class, so this defined class now is some kind of complex custom datatype

In the context of another class definiton I use attributes that get assigned as type the self created complex datatype. How can I define the Initial values of each of the enumerations belonging to the complex type? I can only write one certain value in the field "initial value", but that doesn't make any sense. Alternatively I tried to define values in Objects of this class (Advanced --> Define Run State) and here I also can only type in one certain value.

I hope you get my problem and can help me.

Greetings

dirah

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Assigning values to complex data types
« Reply #1 on: February 27, 2008, 07:54:08 pm »
no one got a clue?

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Assigning values to complex data types
« Reply #2 on: February 27, 2008, 11:53:05 pm »
I think the "Initial" field for attributes and the run state in EA do not support complex types. If I ever needed an initial value of a complex type, I would create an instance and draw an association from the class to this instance, giving the association's target role the same name as the attribute. Or I wouldn't use an attribute at all, but an association class with two targets (the complex type and it's initial instance). Maybe I would give the association to the instance a stereotype like "initial".

But I'm no UML guru, so don't ask me if this is really what should be done.

dirah

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Assigning values to complex data types
« Reply #3 on: February 28, 2008, 12:39:27 am »
Well I'm grateful for any idea that might help me. I will try out if this works for me!

Thanx