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



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

I dont know how :) but I think you can use OCL to express this type of "relations".


Bye.

--
-----------------------------------------------------
Antonio Santiago Pérez
( email: santiago<<at>>grahi.upc.edu       )
(   www: http://www.grahi.upc.edu/santiago )
(   www: http://asantiago.blogsite.org     )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Politècnica de Catalunya
-----------------------------------------------------
.



Relevant Pages

  • How to express conditional dependency between components in UML?
    ... How would one express a conditional dependency between two components in UML component diagram? ... Component A uses Component B by dynamically instantiating a class from it but only if certain programmatic parameter, PAR1, is set to value TRUE. ... 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? ...
    (comp.object)
  • Re: How to express conditional dependency between components in UML?
    ... > UML component diagram? ... > but that doesn't exactly describe the conditional nature of the dependency. ...
    (comp.object)
  • Re: UML questions
    ... >> dependency arrow to indicate that messages are sent to a parameter of ... >UML slangs! ... >an association, but if a relationship is an aggregation, we would not ... >> That's a reasonable interpretation of an ambiguous spec. ...
    (comp.object)
  • Re: UML class diagram question
    ... >> dependency on B or is it associated with B? ... UML 1.5, Section 2.5.2.5 ... When an instance communicates with another instance a stimulus is passed ... and the receiver for communication. ...
    (comp.object)
  • Re: UML questions
    ... >> Dependency is a relationship where two ... then associations must exist between their classes. ... I think there are ways around this in UML; and I know of some UML ... might adhere closer to the UML spec. ...
    (comp.object)