IBM® Rational® Rhapsody® assumes
that you are following a certain programming style, outlined in the
following notes. You are not forced to follow this style, but if you
choose not to, be aware that the animation might get out of sync with
the model.
For example, at times, it might be convenient to
define a static attribute and use it directly for all class instances.
Although it is not the most effective programming approach, it is
a quick way to solve a number of problems. You can work this way if
you prefer. However, be aware that the value of that attribute might
not be updated properly during animation.
The following are standard style guidelines:
- All internals of an object are private or protected;
that is, other objects cannot change the attributes, relations, or
states directly for an object. They must use some operation of the
object.
- States and relations can be changed only through
a predefined set of mutators.
- Invoking self-triggered operations is allowed only
between and-state components.
Note: On recovery, if you do not follow these guidelines
and suspect that a view of a given object is inconsistent with its
actual state, try closing the suspect view and reopening it. This
action refreshes the view and synchronize it with the actual state
of the object.