webMethods Integration Cloud and Cloud Deployment Documentation 5.6.0 | webMethods Integration Cloud | Integrations, Built-In Services, REST APIs, SOAP APIs, Doc Types, and Recipes | Document Types | About Variable Constraints
 
About Variable Constraints
You apply content constraints to variables in the document types that you want to use as blueprints in data validation. Content constraints describe the data a variable can contain. At validation time, if the variable value does not conform to the content constraints applied to the variable, the validation engine considers the value to be invalid.
When applying content constraints to variables, do the following:
*Select a content type - A content type specifies the type of data for the variable value, such as string, integer, boolean, or date. A content type corresponds to a simple type definition in a schema.
*Set constraining facets - Constraining facets restrict the content type, which in turn, restrict the value of the variable to which the content type is applied. Each content type has a set of constraining facets. For example, you set a length restriction for a string content type, or a maximum value restriction for an integer content type.
For example, for a String variable named itemQuantity, specify a content type that requires the variable value to be an integer. You could then set constraining facets that limit the content of itemQuantity to a value between 1 and 100.
The content types and constraining facets described in this appendix correspond to the built-in data types and constraining facets in XML Schema. The World Wide Web Consortium (W3C) defines the built-in data types and constraining facets in the specification XML Schema Part 2: Datatypes (http://www.w3c.org/TR/xmlschema-2).

Copyright © 2014- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.