Cloud Application Integration (On-Premises) : Service Development : Working with Variables : About Variable Constraints : Applying Constraints to a Variable
Applying Constraints to a Variable
Keep the following points in mind when applying constraints to a variable:
*The Required property appears for variables in document types if one or more of the following are true:
*The document type was created using a version of Integration Server prior to version 8.2.
*The document type was created using Developer.
*The Model type property of the document type is Unordered.
*The Min occurs, Max occurs, and Model type variable properties are display-only. These properties appear only for a variable in an IS document type with a Model type property value of Sequence, Choice, or All.
*Variables defined in an IS document type with a Model type property value other than “Unordered” cannot be modified.
To apply constraints to a variable
1. Select the variable to which you want to apply constraints.
You can apply constraints to variables in IS document types, variables in a specification, and variables declared on the Input/Output tab.
2. In the Properties view, under Constraints, define the following properties:
Property
Description
Required
Specifies whether the selected variable is required to exist at run time.
Select...
To...
True
Require the selected variable to exist at run time.
False
Make the existence of the variable optional at run time.
Allow null
Specifies whether a variable is allowed to have a null value.
Select...
To...
True
Allow the variable to have a null value.
False
Have the validation engine generate an error when the variable has a null value.
Allow unspecified fields
If the variable is a document or document list, specifies whether the variable can contain undeclared child variables.
Select...
To...
True
Allow the variable to contain undeclared child variables.
False
Treat any child variables that exist in the pipeline but do not appear in the declared document field as errors at run time.
Note:  
The state of the Allow unspecified fields property determines whether the document is open or closed. An open document permits undeclared fields (variables) to exist at run time. A closed document does not allow undeclared fields to exist at run time. Integration Server considers a document to be open if the Allow unspecified fields property is set to True and considers a document to be closed if the Allow unspecified fields property is set to False.
3. If the selected variable is a String, String list, or String table, and you want to specify content constraints for the variable, click and then do one of the following:
*If you want to use a content type that corresponds to a built-in simple type in XML Schema, in the Content type list, select the type for the variable contents. To apply the selected type to the variable, click OK.
If you want to customize the content type by changing the constraining facets applied to the type, see Customizing a String Content Type.
*If you want to use a simple type from an IS schema as the content constraint, click Browse. In the Browse dialog box, select the IS schema containing the simple type you want to apply. Then, select the simple type you want to apply to the variable. To apply the selected type to the variable, click OK.
Note:  
A content type corresponds to a simple type from an XML Schema definition. All of the choices in the Content type list correspond to simple types defined in XML Schema Part 2: Datatypes.
4. If the selected variable is an Object or Object list, for the Java wrapper type property, select the Java class for the variable contents. If you do not want to apply a Java class or if the Java class is not listed, select UNKNOWN.
For more information about supported Java classes for Objects and Object lists, see Java Classes for Objects.
5. Repeat this procedure for each variable to which you want to apply constraints in the IS document type, specification, service input, or service output.
6. Click File > Save.
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback