Re: How to express conditional dependency between components in UML?



A component diagram is a static diagram. This translates into design
time or compile time relationships. Since there is no compile time
relationship between CompA and CompB, this wouldn't be represented on a
component diagram. That's why there is no good way to represent it.

However, there certainly is a run-time relationship between CompA and
CompB. But UML doesn't have a diagram that allows you to model run-time
relationships between components.

In your situation, I'd suggest using a note with a simple description.
Anyone reading your diagram will understand the note. Using some other
notation may only cause confusion since there is no good notation to
use for this in UML.

Kirk Knoernschild
www.kirkk.com
www.extensiblejava.com

Petri J. Riipinen wrote:
> Hi folks,
>
> How would one express a conditional dependency between two components in
> UML (2.0) component diagram?
>
> This is the situation: Component A (an executable) uses Component B (a
> DLL) by dynamically instantiating a class from it but only if certain
> programmatic parameter, PAR1, is set to value TRUE. The value of the
> parameter is stored into an .ini-file that is read by Component A on
> startup. If PAR1 is FALSE or missing, Component A doesn't need Component
> B at all. There is no static reference from Component A to Component B,
> everything is done dynamically.
>
> Currently I just draw a dependency-link from Component A to Component B,
> but that doesn't exactly describe the conditional nature of the dependency.
>
> Is there any guideline how to do this in UML or should I just use a note
> and explain the issue in the note?
>
> - Pete

.



Relevant Pages

  • Re: How to express conditional dependency between components in UML?
    ... >> A component diagram is a static diagram. ... >> time or compile time relationships. ... >I have a question regarding the compile time relationships. ... statically typed language that implies an interface of some kind. ...
    (comp.object)
  • Re: How to express conditional dependency between components in UML?
    ... > A component diagram is a static diagram. ... > time or compile time relationships. ... I have a question regarding the compile time relationships. ... the CompA instantiates a class from CompB and it may call some ...
    (comp.object)
  • resizing UML component
    ... I am using MS VISIO 2003 for creating software designing. ... in UML ... Component diagram I could not change the component size manually. ...
    (microsoft.public.visio.general)