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.


Topics - Paul Lotz

Pages: 1 [2] 3
16
General Board / code generation and Signals
« on: May 11, 2010, 10:41:56 am »
This is, I think, the last major piece in a puzzle I am trying to solve.  For the record, I also posed a version of this question to Sparx support.

How do I generate code for a Signal?

In the current version of EA a Signal is a unique type.  A Signal-typed element looks an awful lot like a class.  A signal can have attributes.  It generally does not have operations, but the UML specification does not forbid this and in fact EA allows it.  While it is not necessary for a Signal to be an object, in practice I think it is quite common to implement signals as objects.

In particular, EA 8.0 (build 856) has a Select Signal browser one can use to select an existing Signal-typed element to apply to, say, a message in a sequence diagram.  I think this is very cool!  (For the record, it is also possible to apply a <<signal>> stereotype to a class but such a class does not appear in the Select Signal dialog.)  It seems to me quite appropriate, then, to represent signals (particularly in a publish-subscribe system) as Signal-typed elements in the model.

Now, the last bit is how does one generate code for such a Signal?  In our case for each Signal we want to generate a Java class with the corresponding attributes.  (I'm guessing implementing a Signal as a Class is the most common approach.)  How can I do this?

I think we need to extend the templates under Settings...Code Generation Templates so that they apply to a Signal, but I don't (yet) know how.  Can anyone shed some light on how to do this?

Thanks!

Paul

17
General Board / How to show ConcreteCommand on message in Seq Diag
« on: April 30, 2010, 10:31:13 am »
We have successfully implemented an interface using the Command Pattern.  I had a sequence diagram in which I showed the commands on messages in order to express the interactions, but I created the message names and parameters manually (and they were notional for that reason).

I am now trying to update the sequence diagram so that the messages rigorously link to the proper model elements, but I am not sure how to do this (if it is possible, which regrettably it might not be).

So I have something like this:
Command class is abstract and any number of ConcreteCommand classes, each of which has its own unique attributes (if any).
I have a CommandSignal with an attribute command:Command.
I have two interfaces: ICommander, ICommandee, and on my sequence diagram ICommander sends a message to ICommandee.

Now I can define the message as type CommandSignal but then the message parameter is command, which isn't very useful on the sequence diagram.

I can instead define an operation on ICommandee that I call command(), but this doesn't have the parameter I want.

Or I can define a series of operations that I call concreteCommandA(), concreteCommandB(), etc., but if I define parameters of type CommandA, CommandB, etc., this doesn't help me with the parameter specification on the message either.

What I want, of course, is to have the message parameters from the proper ConcreteCommand class.

Is there a way to do this?

As I write, I suppose I could (haven't tried this yet) define the parameters on concreteOperationA to match those for ConcreteCommandA, but then if I change an attribute on ConcreteCommandA, then, unfortunately, concreteOperationA will not automatically follow suit.

Is there a better way?

Thanks!

Paul

18
General Board / Requirement <<rationale>> in SysML
« on: May 04, 2010, 06:34:22 am »
I want to add the rationale for requirements in SysML.

In the book I am reading this is shown with what looks like a note with a <<rationale>> stereotype.  (The book is A Practical Guide to SyML: The Systems Modeling Language, http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1207589531/0#0.  I highly recommend it.)

Is there a way to add a rationale in this manner in EA?

I did a forum search and found the rationale with requirments mentioned in these threads, but without the answer I am seeking:
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1208974341/5#5
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1207589531/0#0


19
General Board / Change Class to Signal?
« on: May 01, 2010, 04:48:31 am »
Is there a way to change an element that is of type Class so that it is a Signal (and do this cleanly)?

20
General Board / Heading requirements and traceability
« on: July 03, 2009, 03:23:26 am »
I have a set of requirements (in my case that I import from DOORS) such that they form a hierarchy--as pretty much all sets of requirements do.  Hence some (many) of the "requirements" are headings with no requirement text.  If I simply create a relationship matrix, for example, EA shows me all the requirements, whether they are true requirements or simply section headings, so that it makes it very difficult to determine how many of the requirements are actually covered.

Really, I want to show that we have implemented all leaf requirements, and that section headings are covered (or complete) when all their descendants are covered (as other requirements tracking tools we have do).

Has anyone devised a way to do this in EA?

Paul

21
General Board / Changing default properties for a set of diagrams
« on: June 26, 2009, 10:06:50 am »
Frequently I create a set of diagrams that I want to have a common set of properties (e.g., the Elements should show Notes, the diagrams should be Landscape).  I can make changes in the Properties dialog for each diagram, but is there a way I can make changes for a set of diagrams (or apply a custom property set to a new diagram)?

I'm guessing I need to use Stereotypes, Profiles or both but I didn't find much via a Help search that told me what I needed to know....

Thanks!

Paul

22
General Board / Is it possible to have state realize requirement?
« on: June 16, 2009, 10:24:22 am »
I am trying to incorporate requirements traceability in my model.  I can drag a requirement onto a class to create a realization link.  If I drag a requirement onto a state in a StateMachine Diagram that I think implements the requirement, EA does nothing.  Perhaps there is no way to link the state to a requirement?

23
General Board / revision history in rtf file?
« on: March 05, 2009, 08:13:27 am »
We use a version control system with our EA models (the XML files).  Is there a way to include the revision history (comments we enter on a commit) in an rtf file from EA?

I see that there is an audit feature, which I tried and works pretty well for showing detailed changes if I use an rtf template with auditing output.  Even with this feature, though, I think I will still want to add the high-level version control commit comments for the benefit of the reader.

Paul

24
General Board / Make association target role navigable by default
« on: January 28, 2009, 11:56:00 am »
Actually, I found the answer after a little searching, but I thought other people might be interested in the answer.

The problem: How do I make it so that when a draw a new association (e.g., from a class to an attribute class) the default is such that the target end is navigable?  (I want this to be the case for a Design Class Diagram.  I don't want this for a Domain Model Class Diagram.  I don't want to change this every time I draw an association!)

Answer: Go to Tools...Options...Links and check "Association default = source --> target" before working on a Design Class Diagram.  Return here and uncheck this before working on a Domain Model Class Diagram.

This begs the question: Should this option be a property of the diagram?  (I suggest it should.)

Paul

25
General Board / Show constraint for attribute?
« on: January 28, 2009, 10:55:35 am »
I can create attributes for a class or for attributes in that class.  I see how to change the diagram properties to show the constraints for a class, but I haven't been able to get the diagram to show the constraints for an attribute (which would be quite helpful).  Is it possible to do this?

Paul

26
General Board / Data Types: Common Type?
« on: January 28, 2009, 07:09:09 am »
Is the Common Type field in the "Programming Languages Datatypes" dialog (Settings...Code Datatypes...) based on a standard set of common types?  If so, where can one find a list of the such common types?

27
General Board / constraints on tagged values created in profile?
« on: January 28, 2009, 04:03:41 am »
The question: How can one constrain the inputs for tagged values created as attributes in stereotypes in a profile?

Outside of a profile I can edit Tagged Value Types, giving them a Type, LowerBound, UpperBound (see the "Create Structured Tags" help page).

When I create tags from a profile, though, I create attributes in a stereotype and these become tags when I import the stereotype into my working project.  How do I apply the same sort of LowerBound, UpperBound, etc., to these attributes?  (Presumably this is possible using the Constraints tab?)

Let me explain what I am trying to do.  I want to create a data dictionary, not for a database, but for interface definitions.  Essentially I am will be creating a design class diagram but the data classes will have full details (minValue, maxValue, defaultValue, unit, etc.) defined in UML.  (I could keep the data dictionary in a spreadsheet, of course, but UML seems ideal for this since this information is truly in a model, so that updates will apply universally and I can properly represent inheritance.)  I think tagged values are useful to show the details.  Since I want to reuse this information I created a profile.  Attributes on stereotypes, however, become tags when applied, so there is a difference....

Am I heading in the right direction or is there a better way to do this?

Also, if I change a profile (e.g., add a new attribute to a stereotype), is there a way to apply the new version of the stereotype from the new version of the profile to classes already created on a UML diagram using a previous version of that profile?

Thanks!

Paul  

28
General Board / Subversion repository--where to specify?
« on: January 13, 2009, 09:52:08 am »
I am trying to set up Subversion to work with EA.

I have read the "Using EA: Setting up Version Control" document, the relevant help files, and Parts 2, 4, and 5 of the Version Control demos (which were helpful).

I set up a folder in an existing Subversion repository on our network (using TortoiseSVN as in the Part 2 demo even though EA itself doesn't use TortoiseSVN) .  I'm fairly experienced with TortoiseSVN since I use it to manage my code directories.  I also set up a working copy path in the Version Control Settings dialog for a package.

What I don't understand is how to specify the repository path.  I see that information in the Version Control Settings dialog for a package in the Part 5 demo, but when I go to this dialog myself these options (also username and password) are not visible.  Must I do something else first?

Paul

29
General Board / Message (Signal kind) should be from source
« on: May 08, 2008, 08:41:48 am »
I just sent this to EA support, but I'd be interested to hear from the forum as well:

Issue:
I am creating an interaction diagram to model the behavior of a system that sends signals with a publish-subscribe methodology.

When I create a message between two lifelines, the Message Properties dialog allows me to select from existing operations from the target lifeline.  (This is in principle quite important since it allows me to maintain consistency between the operations/signals in the interaction diagram and the operations/signals in the class model.)  This makes sense if the message kind is Call, but not (I contend) if the message kind is Signal (especially a published/broadcast signal), in which case the Signal should be an operation of the source lifeline.

I explored and found that I could create a signal in the source class and drag and drop the new signal onto the interaction diagram (at least with some limitations--as a self-call first).  (Interestingly the message properties have the defaults Synchronous and Call, which of course are not what I want.)  The dropped message then shows the message name and parameters associated with the source lifeline.  If I drag the message end to a different target lifeline, however, I once again can only choose from messages associated with the target lifeline.  I maintain that this is wrong in principle for signals.

How to reproduce:
Open an interaction diagram.  Add two lifelines with add a signal to each lifeline.  Draw a message line between the two lifelines.  In the Message Properties dialog change Kind to Signal and Synch to Asynchronous, then click on Operations.  The available operations are only those owned by the target lifeline.

Paul

30
General Board / show which class calls which operations on another
« on: June 05, 2008, 10:54:24 am »
This conundrum keeps recurring in my design work.  Perhaps I don't understand interfaces and ports sufficiently.

Goal: Depict overall architecture of system indicating which classes (or components) interact with each other and, if so, how.

This sounds simple enough (and essential!), but I haven't found a UML-compliant method (or example) to do this effectively.  Here are some methods I have tried and some shortcomings (real or imagined) I see.

1) Draw dependency relationships between classes/components.
Good: This shows which classes relate to which others and in which direction.
Bad: The relationships do not show the details of the dependencies (which operations the one calls on the other, for example).  It is conceivably possible to add this information in pure text or as part of the link name but then this information is not tied to the model in any way.  This is still one of the better methods I have found.

2) Draw information flow relationships between classes/components.
Good: This shows which classes relate to which others and in which direction.  In addition EA allows the selection of types to indicate specific object flow.
Bad: Not all interactions involve object flow.  A signal/command may not have a parameter and therefore there is no object flow.  How does one represent this?  (I would argue operations are more fundamental here in any case.)

3) Sequence diagrams
Good: These are designed to show who calls what operations on whom.  They do exactly what I need on the small scale.
Bad: These are not appropriate to show the large-scale (and static) system architecture.

4) Add ports and interfaces to the classes/components and relationships between the interfaces.
Good: This is a good method in some respects.  We can indicate directional relationships.  The interface definitions can show the details.
Bad: At least in EA I don't see how to indicate which operations are implemented on the interface relationship.  Shouldn't it be possible to implement a subset of the operations?  Example: Suppose I have a device (e.g., an actuator) that has an operation to initialize and another to move to a position.  The initialize command may be implemented by a local UI and by a containing subsystem.  The move to position command may be implemented only by the local UI.  If I create a single device controller interface how do I indicate that the subsystem calls one operation and the UI can call either operation?  (One answer is to create two child interfaces that inherit from the top-level interface, and have each child interface inherit only the appropriate operation subset.  This works in principle but I suggest gets absurdly complex quite fast even for a relatively simple system and, moreover, it may be nontrivial to make changes later.)

I'm thinking method 1 may in fact be the most appropriate for my current task since I may not want to show all the relevant operations anyway at the top level, but it seems to me that there is a frequent need to show the details in a model-consistent view.

Is there a way to do this meaningfully in UML?

Paul

Pages: 1 [2] 3