Hello,
I want to define a number of ranges (i.e. min-max values) as ValueTypes, which I can then use as the types for a block's value properties. To that effect I created a <<Range>> stereotype with a min and max tag.
What I would like to do now is to create a validation rule that would check the properties value (i.e. slots) of instance specifications based on such block are within the Range applicable to their type. I can create a constraint that would check each value is within a predefined range (i.e. hardcoded min/max). However I would like the min/max to be derived from the <<Range>> stereotype applied to the properties' type.
Can someone provide guidance on how to define such validation rule?
In the example below the Block "Range Values" has two value properties, value1 and value2. The type of value1 is "Range A", which has the <<Range>> stereotype with tag values min = 5 and max = 10. Similarly value2 has "Range B" as a type, with stereotype <<Range>> with min = 15, max = 25. The validation rule I want should check any value1 slot (instance specification) is within the range defined by Range A (i.e. 5, 10) and correspondingly for slots of value2.
Regards,
Christophe.