Author Topic: Setting Use case as composite  (Read 2640 times)

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Setting Use case as composite
« on: April 22, 2010, 07:49:57 pm »
Hi all,

Following on from an earlier post of mine, I've managed now to add a Use Case and diagram to the model and then add the Use case to the diagram.

I've made the Use case a composite with the following
Code: [Select]
   With ParentUC
      .SubType = 8
      .Update
    End With
    parentPackage.Elements.Refresh
And although the Use case, via the right click menu Advanced, shows a tick by the Composite item, the diagram itself doesn't show the 'infinite' sign and hasn't added composite item to the model.

So.... my real question is.... what are the steps needed to make an element composite, once it's been added to a diagram.

TIA
Martin

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Setting Use case as composite
« Reply #1 on: April 22, 2010, 08:10:11 pm »
Hi Martin,

IRC It CAN'T currently be done with the API.  We users have asked for it and there was some indication that Sparx would do it soon, but I don't think it ended up coming about.

I'm currently on a VERY SLOW connection - but I believe I (or someone else) posted the necessary direct DB operations to get "all the ducks in a row" and get it to work correctly.

Have a search in (probably) this category of the forum (I think less than a year ago) and see if it's there.  If not, let me know and I'll try to dig up the code later when I'm on a faster link.

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

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Setting Use case as composite
« Reply #2 on: April 22, 2010, 08:20:26 pm »
Hi Paolo,

Thanks for the reply. Talk about building a bridge half way across the river!!! :o

Let me have a search around and see what I can find. I'll get back to you if I need your code - when you're on that faster link  ;)

Thanks again

Martin

beginner

  • Guest
Re: Setting Use case as composite
« Reply #3 on: April 23, 2010, 02:29:50 am »
The reason behind is once again EAUI. Set a UC as composite (manually) and it creates an underlying diagram. This diagram is now hard linked with the double click in the UC icon. Move the diagram in the project browser and it still opens the very diagram. If you alread HAVE a diagram inside the UC it will take the top most for the linked dbl-click. The diagram is now bound as the automatically generated one.

The problem is that there is no concept for linking a composite diagram to an element. There are two manually implicit ways. And obviously the API guy did the re-programming the wrong way. That like in many places in EA. Instead of having the internal interface in the first place and make use of it internally an externally (API) they rather re-program things twice.

b.