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 - sbrooke

Pages: [1]
1
General Board / Re: reverse engineering associations
« on: April 26, 2007, 07:45:33 am »
I have a similar problem with C++. If I manually add a composition connection between the container and the class, the connection is removed when I resync the class to code. Similarly, if I add a connection between the type class and the container, the connection is removed when the container is  resync'd with code.

The model validation does not seem to mind the connections in either case.

Next I tried including the container class as an instance rather than a simple link and then adding the composition connector. At least now, the resync with code does not remove the connection. I'm not sure what association I should have between the container and the type class. Does Dependency  or Realize make sense?

The associations with the container and it's class type are significant details I would like to appear in my class diagram. I cannot find much in the way of examples of parameterized class used within class diagrams.

Alternatively, if I wish to state that one class is composed of others without showing the detail of how it's implemented (container class) shouldn't I also be able to show that relationship that is reverse engineer compliant? What's up?

2
General Board / Re: time event
« on: April 27, 2006, 01:27:59 pm »
David,
That was it. I had already used the receive message symbol and right clicked on it but missed the "accept time event".

You say it was burried in the docs, but where? A search on "time event" or "event time" didn't reveal anything.

3
General Board / time event
« on: April 25, 2006, 12:59:33 pm »
Where can I find the time event element? It is represented as an hour glass symbol. I see it in the activity diagram example in help, but there seems to be no other reference to it.

Steve

4
Uml Process / Re: Activity Diagrams
« on: May 02, 2006, 02:44:41 pm »
Quote
I think the Agile diagram is based on UML 1.  UML 1 used state/transition thinking  as the underlying metaphor and extended it into object flows in activity diagramming.   UML 2 uses Petri Nets as the underlying science; a big change.


I gave that example because I have an Ambler book "Elements of UML 2.0 Style" with the same diagram. I guess the 2.0 revision used an old diagram that was not scrutinized...

I am sorry to seem obtuse, but I am still fuzzy about the use of object flows. Any examples that I have found either in text books or on the net seem trivial.

A simple real example that I am working on:
I have a read action: int wRead(void *pData, int nMaxBytes).
I have a class CMsg. It was attributes of a header structure and a pointer to the message payload.

The read is first invoked to read in a message header. The header contains the length of the payload, which is used to allocate memory for the playload and as a parameter for the second read. I am trying to capture the activity with control and object flow.

In the activity diagram, I have object flow from the first read to a CMsg object. Does the read have a "pData" action pin? Does the CMsg have a "sHeader" port?
When the header is set in CMsg, it allocates memory for the payload. Do I show the allocation on the activity diagram? If so where?

I have a data store object for the payload. I would not ordinarily model the data store on the static class diagram. It magically appears on the activity diagram. Do I care?

For the second read, where does object flow? It makes sense to me for it to flow to a data store object. Same question about action pins and ports.

When the message has been handled, do I show deallocation of the payload memory?

Am I getting close?

5
Uml Process / Re: Activity Diagrams
« on: May 01, 2006, 01:32:56 pm »
Woe me,
According to the UML 2.0 spec, an action must have all inputs satisfied before being executed. The only ORing node is the merge node.
This means that my last post was out to lunch. I can live with these rules, but I cannot reconcile examples that I've seen on the web that apparently use a different set of rules.

here's an example
http://www.agilemodeling.com/style/activityDiagram.htm
The "Enroll in University" action has three inputs, of which only one can be active at a time.

Is it wabbit season or is it duck season?

6
Uml Process / Re: Activity Diagrams
« on: May 01, 2006, 09:18:35 am »
Whoa Bruce,
I thought that activities have OR'd input tokens and joins have AND'd input tokens. That is, though some may not prefer the style of not using decision and merge symbols,






A-----g1------>B----->D
|^
||
+-----g2------>C------+


is acceptable. g1 and g2 are guards. D does not activate unless flow is passed along via B OR C.
Also, I thought that it is bad form to have unbalanced fork/joins as in your diagram...



Jim, I think that I get your point. Is it diagrammed as this:






A-->||------>B----->||---->C
||||
||------------->||


where: the join has a control flow input from B, an object flow input from A and an object flow output. This is at least consistent with my understanding of AND and OR applied to joins and activities, respectively.
My notion of forks implies concurrent threads of execution, and the above seems to have what I would call a "vacuous thread". Is there a tidier way?

Following some of the other threads about activity diagrams, I find that object flows are information about the object and not the object itself. In programming parlance I would say "pointer flow" or "reference flow". As such, is it really mis-leading to simplify to:

A----->B----->C------>

where all flows are object?

I find that some of the finer points of activity diagrams are not well described anywhere. Is there an authoritative text on the subject?

7
Uml Process / Re: Activity Diagrams
« on: April 27, 2006, 02:43:51 pm »
Right now I set the thickness to a heavy line for each object flow connection. Is there a way to do this for the entire diagram so that object flows have a different line type from control flow?

More importantly:
  • Is there any need to graphically distinguish object flow from control flow?
  • Do people mix control and object flow in the same diagram or use control flow with an object tag if required?


Steve

8
Uml Process / Re: Activity Diagrams
« on: April 21, 2006, 07:53:40 am »
Bruno, you rock!

Should I have been able to figure this out from the help/tutorial?

I've tried this with a state diagram. I can drag an attribute into a state, but I can't drag an operation into a transition.

Steve

9
Uml Process / Re: Activity Diagrams
« on: April 20, 2006, 02:32:46 pm »
I have an observation about activity and all other dynamic behaviour diagrams (except sequence). There seems to be a disconnect between these diagrams and the static (class) diagrams.

On a sequence diagram, when adding a message between instances of predefined classes, I get a pull down menu offering me the operations defined for the class. While my sequence diagram may not be directly testable (no code generation), I know that at least it is consistent with the class diagram (which is directly testable).

I think that the same thing should be available for other dynamic behaviour diagrams: an action in an activity diagram should map to an operation. On state diagrams, a state variable should map to an attribute and a state transition should map to an operation. Otherwise, the dynamic behaviour has no relationship with the class diagram.

Am I missing something?

Pages: [1]