Try OpenEdge Now
skip to main content
Developing BPM Applications with Developer Studio
Developing BPM projects : Generating OpenEdge JSDO Catalog : Validating dataslots using semantic annotations
 

Validating dataslots using semantic annotations

You can validate the dataslots supported by the JSDO Catalog using semantic annotations. The following tables describe the validations and their semantic types for JSDO Catalog dataslots:
Table 14. For CHARACTER
Validation type
Number type
Semantic type
Number
Integer
{"type":"Integer", "min":2, "max":22}
Number
Float
{"type":"Number", "min":3, "max":33}
Email
-
{"type":"Email"}
URL
-
{"type":"URL"}
Password
"Password"
Table 15. For INTEGER, INT64 or DECIMAL
Validation type
Number type
Semantic type
Number
Integer
{"type":"Integer", "min":1,"max":11}
Number
Float
{"type":"Number", "min":2, "max":22}
Table 16. For DATETIME
Validation type
Semantic type
Date Only
"Date"
Date and Time
"Datetime"
Table 17. For LOGICAL
Validation type
Semantic type
Not available
{"type":"Boolean"}
Note: EDITABLE, LENGTH, IP ADDRESS, US SOCIAL SECURITY NUMBER, and DECIMAL dataslots are not supported by JSDO Catalog.
The following is an example of a semantic type, in JSON format, for a CHARACTER dataslot with Number type validation:
"chardataslot": {
"type":"string",
"ablType": "CHARACTER",
"default": "",
"title": "Characterdataslot",
"semanticType": {
"type":"Number",
"min":2,
"max":22
}
}
In this example, for semanticType:
*type indicates the type of validation. In this case, it is Number.
*min and max indicate the minimum and maximum values that are allowed for this Number, respectively.