Book a Demo

Author Topic: Dependency and Custom departments not working  (Read 15463 times)

davidson

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Dependency and Custom departments not working
« on: August 28, 2016, 12:54:56 pm »
I think Sparx EA is an incredibly good tool, and I recommend it to all my clients, but this is an example of how incredibly frustrating it is to get value out of the documentation, and I also notice other commentaries on this.

I am trying to shapescript a UML component in 12.1, to give me a list of dependencies as a separate compartment as per the example on this link.

I have tried and tried and tried and cannot get this to work.

I have cut and pasted the code and pasted it into the target shape script, and still no response. I've refreshed the screen etc. after I loaded and no change whatsoever.

Does this work or not? if it works WHAT ADDITIONAL THINGS DO WE NEED TO DO MR SPARX?


http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/add_custom_compartments_to_ele.html
shape RelatedElement

{

     //Check if the current connector we are processing has a

     //dependency type.

     if(HasProperty("Connector.Type", "Dependency"))

     {

          //Check if the element we are currently checking is

          //the target of the current connector.

          if(HasProperty("Element.IsTarget"))

          {

               //Set the compartment Name

               SetCompartmentName("dependsOn");

               if(HasProperty("Element.Stereotype", ""))

               {

               }

               else

               {

                    AppendCompartmentText("«#Element.Stereotype#»");

               }

               AppendCompartmentText("#Element.Name#");

          }

     }

}
« Last Edit: August 29, 2016, 06:22:19 am by davidson »

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Exhibit "A", your honour
« Reply #1 on: August 28, 2016, 03:16:19 pm »
Can I suggest you use
http://www.sparxsystems.com.au/resources/user-guides/modeling/mdg-technologies.pdf?

Everything about MDG in 1 place.
But in summary, you may have to change your feature visibilities

davidson

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Exhibit "A", your honour
« Reply #2 on: August 28, 2016, 05:29:32 pm »
No - I tried that already. It all works as should when you use embedded elements, but the RelatedElements seems to work totally random.

Some time the "dependsOn" title for example comes up when you assign a note to it, sometimes it is the actual other element name with a number. Sometimes when you delete a note link, save it, reload it, the note works again, but allocate the note link again and it dissapears.

I have never got the actual representation to work on the element, even with the features, sometimes the notes link works sometimes it doesn't.


DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Exhibit "A", your honour
« Reply #3 on: August 28, 2016, 08:16:47 pm »
Hi - Sorry I stand corrected, you are right.
It is very random for me also.

Even thought all the features are set on, I tried showing the dependent elements in a compartment, just no show.
Also I tried it with the notes, some results, sometimes it worked, sometimes a number, very random.

I am guessing this is raised as a defect somewhere as it is a feature that is not working?

I'm sure this used to work though.
The embedded features and compartments work ok, its is only the RelatedElements.

No testing before release?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Exhibit "A", your honour
« Reply #4 on: August 28, 2016, 09:13:09 pm »
I also could not get this to work. The RelatedElement is rather new. So my guess is, that it just does not work and you need to report a bug. Sparx obviously lacks a test department and anything new goes out for testing to users. We call that banana software: ripens at the customer's site.

q.

P.S. Your subject rather sounds like spam so I did not look into this the first place.
« Last Edit: August 28, 2016, 09:16:10 pm by qwerty »

davidson

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Dependency and Custom departments not working
« Reply #5 on: August 29, 2016, 06:24:29 am »
Hi Qwerty,
Thanks for your confirmation, I am assuming the process for raising a bug is through the appropriate forum?

It's a shame as I spent a lot of time on this thinking there was something I was doing wrong, and we are just kicking of a project which depends on these features being available.

I changed the title - hope it suites ;-)

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Dependency and Custom departments not working
« Reply #6 on: August 29, 2016, 07:18:21 am »
These are user forums, not the place for reporting bugs.  There is a link to the bug submission page in the description of the Bugs and Issues board.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Dependency and Custom departments not working
« Reply #7 on: August 29, 2016, 09:18:39 am »
Have the compartments been enabled? From memory related element compartments are disabled by default. (ie. a technology author can provide the option, that the technology user can then choose to enable)

davidson

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Dependency and Custom departments not working
« Reply #8 on: August 29, 2016, 06:51:43 pm »
Hi Simon,
Thanks for responding.

I'm not too sure what you mean - If you are talking about enabling features etc. on the element for dependencies and realized items then yes, that has been done.

Otherwise can you please clarify?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Dependency and Custom departments not working
« Reply #9 on: August 29, 2016, 07:40:51 pm »
I also don't understand what "compartments enabled" would mean. Where can this be turned on/off?

@davidson: Report a bug using the link bottom right in the support section of this page. This is just a user forum.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Dependency and Custom departments not working
« Reply #10 on: August 30, 2016, 08:44:09 am »
Individual compartments can be enabled or disabled in both the diagram properties and the feature visibility dialog for individual elements.

So if your shape script defines three different relationships compartment types that would be displayed for an element, both those dialogs will add three checkboxes allowing a user to display them individually.

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Dependency and Custom departments not working
« Reply #11 on: August 30, 2016, 12:46:33 pm »
Hi Simon,
Yes I tried these and no change.
Can you confirm if you have got this to work in 12.1 - If I know it works, I shall  perservere, if you identify it as a bug however, I will give up.

Thanks or the feedback.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Dependency and Custom departments not working
« Reply #12 on: August 30, 2016, 07:29:44 pm »
Still I don't see how to en-/disable the compartment for the RelatedElements in any properties dialog.

q.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Dependency and Custom departments not working
« Reply #13 on: August 31, 2016, 12:31:33 pm »
Either:
  • (All elements on a diagram) Double-click on the diagram background to display the Diagram Properties dialog and, on the Elements tab, select the added checkboxes in the Show Compartments panel (are they there?)  or
  • (Single element) Right-click on the element and select the Features & Properties > Feature and Compartment Visibility option to display the Feature and Compartment Visibility dialog and again select the added checkboxes in the Show Element Compartments panel
Best Regards, Roy

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Dependency and Custom departments not working
« Reply #14 on: August 31, 2016, 01:50:15 pm »
Note that the checkboxes won't show for a custom compartment if there is nothing to display in it. So for a related elements compartment, you may need to remove one of the related elements from the current diagram
The Sparx Team
[email protected]