Component Diagram advice requested

Discussions about UML in general.

Component Diagram advice requested

Postby hersker » Fri Dec 12, 2003 1:07 am

Most of my UML diagramming/modeling to date has been Class and Sequence diagrams. I'm weaning myself step by step from Visio block diagrams and am seeking some diagramming advice from more experienced UML diagrammers out there.

I want to create a diagram that shows several file transformation steps. An original Excel source file is processed to create an intermediate XML file, with multiple XSL transformations from there.

I was looking for the right diagram type for modelling files, and settled on the Component Diagram. Is this the best choice? There is no <<file>> stereotype for Components, so I'm uncertain it's the appropriate diagram type.

For the first transformation (Excel to XML), the dependency arrow from the XML file to the Excel file is given the name of the processing program. Is there a more correct UML way to express this?

That first transformation also produces a secondary diagnostic output file (with errors and warnings about the source file's content). How do I show that the same processing program produces the diagnostic output file? It seemed more confusing to add a second dependency arrow, but there appears to be no "fork" notation available. I tried creating a note but it can't be attached to the dependency arrow, and I didn't like it attached to either the Excel or XML components.

I have attached a simplified version of my model. Thanks in advance for any advice.
Steve Herskovitz
Posts: 16
Joined: Thu Nov 06, 2003 2:51 am
Location: San Carlos, CA (San Francisco)

Re: Component Diagram advice requested

Postby [gw] Jesco von Voss » Mon Jan 19, 2004 11:35 am

You can create a new "file" stereotype by opening the stereotype dialog, entering "file" in the text box on the lower left, and then clicking "Add". Don't forget to select the <<file>> stereotype by moving it to the right-hand window.

How about an activity diagram with object flow states? Model your steps of the process with activities, model your file(s) as elements that have different states. An activity will influence the object flow state to enter a different state.

To this end, you'll create a component ; give it the stereotype <<file>> if you like, and add a state diagram where you enter a bunch of states representing the stages of processing that the file passes. Like "unmodified state", "foo tags removed", "bar tags reformatted", etc.

Then, back to the activity diagram; Create an object flow state, select the type to be your component, and then you'll see the possible states of the component in the combo box below.

Then, you can alternate action states and object flow states, and connect them with transitions. First, you'll draw the action state "remove foo tags", then, draw a transition to the object flow state "foo tags removed", and then a transition from the o.f.s. to the next action state.

One action state can of course have multiple outgoing arrows, e.g. to an object flow state representing the log file.

Jesco von Voss
[gw] Jesco von Voss
Posts: 273
Joined: Sat Jan 18, 2003 10:08 am
Location: Hamburg

Return to UML

Who is online

Users browsing this forum: No registered users and 1 guest