Associations from XML in 16.9

General discussions about code engineering

Moderator: Moderators

Associations from XML in 16.9

Postby a.griesser@prometheuscomputing.com » Mon Jan 31, 2011 10:27 pm

Hello,

When I reverse engineer an XML Schema to a model, and specify "Create class fields according to rules", and
* define a rule, that *[<<XSDsimpleType>>] creates an Attribute
* specify that if no rule matches, create class field as Association
* specify no other rules
the xsd:complex types become attributes instead of associations. Is this a known problem with 16.9, or am I going about this the wrong way?

I get all the associations I expect if I instead specify "Create class fields as Associations".

Thanks!
Art
a.griesser@prometheuscomputing.com
Forum Newbie
Forum Newbie
 
Posts: 19
Posts Rating:0
Joined: Mon Jan 03, 2011 12:57 pm

Re: Associations from XML in 16.9

Postby TomasJkn » Wed Feb 02, 2011 9:44 am

Hello Art,
I have difficulties reproducing the problem.
I have attached a small example which I used for testing (see the attached files). As can be seen,
  • xsd list elements (member1 in example), that have simple type set as type, are reversed as attributes (properties without association in UML)
  • xsd list elements (member2 in example), that have complex type set as type, are reversed as associations/association ends.

The screenshots are v17.0, but I have also tested this with v16.9 and it works in the same way.

If you could sent some sample where this problem manifests itself, I could look into it and see what went wrong.

One gocha is that by default these rules do not change already existing model layout. If you had something reversed into associations/associaiton ends and then you change those reversing settings and try to reverse again, the old layout persists. If you want to force this rule, you have to check the "Reset already created fields" checkbox during reversing operation.
Tomas Juknevicius
Senior Systems Analyst
No Magic Europe
TomasJkn
Customer Support
Customer Support
 
Posts: 63
Posts Rating:6
Joined: Mon May 10, 2010 9:24 am

Re: Associations from XML in 16.9

Postby TomasJkn » Wed Feb 02, 2011 10:00 am

files used for testing
You do not have the required permissions to view the files attached to this post.
Tomas Juknevicius
Senior Systems Analyst
No Magic Europe
TomasJkn
Customer Support
Customer Support
 
Posts: 63
Posts Rating:6
Joined: Mon May 10, 2010 9:24 am

Re: Associations from XML in 16.9

Postby a.griesser@prometheuscomputing.com » Wed Feb 02, 2011 3:32 pm

Please find attached a test schema to duplicate the problem, a snapshot of the rule (identical to yours), and a snapshot of the resulting diagram.

The rule does not do what it looks like it should do: in fact it seems to be reversed.

I'm guessing the problem is due to anonymous type (I don't like anonymous types, but my client uses them).
You do not have the required permissions to view the files attached to this post.
a.griesser@prometheuscomputing.com
Forum Newbie
Forum Newbie
 
Posts: 19
Posts Rating:0
Joined: Mon Jan 03, 2011 12:57 pm

Re: Associations from XML in 16.9

Postby a.griesser@prometheuscomputing.com » Wed Feb 02, 2011 3:36 pm

Oops, made mistake while attaching the other files, they are here.

Rule.jpg



Test2_ClassDiagram.jpg
You do not have the required permissions to view the files attached to this post.
a.griesser@prometheuscomputing.com
Forum Newbie
Forum Newbie
 
Posts: 19
Posts Rating:0
Joined: Mon Jan 03, 2011 12:57 pm


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests