Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Uffe

Pages: 1 2 [3] 4 5 ... 124
31
General Board / Re: Parameter customization IN/INOUT/OUT/RETURN
« on: December 12, 2020, 02:38:34 am »
Hello Yan,

Pretty sure that's a no. Parameter kinds come from the standard I believe, as opposed to things like requirement types, so there'd be semantics defined for them that you can't extend.

/Uffe

32
Not only that, but two elements can share the same target diagram, while two packages cannot.

/U

33
Is there a way to find the diagram by package and then list all the elements of the diagram? I am trying to do that in c#

There is no "the" diagram relating to a package, but the Package class has a .Diagrams collection which you can loop through to find the diagram you want, and then iterate over that Diagram's .DiagramObjects to retrieve the elements shown on the diagram.

HTH,


/Uffe

34
Hello,

Sounds like you're asking about how some specific source code concept is expressed in UML. There isn't an answer for that: UML is source-language-agnostic.
(They did standardize a profile for Java at some stage, but they haven't maintained it.)

So precisely how UML constructs relate to source code concepts like pointers, references, etc is undefined. Unless you're working with models reverse-engineered by EA, you'll just have to decide how to model those concepts yourself.

HTH,


/Uffe

35
Uml Process / Re: How to create a "has"-relationship between 2 objects?
« on: December 11, 2020, 09:49:09 pm »
...and then in the objects set the run state of the containing object to the name of the contained object...
What do you exactly mean here? Is it something how I can tweak the accociation arrow between two objects?

No, but you can name the instance of class B and then set that as the corresponding attribute's value in the A instance's run state.

Quote
Furthermore, I tried a Composite Structure diagram but it also has no support of "has"-relationship arrows between objects. I just wonder what such "property" stuff means, which makes no sense if you have parsed C++ classes with attributes and methods and create object instances from them.

In UML, such relationships are expressed using classes. Since every instance of a class will "have" the same contents, there's no point in expressing that in object diagrams.

/U

36
Uml Process / Re: How to create a "has"-relationship between 2 objects?
« on: December 11, 2020, 08:55:51 pm »
Hello,

The "has" relationship is normally expressed in UML using a composition or aggregation, but it's a property of classes, not objects.
With objects what you can do is express the relationship at the class level as attributes, and then in the objects set the run state of the containing object to the name of the contained object. This has to be maintained manually, there's no automation that helps you keep it updated.

HTH,


/Uffe

37
Suggestions and Requests / Re: linking diagram notes
« on: December 09, 2020, 02:51:52 am »
If you've got a Note element in a diagram, you can right-click it and select Advanced - Link to Diagram Note. This will lock the Note to the diagram's notes property and auto-update the Note when the notes change.

/Uffe

38
I want to show the spatial structure of the program, which means the class instances living in the program, independently of the time.
This doesn't make sense. Instances are by nature time-dependent: they get created, exist for a time and then they are deleted. Classes are independent of time, but instances are not.

Quote
And I want to show important callstacks, starting from one object via several method calls to another object aiming in a target method call.
So the start point of the arrow is in my example A::op1() but the end point is B::op3().
This is not permitted in UML. Connectors link elements, they do not link operations (or attributes).

EA does have the Link to Element Feature function, which allows you to pseudo-link a connector to an attribute or an operation, rather than to the element as a whole (pretty much a direct violation of UML syntax). But that only works with attributes/operation defined in the element -- ie classifiers, not instances, and not inherited features. So if you want to use that function you'll have to use classes, not objects.

/Uffe

39
Hey guys,


Operations exist in UML, but not as first-order entities. Meaning they're not represented by elements and can't be the endpoints of connectors. This isn't a problem in and of itself -- you can simply decide to use some element to represent your operations -- unless you have your operations already represented in the proper UML way.

If you've got the operations modelled as UML operations (in class elements), you can use CallOperation Actions in an activity diagram, associating the actions with the actual operations as if they were classifiers. You can also drag-and-drop the operations directly onto the diagram to create the actions.

These actions don't represent the operations, it is important to note, but the operation calls. But you can use this notation with all the other features of activity diagrams, so you can create loops, branches (decisions), etc etc. There is some level of automation so if you rename an operation its actions sort of change name as well, but I don't think you can automatically get pins for the operation parameters or anything like that. But if your focus is the control flow rather than the data flow this shouldn't be too much of a concern.

HTH,


/Uffe

40
General Board / Re: Evaluating a manual version control scheme
« on: December 06, 2020, 11:31:10 pm »
Hello all,


As Geert mentioned earlier, I favour the reusable asset service for this type of scenario. However, nothing in this world is free or even cheap, and you do need to carefully consider your requirements and your options.

Paolo and Qwerty have both expressed the opinion that version control just isn't appropriate for models. With this I disagree in principle.
It's not that you can't do version control for models, it's more that any version control system out there (Git, Subversion, etc etc) is designed to manage versions of source code -- ie text files, individually and as collections. This doesn't work well with EA's XMI structure because one project does not equal one XMI file, and the XMI files from one project are interdependent to a degree that source code files are not.

In the case of source code, the files are presented to a person through an editor (eg Visual Studio). While there may be dependencies between files that need to be resolved in order for the code to compile, crucially, the editor can show each file as is: the text is the relevant data, and the editor does not need to interpret it in order to show it.
By contrast, EA in its role as model editor is not able to show the source data as it is. The model data has to be interpreted in order for EA to draw the contents of each diagram. And an XMI file may well be incomplete in the sense that it may contain diagrams whose included elements are not defined in that same XMI file.

Any tool that supports multiple version-controlled files (again, Visual Studio is a good example) also has a concept of a collection of such files (in Visual Studio, this is realized by projects and solutions). This provides a scope for dependency management, and not only that, the collection itself can be version-controlled, meaning you can manage whole collections of source code in terms of releasing, branching, merging, etc.
EA's corresponding concept is the project, but crucially, an EA project is not a collection of files. It is instead a database. What you version-control with EA is only the model content, but there are masses of critical information that is not included in the model content but only stored as configuration data in the database (and indeed, some of it in the registry and some of it in the file system). This means you can't manage the collection of XMI files as a self-contained whole.

Both these issues, the interpretation by the editor and the absence of critical information in the XMI data, make a version control scheme based on multiple XMI files per EA project fundamentally unsound. Any setup based on this will require a high degree of manual synchronization between participants -- basically, going back to source code version control c:a 1980.


Modesto adds some good insights, but I do have to take issue with one point.

I think it is important to distinguish between version control, (change) auditing, reusable assets - such as patterns - and documentary baselines.

As both qwerty and Paolo have explain, models and, in particular, enterprise models are not best suited for version control. At best, version control gives you a fall-back position in case something happens to the repository.

In addition to distinguishing between version control, auditing and baselines, it is also vital to distinguish backups. If you are using version control with the aim to have that serve as your backup strategy, you will lose your data. Backing up data is a completely separate proposition to tracking changes in it. Do not confuse these. Do not think that setting up a version control system means you've solved your backup problem. It doesn't. You will lose your data.


So that's by way of a preamble. :)

Moving on to
I would probably say that what we want to get out of this is:
  • Auditing, definitely. In that we want the ability to see the history of changes, and revert them if necessary. I understand that this is less practical with the complex structures of some models
  • The ability to take a design at a point in time a branch off from it. Then the branched version may or may not make its way back to the original design
  • Not just re-using assets, but being able to link them to their attributes, even if those attributes change. It sounds like I may need to check out RAS, which I don't know too much about yet for this one.

First off, "assets" in RAS can mean a few different things, but the core functionality is for packages. And yes, it is based on XMI export. But there is (some level of) dependency management.

Secondly, auditing and change tracking are not the same thing. Modesto was talking about EA's model audit feature. He also mentioned that it doesn't work very well, and I certainly agree with that.
One of the things auditing should do is tell you who made what change when. EA's auditing functionality does that, but none of its other features in this space (version control, baselines, RAS) do. If that is a requirement, auditing is the only way to go. And I would urge you not to go down this path: it's a performance nightmare and doesn't work well enough.

If you want to compare versions and revert them, you need baselines or RAS. In earlier versions of EA, baselines were stored in the project, but more recent versions have introduced the option of storing them in RAS. I would recommend this over in-project storage.

RAS also provides a rudimentary form of dependency management, so that when importing a package from RAS, EA will offer to also import its dependents. Note, however, that this does not mean you can forget about having a good structure. Indeed, RAS will only work well if your RAS package dependencies form a tree (well, rather a directed acyclic graph).

RAS also allows you to control write access separately from read access, so that you can allow only certain users to update packages in RAS, while a larger number of users can retrieve them.

However, RAS does not give you any meaningful version control. RAS is baselines++, and baselines are just stored snapshots. The concept of branching is not recognized by either baselines or RAS. This is related to what I described earlier, that EA has no concept of a collection of models that itself can be version-controlled. I think you could implement some kind of branch type functionality possibly using multiple RAS storages, but it's a lot of effort for questionable returns.

So for anything approaching what you've been getting out of the box with any source code version control system since the eighties, you will need to do a lot of thinking and planning of your own. Or get a consultant in. :D

Quote
I also have to ask, what exactly do you mean by "tracking enterprise architecture evolution over time"? And what would you recommend for tracking that evolution?

This is a question for Modesto, but I would say that the comparison tools provided by EA (which can be used in conjunction with baselines or RAS) can't do this for you because they track things like elements changing positions in diagrams, attributes added/deleted, etc -- it's at a very fine level of detail which tells you nothing about the grand sweep of changes to your design. There's just no way of doing that using EA's version-control-space functionality. I'm not saying you can't document architectural changes in a model, but I am saying that EA's version comparison facilities don't help.

HTH,


/Uffe

41
Hello Andrew,


The EA API is notoriously chatty over the network. It appears to have no concept of a data cache; most every operation call seems to generate one or several SQL queries which are issued one by one, and there are no supporting stored procedures in the database schema. The properties you've found are pretty much the only ones that affect the operation of the API itself, so it's a pretty primitive affair.

As Qwerty writes, the only way to get acceptable performance is to work out your own SQL queries. However, this only works for data retrieval. While you can issue create and update queries using the undocumented Repository.Execute() method, the schema is undocumented and to achieve something like creating a new element you will have to work out for yourself which tables to modify and in what order. (Minor updates are generally safe, but creation is complex.)

I would certainly urge you to switch to SQL Server as the top priority. Access is very limited in and of itself, and over a network it's simply untenable. I don't know for certain, but I'm pretty sure that using an .EAP project on a file server means all network traffic is routed through NTFS and not ODBC, likely causing further performance issues.

The choice between opening a project in the EA client (whether by automation or the GUI) and loading model data from XMI seems like a false one to me. In the first case you're opening the database which already contains the data, while in the other you are adding data to the (local?) database. Maybe I'm not grasping what you're trying to do, but I will note that this is essentially how working with version-controlled models works. This approach is not one I recommend, but it is there and it is supported.

HTH,


/Uffe

42
General Board / Re: Customize contents of Diagram Notes
« on: December 06, 2020, 09:11:58 pm »
It would be just about possible to achieve something similar to a note link using a stereotyped Note, a different connector than the NoteLink and an Add-In to auto-update the contents, but I'm not sure it would be worth the effort.

/U

43
General Board / Re: UML vs Extended diagrams
« on: December 06, 2020, 09:07:21 pm »
Hi Jayson,


Extending a diagram type does two things: it sets the extending diagram's behaviour, and it sets its browser icon. However, there aren't anywhere near as many distinct diagram behaviours as there are diagram icons.

In terms of behaviour, there are just three distinct diagram types: sequence, timing, and others. While you can include timelines from a sequence in an object diagram, you can't edit the sequence in the object diagram. Same with timing diagrams, you can add timelines to diagrams of other types, but you can't edit them there.

(If you bring up the appropriate toolbox you can continue editing a sequence in an object diagram, but I believe this is only part of the story and that there are certain aspects of the behaviour that are locked to one of the three fundamental diagram types. But I haven't tested this thoroughly so I may be wrong.)

Anyway, the "extended" diagrams are all in the "others" category of behaviour, and introduce only two new icons; Analysis and Custom.

So since the Diagram Extension profile helper doesn't distinguish diagram icon from diagram behaviour (there's no need since both the sequence behaviour and the timing behaviour is locked 1-1 with one icon) it only lists the most fundamental diagram type for each icon.

HTH,


/Uffe

44
General Board / Re: Controlling the compartment title/heading
« on: December 06, 2020, 08:34:31 pm »
Hi Pete,


I think you're after custom compartments. These allow you to add your own compartments with their own headers.

Do I need to write the text in my own shapescript? If so, how does that integrate with the Diagram properties to turn compartments on and off?

The integration is a bit shaky, but you'll see the names of your custom compartments show up in the Compartment Visibility dialog. I think they only appear if the shape script's conditions are met so that the compartment will have contents; this means you can enable a compartment, make changes to the element, and then the conditions change and the option vanishes so you can't disable the compartment, that kind of fun stuff.
In general this functionality is too cumbersome and buggy to be worth the effort, but if it's for a very limited situation where the modeller knows exactly what they're doing and how the whole thing works, it can be made to sort of work. Ish.

HTH,


/Uffe

45
Hi again,

I never succeeded using the constraint Time ... it has no effect in my State Machine.
...
However the "timeout" delay can never be simulated in EA.

I see: you're trying to execute/simulate the state machine. In the OP you said "model" and the procedure I outlined should work for that, but execution is a whole nother problem.

State machine execution is (as so much else in EA) a partial implementation that works for a sales demo but breaks down as soon as you try to incorporate any but the most trivial model constructs.
So while you can syntactically and semantically express a timeout in a UML state machine, you can't get EA to execute it.

You can always try to request that feature from Sparx.


/Uffe

Pages: 1 2 [3] 4 5 ... 124