TimeObservation in the UML Spec

In a superstructure of the UML spec (2.5 still beta, page 87):

TimeObservation is a reference to a point in time at runtime. It points to the NamedElement in the watch model and when this NamedElement is entered or when it exited "

look at this example from the spec. enter image description here

TimeObservation t = now

  • Can I use another variable and where should I define these variables?

  • how to determine the value instead of the current one?

  • What are the possible cases of writing an expression to save time?

  • Does TimeObservation only refer to the lifecycle or also refers to the message that sits between the lifelines?

  • If it is found throughout the life cycle, does that mean that it is recommended that you point it at a certain point or at any point through the life cycle?

+3


source to share


2 answers


I agreed that more details would be helpful in understanding your question. TimeObservation is a UML element that belongs to a UML package and is associated with a UML NamedElement, but as its description, I assume it is associated with an event most of the time. Thus, in the Sequence diagram, the TimeObservation function can be associated with an Occurence or ExecutionSpecification, that is, the beginning or end of a Message or InteractionFragment.



Hoping this helps.

+1


source


The metadata specification says:

Time watch is a reference to a point in time at runtime. It points to an element in the model to be observed and whether it observes when that model element is entered or when it exits.

He references whatever NamedElement he comments out.

OK, I think I understand what you are trying to achieve. To do this, you need to create a UML profile. How you do this will greatly depend on the tool you are using.



First, define the UML NamedElement that you want to constrain. In profile, add NamedElement as MetaClass type and extend it with ContrainedNamedType as StereoType.

In the profile, define the stereotype using the OCL comparison method using TimeObservation types. They can be considered essential properties. To be fair, this is what came down to my knowledge, but Google included these

0


source







All Articles