Question & Answer
Question
In IBM® Rational® Software Architect (RSA), you might have a defined profile with several stereotypes. Each stereotype has tagged values with the type "String". If you want to define an empty string as the default value, you might try to use the "Literal String" value from the Advanced tab of the tagged-value. Doing so results in RSA's placing the <"null"> string into the default value field. However, when you apply the stereotype to a Unified Modeling Language (UML) element in a model, the tagged-value value becomes "null". "null" without the quotation marks. If you then use this model as input for a model-to-model transformation, it has the following consequence. RSA does not consider the tagged-value with such this "null" value as a null string. RSA rather considers this tagged-value as a string with a value equal to "null". Forcing the tagged value's value in the model to "null" does not change the result. Note the quotation marks, as they are present in the stereotype. This technote explains how you can define an empty string as a default value of a stereotype's tagged value. RSA in turn interprets the default value as an empty string in the context of the UML element to which it is applied.
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
10 September 2020
UID
swg21302723