Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: Thelonius on March 28, 2019, 10:45:45 am
-
https://vimeo.com/326292295 (https://vimeo.com/326292295)
The above is a short video with no sound showing a rudimentary workaround I have found necessary.
As an enterprise architecture consultant, I often need to show annotations on objects -- application component as an example -- that denote 'health check' or 'planning assumptions' or 'endorsement category'.
Ideally, these annotations would be unfilled shape outlines (square shapes in the bottom left corner of the rectangle notation Archimate icons is all that's required) that could be filled with a defined colour based on a tagged value: "Maturity = Red".
Of course, in the Archimate specification, the only thing of this nature that is defined is 'attribute'. Related, but not the same as the above.
Of course, adept coders who know how to do it will tell me "you can write a script to do that" -- but I'm not going to write any scripts. If I could have this functionality in Sparx - I would be willing to pay an additional AUD$200 license fee annually.
In a large enterprise business culture, there is an appropriate aversion to ad hoc individual coders creating their own personal scripts to hack and extend the core Sparx product. This is not a good model for sustainability or consistency across a broad and diverse community of literally hundreds of Sparx users in an organisation. Too often I see technical professionals creating personal script "extensions" of the Archimate meta model. Almost all of these reflect lack of understanding of how to use Archimate more than an inherent gap in the Archimate notation.
I know Sparx's primary focus is UML. The Archimate 3 add-on is pretty good. As an enterprise architect, I only use Archimate these days, although I came from a UML background. I still use Sparx UML sequence diagrams.
However, the above functionality is something done every day by enterprise architecture consultants everywhere. 99.9 percent of the time they use Visio. But multiple Visio diagrams are not maintanable over time. Talking about 'enterprise class' stuff now. Multiple thousands of applications, capabilities, services, processes, technologies. If Sparx had the above functionality, it would make Sparx a much more useful tool for practicing enterprise architects.
Just saying.
-
It wouldn't be a script. You would need to specialise ArchiMate and apply new ShapeScript.
But I wouldn't even do that. I'd add the attributes to the components and then use the legend auto-colour feature to create a head map. You can have as many legends as you like sitting in a diagram and you can turn their individual auto-colours on as you need them.
-
I've got an application landscape diagram with a number of attributes on each application component. I use attributes and colour code them with Diagram Legend. So I can have a colour coded diagram showing Maturity or showing Criticality just by activation a diagram legend.
I also have an end of life year and use Kanban diagram to show what year each application needs replacing.
Initially I added the extra attributes manually as tag values but found it too much work. Then I wrote a script to add tag values but again it was a pain to do. Eventually I create an MDG with all the archimate items and tag values I need. Seems to be the best way to do this as I can update the MDG quicker than Sparx release updates when New ArchiMate Specs appear.
-
Here's a shape script that shows that EA is already worth the extra $200.
shape main
{
h_Align="left";
v_Align="bottom";
drawparentshape();
print("#TAG:text_note#");
}
decoration top_left
{
orientation= "NW";
if(HasTag("red_circle","true"))
{
SetPenColor(255,0,0);
SetFillColor(255,0,0);
ellipse(0,0,100,100);
}
if(HasTag("red_square","true"))
{
SetPenColor(255,0,0);
SetFillColor(255,0,0);
rectangle(100,0,200,100);
}
if(HasTag("green_circle","true"))
{
SetPenColor(0,255,0);
SetFillColor(0,255,0);
ellipse(200,0,300,100);
}
}
decoration triangle_one
{
orientation= "SE";
if(HasTag("green_triangle","true"))
{
SetPenColor(0,255,0);
SetFillColor(0,255,0);
StartPath();
MoveTo(50,0);
LineTo(100,100);
LineTo(0,100);
LineTo(50,0);
EndPath();
FillAndStrokePath();
}
}
Use it by creating a redefined stereotype that adds the referenced tags and setting the new profile as active so that it overrides base ArchiMate.
https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/redefine_ster_other_prof.html (https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/redefine_ster_other_prof.html)
Take it, use it or pay one of our consultants to fully flesh it out into what you need. If you contact support I'll try to still have the package XMI around, but it's trivially simple to create.
-
Actually what we see in that silent movie is just docked elements with fancy shapes. At least it just looks like that.
q.
-
qwery
That's all it is. Just docked elements with fancy shapes.
Here's an image that may be more illustrative of what I had in mind for the future:
(https://imagizer.imageshack.com/img923/2681/74FSTt.jpg)
-
It's probably better to use stereotype properties (this good ole EA tagged values) instead. You can do quite a lot with them (more or less most of what we see in the video just a bit different). Shape scripts are limited, yes. But EA is not Powerpoint and not Visio. One get's tempted to want those drawing features also in an UML modeling tool. But finally when you have such a "egg-laying, milk-bearing woolly sow" it will be worth nothing as it can do none of the jobs the right way. And I shiver already thinking of the pile of bugs coming with those features.
q.
-
"egg-laying, milk-bearing woolly sow"
:-) Qwerty - yes, I take your point. Things I can do in Orbus iServer that are built-in to that app, I will probably never see in Sparx.
Thanks everyone for your responses. I have made tentative explorations in past to try to learn how to extend the Archimate 3 stereotype / MDG to try to do what I'd like. Which is to
- Create a small square in the bottom left-hand corner of an application component, which can be filled in with a colour based on a value in a tagged value.
None of the Sparx or independent tutorial materials I have found so far shows me how to specifically extend the Sparx Archimate 3 MDG technology. Can anyone provide a few clues how to do that? I am willing to learn how to write ShapeScript. May have to ask again how to get it filled in using a tagged value.
I'm sure this seems trivial and obvious to others.
Thanks again.
Jon
-
Actually it's not too difficult if learnt to think a bit Sparxian. You can create your own MDG extending Archimate (or which ever MDG you like) and augmenting elements with shape script. The latter have very simply and limited syntax you will easily learn if you got the idea of any Java/C syntax. It will take you a couple of days tinkering, though. Geert has a repo on github with lots of shape scripts (I guess also the native Archimate ones).
q.
-
One problem with the SPARX implementation of Archimate is that you cannot use relatedElements in your shape scripts. We use reletedElements extensivly and had to create an "Archimate look alike" subset MDG instead.
-
One problem with the SPARX implementation of Archimate is that you cannot use relatedElements in your shape scripts. We use reletedElements extensively and had to create an "Archimate look alike" subset MDG instead.
Hi Mats,
I'm not sure I understand what you're saying. Can you elaborate?
Paolo
-
None of the Sparx or independent tutorial materials I have found so far shows me how to specifically extend the Sparx Archimate 3 MDG technology. Can anyone provide a few clues how to do that? I am willing to learn how to write ShapeScript. May have to ask again how to get it filled in using a tagged value.
Message me an email address I can sent a zip file to and I'll send you an example I whipped up in a day based on one of the ArchiMate white papers. It doesn't have any shapescript in it but it will show you how to extend ArchiMate. I'll be adding some shapescript the next "rainy day" I get.
-
:-) Qwerty - yes, I take your point. Things I can do in Orbus iServer that are built-in to that app, I will probably never see in Sparx.
Orbus iServer uses a DTP app as its front end. It commits a whole other spectrum of crimes.
-
None of the Sparx or independent tutorial materials I have found so far shows me how to specifically extend the Sparx Archimate 3 MDG technology. Can anyone provide a few clues how to do that? I am willing to learn how to write ShapeScript. May have to ask again how to get it filled in using a tagged value.
The link I provided is for exactly that.
https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/redefine_ster_other_prof.html (https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/redefine_ster_other_prof.html)
The only difference is that the example is extending TOGAF::Principle instead of ArchiMate3::ArchiMate__ApplicationComponent.
In terms of the shape script.
shape main
{
drawparentshape();
}
decoration bottom_left
{
orientation= "SW";
if(HasTag("bottom_left","red"))
{
SetFillColor(255,0,0);
}
if(HasTag("bottom_left","green"))
{
SetFillColor(0,255,0);
}
if(HasTag("bottom_left","blue"))
{
SetFillColor(0,0,255);
}
Rectangle(0,0,100,100);
}
-
Paolo: What I mean with Archimate compartments!!
We use the relatedElements functionality in our models to show relations between elements in a more compact way. But with the implementation of Archimate in EA you cannot use relatedElements in a sterotyped element shapescript. It does not work!!
Maybe something that will be fixed in future versions!!
-
Paolo: What I mean with Archimate compartments!!
We use the relatedElements functionality in our models to show relations between elements in a more compact way. But with the implementation of Archimate in EA you cannot use relatedElements in a stereotyped element shapescript. It does not work!!
Maybe something that will be fixed in future versions!!
Ah... I see now.
There is no Related Elements compartment type in the Compartment Visibility diagram [Ctrl+Shift+Y]. So it's not an ArchiMate specific problem, it's a generic problem.
Put in a formal feature request (for a Related Elements Compartment type), via the links below.
Paolo
-
ArchiMate shape scripts never call drawnativeshape. So they can't draw any compartments, including compartments defined by a RelatedElement shape.
-
There is no Related Elements compartment type in the Compartment Visibility diagram [Ctrl+Shift+Y]. So it's not an ArchiMate specific problem, it's a generic problem.
ArchiMate does not have containers.