Author Topic: Sub attributes  (Read 128 times)

Glassboy

  • EA User
  • **
  • Posts: 823
  • Karma: +49/-54
    • View Profile
Sub attributes
« on: September 14, 2017, 08:41:46 am »
One of the tasks I've use class diagrams for in the past is mapping how user attributes map between various data schemas within products.  For example Microsoft Active Directory to Cisco Call Manager.  This has been useful for not only dealing with technical people, but also for showing groups like Marketing or HR why their good idea is a really bad idea.

At the moment I'm looking at mapping between Azure AD -> SCIM schema -> IDM system.  The SCIM schema has sub attributes which breaks my nice pictorial approach using classes.

Does anyone have a suggestion on how I can achieve sub attributes at least pictorially in a class diagram?


Glassboy

  • EA User
  • **
  • Posts: 823
  • Karma: +49/-54
    • View Profile
Re: Sub attributes
« Reply #1 on: September 14, 2017, 09:19:59 am »
So creating a parent for the attribute with sub-attribute doesn't work as you can't use link to element features to link to inherited attributes. 

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5755
  • Karma: +65/-64
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Sub attributes
« Reply #2 on: September 14, 2017, 10:13:48 am »
So creating a parent for the attribute with sub-attribute doesn't work as you can't use link to element features to link to inherited attributes.
Can you define sub-attribute?  It's not fully clear what you mean.

If you mean that attribute C is a complex datatype (i.e. itself has structure) then you can reference the complex data type (indicated, possibly, by a stereotype on the attribute).

We've tackled similar issues in the past.  Specifically, we needed to convert a set of structured datatypes into a "linear" outcome (converting a structured set of entities into a message).
We created attributes of the form X.Y.Z (such as Person.PostalAddress.DeliveryPoint).  That nomenclature may help.  We were then able to link the leaf attributes back to the source attributes in the structured datatype.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Glassboy

  • EA User
  • **
  • Posts: 823
  • Karma: +49/-54
    • View Profile
Re: Sub attributes
« Reply #3 on: September 14, 2017, 02:45:08 pm »
Yeah exactly.  SCIM emails is a complex datatype with the sub attributes display and type.  The suggested values for type are work, home, and other.

It looks like I can't pictorially map it tho.  I'll just have to use tables.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5755
  • Karma: +65/-64
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Sub attributes
« Reply #4 on: September 14, 2017, 04:56:48 pm »
Yeah exactly.  SCIM emails is a complex datatype with the sub attributes display and type.  The suggested values for type are work, home, and other.

It looks like I can't pictorially map it tho.  I'll just have to use tables.
Why not?  We did (if we're talking about the same thing).  Admittedly we did it all programmatically - but some of ours were nested up to 7 levels deep.

I believe you're saying you need (in one structure):
WorkEmail
WorkEmail.display
WorkEmail.type
HomeEmail
HomeEmail.display
HomeEmail.type
etc.
Is that right?  If so, what do you need to link to what?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Glassboy

  • EA User
  • **
  • Posts: 823
  • Karma: +49/-54
    • View Profile
Re: Sub attributes
« Reply #5 on: September 15, 2017, 07:33:30 am »
Yeah exactly.  SCIM emails is a complex datatype with the sub attributes display and type.  The suggested values for type are work, home, and other.

It looks like I can't pictorially map it tho.  I'll just have to use tables.
Why not?  We did (if we're talking about the same thing).  Admittedly we did it all programmatically - but some of ours were nested up to 7 levels deep.

I believe you're saying you need (in one structure):
WorkEmail
WorkEmail.display
WorkEmail.type
HomeEmail
HomeEmail.display
HomeEmail.type
etc.
Is that right?  If so, what do you need to link to what?

Paolo

Doh.  You're right.  I was trying to be too smart.  If I flatten the SCIM schema into a class it will work.  Thanks.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5755
  • Karma: +65/-64
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Sub attributes
« Reply #6 on: September 15, 2017, 09:53:15 am »
[SNIP]

Doh.  You're right.  I was trying to be too smart.  If I flatten the SCIM schema into a class it will work.  Thanks.
That's what we're here for!

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Uffe

  • EA User
  • **
  • Posts: 987
  • Karma: +76/-5
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Sub attributes
« Reply #7 on: September 18, 2017, 10:30:17 pm »
Late to the party here, but you can actually get pretty good visual results with properties (aka parts).


Let's say you have a class Outer where you want an attribute of another class Inner, and you want to show the structure of Inner inside Outer in a class diagram.

Instead of creating an attribute (or in addition if you prefer), drag-and-drop Inner onto Outer and select Property. Set the attribute/property's name, or leave it empty.

In the diagram, open Feature and Compartment Visibility for the property. Select Show element type.

So now you've got a property ": Inner" inside your Outer class, but you can't see the inner structure. Here's the trick.

Right-click the property and select Set Property Values (Ctrl-Shift-R, same as Set Run State for an object). For each sub-attribute you want to show in the diagram, specify a value. If you don't want to show a particular value, single white space works.

That's it.


Since the property is part of Outer's definition, you can repeat the same kind of thing if you want to show Outer as a property inside another class. The Inner property is also inherited as a structural element if you create additional classes with generalizations. It's all pretty neat really, if you are primarily modelling visually (as opposed to structurally) and are prepared to spend time fiddling the layout stuff.


/Uffe
My theories are always correct, just apply them to the right reality.

Glassboy

  • EA User
  • **
  • Posts: 823
  • Karma: +49/-54
    • View Profile
Re: Sub attributes
« Reply #8 on: September 19, 2017, 07:18:41 am »
Thanks I'll give that a try later.