C�ram has the concept of "domain definitions" in it's application model. These are used as "data types" when defining entities and "structs". A domain definition exists for Java's primitive numeric types. For example:
SVR_INT8 -> Java "byte"
SVR_INT16 -> Java "short"
etc.
On user interface screens, fields are based on these domain definitions. When a user enters a value and submits a form, the infrastructure provides out-of-the-box validations based on these data types. By default, for numeric types, the infrastructure validation indicates the range of the underlying datatype. For example, if a user enters "1000" in a SVR_INT8 field, the validation message displayed will be:
The value of the field 'Some Field' cannot be stored; it must be between '-128' and '127'.
Application developers can specify a minimum and maximum for a domain definition in the model also. These are known as "domain options".
For example, a developer may create a new domain definition which inherits from SVR_INT8 and call it "NUMBER_OF_DAYS".
In the model, they can specify a "minimum value" domain option of 0. The infrastructure validations will now use this as the minimum value and display the following message instead:
The field 'Some Field' must greater than or equal to '0'.
However there is a problem when the user enters a value which can't be stored in the underlying data type.
Consider the following sequence, again where the domain definition is a SVR_INT8 and also where the developer has specified a minimum value domain option of "0" (no maximum).
Users enters -1"
Validation message displayed: The field 'Some Field' must greater than or equal to '0'.
User enters 128 which exceeds a "byte". The infrastructure never gets to perform the min\max comparison as it fails when trying to create a byte.
Validation message displayed: The value of the field 'Some Field' cannot be stored; it must be between '-128' and '127'.
We've now confused the user. First we told them it must be greater than 0. Then we've told them it must be between "-128" and "127". This needs to be fixed. The infrastructure needs to always use the min\max domain options when displaying error messages to the user. For example, take the above scenario again, the following _should_ be the behaviour:
Users enters -1"
Validation message displayed: The field 'Some Field' must be greater than or equal to '0'.
User enters 128 which exceeds a "byte"
Validation message displayed: The field 'Some Field' must be between '0' and "127".
NOTE: Although this is the bug fix we want to make, there is still a little inconsistency in the messages here, in that it's only the _second_ message that shows the upper range. The reason for this is the requirement when min\max domain options are specified. When only one of min\max is specified we only show that to the user, hence the message above:
The field 'Some Field' must be greater than or equal to '0'.
Essentially from a _business_ point of view, we are saying: The minimum is "0" but we are not enforcing an upper limit, so that's the message we display. However from a _technical_ point of view, that is not actually true. There is an upper range, based on the underlying data type. But the technical limit can be "ugly" to display because of very large numbers, so we don't do this by default. however, when a user enters a value that exceeds the range of the underlying data type, we have no choice but to display that upper\lower limit.
Hi,
We have evaluated your request and have determined that it cannot be implemented at this time.
Your request may be resubmitted for consideration after 12 months from the date of decline.
Thank you for your interest in the Cúram SPM product.
Shane McFadden, Cúram SPM Product Management team
Hi,
We acknowledge that this is a valid enhancement request. It will be considered for inclusion in a future release of the product. Thank you for your interest in the Cúram product.
Thanks,
Eloise O'Riordan, Cúram SPM Offering Management team